From 4364155946f02d18eaf43e28e4b9510e8ac448bc Mon Sep 17 00:00:00 2001 From: kiana-S Date: Fri, 5 Jul 2024 01:46:31 -0400 Subject: [PATCH] Refactor login.nix --- config/login.nix | 43 +++++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/config/login.nix b/config/login.nix index 940a59b..91874c8 100644 --- a/config/login.nix +++ b/config/login.nix @@ -1,28 +1,27 @@ { config, lib, pkgs, tokyo-night-sddm-src, ... }: -lib.mkIf (config.platform != "mobile") - (let - tokyo-night-sddm = with pkgs.libsForQt5; pkgs.stdenv.mkDerivation { - name = "tokyo-night-sddm"; - src = tokyo-night-sddm-src; - installPhase = '' +let + tokyo-night-sddm = pkgs.stdenv.mkDerivation { + name = "tokyo-night-sddm"; + src = tokyo-night-sddm-src; + installPhase = '' cp -f ${./tokyo-night-sddm/theme.conf} ./theme.conf mkdir -p $out/share/sddm/themes/tokyo-night-sddm mv * $out/share/sddm/themes/tokyo-night-sddm ''; - }; - in { - environment.systemPackages = with pkgs.libsForQt5; [ - tokyo-night-sddm # Theme - qtbase - qtsvg - qtquickcontrols2 - qtgraphicaleffects - ]; + }; +in lib.mkIf (config.platform != "mobile") { + environment.systemPackages = with pkgs.libsForQt5; [ + tokyo-night-sddm # Theme + qtbase + qtsvg + qtquickcontrols2 + qtgraphicaleffects + ]; - services.displayManager.defaultSession = "hyprland"; - services.displayManager.sddm = { - enable = true; - wayland.enable = true; - theme = "tokyo-night-sddm"; - }; - }) + services.displayManager.defaultSession = "hyprland"; + services.displayManager.sddm = { + enable = true; + wayland.enable = true; + theme = "tokyo-night-sddm"; + }; +}