greetd uwsm changes

This commit is contained in:
cnst
2024-11-25 19:16:07 +01:00
parent 13d2c4b482
commit fdd3f1c42b

View File

@@ -6,6 +6,7 @@
}: let }: let
inherit (lib) mkIf mkEnableOption mkMerge mkOption types; inherit (lib) mkIf mkEnableOption mkMerge mkOption types;
cfg = config.nixos.services.greetd; cfg = config.nixos.services.greetd;
host = config.networking.hostName;
in { in {
options = { options = {
nixos.services.greetd = { nixos.services.greetd = {
@@ -22,31 +23,45 @@ in {
}; };
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable (mkMerge [
services.greetd = let {
session = { services.greetd = let
command = "${lib.getExe config.programs.uwsm.package} start hyprland-uwsm.desktop"; session = {
user = cfg.user; command = "${lib.getExe config.programs.uwsm.package} start hyprland-uwsm.desktop";
user = cfg.user;
};
in {
enable = true;
settings = {
terminal.vt = 1;
default_session = session;
initial_session = session;
};
}; };
in { }
enable = true;
settings = {
terminal.vt = 1;
default_session = session;
initial_session = session;
};
};
programs.uwsm = { (mkIf (host == "cnix") {
enable = true; programs.uwsm = {
waylandCompositors.hyprland = { enable = true;
binPath = "/run/current-system/sw/bin/Hyprland"; waylandCompositors.hyprland = {
prettyName = "Hyprland"; binPath = "/etc/profiles/per-user/cnst/bin/Hyprland";
comment = "Hyprland managed by UWSM"; prettyName = "Hyprland";
comment = "Hyprland managed by UWSM";
};
}; };
}; })
(mkIf (host == "toothpc") {
programs.uwsm = {
enable = true;
waylandCompositors.hyprland = {
binPath = "/etc/profiles/per-user/toothpick/bin/Hyprland";
prettyName = "Hyprland";
comment = "Hyprland managed by UWSM";
};
};
})
# Apply GnomeKeyring PAM Service based on user configuration # Apply GnomeKeyring PAM Service based on user configuration
# security.pam.services.greetd.enableGnomeKeyring = cfg.gnomeKeyring.enable; # security.pam.services.greetd.enableGnomeKeyring = cfg.gnomeKeyring.enable;
}; ]);
} }