From 62bbdbe1ebf4ab8d0d48a99d08044078664805ba Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Thu, 28 Mar 2024 20:19:31 -0400 Subject: [PATCH] hyprland: moved lightdm to separate module --- nixosModules/desktopConfig/default.nix | 2 +- .../desktopConfig/displayManagers/default.nix | 4 ++ .../displayManagers/lightdm/default.nix | 38 +++++++++++++++++++ .../windowManagers/hyprland/default.nix | 31 ++------------- 4 files changed, 46 insertions(+), 29 deletions(-) create mode 100644 nixosModules/desktopConfig/displayManagers/default.nix create mode 100644 nixosModules/desktopConfig/displayManagers/lightdm/default.nix diff --git a/nixosModules/desktopConfig/default.nix b/nixosModules/desktopConfig/default.nix index 87f7e21f..e5d1e31e 100644 --- a/nixosModules/desktopConfig/default.nix +++ b/nixosModules/desktopConfig/default.nix @@ -1,6 +1,6 @@ { pkgs, lib, config, ... }: { - imports = [ ./gnome ./plasma ./windowManagers/hyprland ]; + imports = [ ./displayManagers/lightdm ./gnome ./plasma ./windowManagers/hyprland ]; options = { desktopConfig.enable = diff --git a/nixosModules/desktopConfig/displayManagers/default.nix b/nixosModules/desktopConfig/displayManagers/default.nix new file mode 100644 index 00000000..812d4a06 --- /dev/null +++ b/nixosModules/desktopConfig/displayManagers/default.nix @@ -0,0 +1,4 @@ +{ pkgs, lib, config, ... }: { + + imports = [ ./lightdm ]; +} diff --git a/nixosModules/desktopConfig/displayManagers/lightdm/default.nix b/nixosModules/desktopConfig/displayManagers/lightdm/default.nix new file mode 100644 index 00000000..9a92d74c --- /dev/null +++ b/nixosModules/desktopConfig/displayManagers/lightdm/default.nix @@ -0,0 +1,38 @@ +{ pkgs, lib, config, ... }: { + + options = { + desktopConfig.displayManagers.lightdm.enable = lib.mkEnableOption + "Enables lightdm and slick greeter with Catppuccin theme."; + }; + + config = lib.mkIf config.desktopConfig.displayManagers.lightdm.enable { + services.xserver.displayManager.lightdm = { + enable = true; + greeters.slick = { + enable = true; + theme.name = "Catppuccin-Frappe-Compact-Mauve-Dark"; + theme.package = pkgs.catppuccin-gtk.override { + accents = [ "mauve" ]; + size = "compact"; + variant = "frappe"; + tweaks = [ "normal" ]; + }; + iconTheme.name = "Papirus-Dark"; + iconTheme.package = pkgs.catppuccin-papirus-folders.override { + flavor = "frappe"; + accent = "mauve"; + }; + font.name = "NotoSans Nerd Font Regular"; + + cursorTheme.package = pkgs.catppuccin-cursors.frappeDark; + cursorTheme.name = "Catppuccin-Frappe-Dark-Cursors"; + cursorTheme.size = 32; + + extraConfig = '' + background=#ca9ee6 + enable-hidpi=on + ''; + }; + }; + }; +} diff --git a/nixosModules/desktopConfig/windowManagers/hyprland/default.nix b/nixosModules/desktopConfig/windowManagers/hyprland/default.nix index 7cc22097..88cab812 100644 --- a/nixosModules/desktopConfig/windowManagers/hyprland/default.nix +++ b/nixosModules/desktopConfig/windowManagers/hyprland/default.nix @@ -2,38 +2,13 @@ options = { desktopConfig.windowManagers.hyprland.enable = lib.mkEnableOption - "Enables hyprland window manager session with lightdm."; + "Enables hyprland window manager session."; }; config = lib.mkIf config.desktopConfig.windowManagers.hyprland.enable { - services.xserver.displayManager.lightdm = { - enable = true; - greeters.slick = { - enable = true; - theme.name = "Catppuccin-Frappe-Compact-Mauve-Dark"; - theme.package = pkgs.catppuccin-gtk.override { - accents = [ "mauve" ]; - size = "compact"; - variant = "frappe"; - tweaks = [ "normal" ]; - }; - iconTheme.name = "Papirus-Dark"; - iconTheme.package = pkgs.catppuccin-papirus-folders.override { - flavor = "frappe"; - accent = "mauve"; - }; - font.name = "NotoSans Nerd Font Regular"; - cursorTheme.package = pkgs.catppuccin-cursors.frappeDark; - cursorTheme.name = "Catppuccin-Frappe-Dark-Cursors"; - cursorTheme.size = 32; - - extraConfig = '' - background=#ca9ee6 - enable-hidpi=on - ''; - }; - }; + desktopConfig.displayManagers.lightdm.enable = lib.mkDefault true; + programs.hyprland.enable = true; services.power-profiles-daemon.enable = true; services.upower.enable = true;