Use displaySessions for display manager

This commit is contained in:
DashieTM 2025-02-23 12:54:28 +01:00
parent 6c1aff4c0e
commit 7e54da92b9
3 changed files with 23 additions and 21 deletions

View file

@ -50,8 +50,8 @@ in {
set EDITOR "neovide --no-fork" set EDITOR "neovide --no-fork"
alias rebuild='nh os switch' alias rebuild='nh os switch -- --accept-flake-config'
alias update='nix flake update --flake $FLAKE' alias update='nix flake update --flake $FLAKE --accept-flake-config'
abbr --add ls 'lsd' abbr --add ls 'lsd'
abbr --add :q 'exit' abbr --add :q 'exit'
abbr --add gh 'git push origin' abbr --add gh 'git push origin'

View file

@ -31,7 +31,7 @@
default = true; default = true;
example = false; example = false;
type = lib.types.bool; type = lib.types.bool;
description = "Whether to use the xanmod kernel"; description = "Whether to use the CachyOS kernel";
}; };
steam = lib.mkOption { steam = lib.mkOption {
default = true; default = true;

View file

@ -43,15 +43,16 @@
''; '';
}; };
environments = lib.mkOption { environments = lib.mkOption {
default = '' default = [
Hyprland inputs.hyprland.packages.${config.conf.system}.hyprland
''; ];
# no idea if these are written correctly # no idea if these are written correctly
example = '' example = [
Niri pkgs.niri
River pkgs.river
''; pkgs.swayfx
type = lib.types.lines; ];
type = with lib.types; listOf package;
description = '' description = ''
List of environments that should be available in the login prompt. List of environments that should be available in the login prompt.
''; '';
@ -85,23 +86,24 @@
manage = "desktop"; manage = "desktop";
name = "Hyprland"; name = "Hyprland";
start = '' start = ''
${lib.getExe pkgs.hyprland} & waitPID=$! ${inputs.hyprland.packages.${config.conf.system}.hyprland} & waitPID=$!
''; '';
} }
]; ];
# greetd display manager # greetd display manager
programs.hyprland.enable = true; programs.hyprland.enable = true;
services.greetd = { services = {
enable = true; displayManager.sessionPackages = config.mods.greetd.environments;
settings = { greetd = {
terminal.vt = 1; enable = true;
default_session = session; 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. # 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 = '' environment.etc."greetd/hyprgreet.conf".text = ''
monitor=${config.mods.greetd.monitor},${config.mods.greetd.resolution},0x0,${config.mods.greetd.scale} monitor=${config.mods.greetd.monitor},${config.mods.greetd.resolution},0x0,${config.mods.greetd.scale}
@ -118,8 +120,8 @@
disable_hyprland_logo = false disable_hyprland_logo = false
} }
"HYPRCURSOR_THEME,${config.mods.stylix.cursor.name}" env="HYPRCURSOR_THEME,${config.mods.stylix.cursor.name}"
"HYPRCURSOR_SIZE,${toString config.mods.stylix.cursor.size}" env="HYPRCURSOR_SIZE,${toString config.mods.stylix.cursor.size}"
env=XCURSOR_THEME,${config.mods.stylix.cursor.name} env=XCURSOR_THEME,${config.mods.stylix.cursor.name}
env=XCURSOR_SIZE,${toString config.mods.stylix.cursor.size} env=XCURSOR_SIZE,${toString config.mods.stylix.cursor.size}
env=QT_QPA_PLATFORMTHEME,qt5ct env=QT_QPA_PLATFORMTHEME,qt5ct