From 7e54da92b9e5c4d24cc3ac490f75c7de681420c7 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sun, 23 Feb 2025 12:54:28 +0100 Subject: [PATCH] Use displaySessions for display manager --- modules/programs/fish.nix | 4 ++-- modules/programs/gaming.nix | 2 +- modules/programs/greetd.nix | 38 +++++++++++++++++++------------------ 3 files changed, 23 insertions(+), 21 deletions(-) diff --git a/modules/programs/fish.nix b/modules/programs/fish.nix index ffeea1e..fc89e95 100644 --- a/modules/programs/fish.nix +++ b/modules/programs/fish.nix @@ -50,8 +50,8 @@ in { set EDITOR "neovide --no-fork" - alias rebuild='nh os switch' - alias update='nix flake update --flake $FLAKE' + alias rebuild='nh os switch -- --accept-flake-config' + alias update='nix flake update --flake $FLAKE --accept-flake-config' abbr --add ls 'lsd' abbr --add :q 'exit' abbr --add gh 'git push origin' diff --git a/modules/programs/gaming.nix b/modules/programs/gaming.nix index 76a86e7..3998c78 100644 --- a/modules/programs/gaming.nix +++ b/modules/programs/gaming.nix @@ -31,7 +31,7 @@ default = true; example = false; type = lib.types.bool; - description = "Whether to use the xanmod kernel"; + description = "Whether to use the CachyOS kernel"; }; steam = lib.mkOption { default = true; diff --git a/modules/programs/greetd.nix b/modules/programs/greetd.nix index d00baa6..0101c3c 100644 --- a/modules/programs/greetd.nix +++ b/modules/programs/greetd.nix @@ -43,15 +43,16 @@ ''; }; environments = lib.mkOption { - default = '' - Hyprland - ''; + default = [ + inputs.hyprland.packages.${config.conf.system}.hyprland + ]; # no idea if these are written correctly - example = '' - Niri - River - ''; - type = lib.types.lines; + example = [ + pkgs.niri + pkgs.river + pkgs.swayfx + ]; + type = with lib.types; listOf package; description = '' List of environments that should be available in the login prompt. ''; @@ -85,23 +86,24 @@ manage = "desktop"; name = "Hyprland"; start = '' - ${lib.getExe pkgs.hyprland} & waitPID=$! + ${inputs.hyprland.packages.${config.conf.system}.hyprland} & waitPID=$! ''; } ]; # greetd display manager programs.hyprland.enable = true; - services.greetd = { - enable = true; - settings = { - terminal.vt = 1; - default_session = session; + services = { + displayManager.sessionPackages = config.mods.greetd.environments; + greetd = { + enable = true; + settings = { + terminal.vt = 1; + default_session = session; + }; }; }; - environment.etc."greetd/environments".text = config.mods.greetd.environments; - # should technically be the same, but this is configured instead in order to provide a decent out of the box login experience. environment.etc."greetd/hyprgreet.conf".text = '' monitor=${config.mods.greetd.monitor},${config.mods.greetd.resolution},0x0,${config.mods.greetd.scale} @@ -118,8 +120,8 @@ disable_hyprland_logo = false } - "HYPRCURSOR_THEME,${config.mods.stylix.cursor.name}" - "HYPRCURSOR_SIZE,${toString config.mods.stylix.cursor.size}" + env="HYPRCURSOR_THEME,${config.mods.stylix.cursor.name}" + env="HYPRCURSOR_SIZE,${toString config.mods.stylix.cursor.size}" env=XCURSOR_THEME,${config.mods.stylix.cursor.name} env=XCURSOR_SIZE,${toString config.mods.stylix.cursor.size} env=QT_QPA_PLATFORMTHEME,qt5ct