restructure desktop with option config wrappers
This commit is contained in:
@@ -6,9 +6,8 @@
|
|||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
#./hardware-configuration.nix
|
#./hardware-configuration.nix
|
||||||
../../nixos
|
../../nixos
|
||||||
../../../modules/desktop/hypr
|
|
||||||
../../../modules/desktop/greetd
|
|
||||||
../../../users/blake
|
../../../users/blake
|
||||||
|
../../../modules/desktop
|
||||||
../../../modules/system
|
../../../modules/system
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -28,6 +27,11 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
desktop = {
|
||||||
|
hypr.enable = true;
|
||||||
|
greetd.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
# fix power buttons
|
# fix power buttons
|
||||||
services.logind.settings.Login = {
|
services.logind.settings.Login = {
|
||||||
HandlePowerKey = "suspend";
|
HandlePowerKey = "suspend";
|
||||||
|
|||||||
@@ -3,25 +3,32 @@
|
|||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}: {
|
}: let
|
||||||
|
cfg = config.desktop.greetd;
|
||||||
|
in {
|
||||||
|
options.desktop.hypr = {
|
||||||
|
enable = lib.mkEnableOption "enable greetd with tuigreet";
|
||||||
|
};
|
||||||
|
|
||||||
services.greetd = {
|
config = lib.mkIf cfg.enable {
|
||||||
enable = true;
|
services.greetd = {
|
||||||
# tuigreet command to run
|
enable = true;
|
||||||
settings = {
|
# tuigreet command to run
|
||||||
default_session = {
|
settings = {
|
||||||
user = "greeter";
|
default_session = {
|
||||||
command = "${pkgs.tuigreet}/bin/tuigreet -c Hyprland -t --greeting \"howdy o/\" --user-menu --remember --remember-user-session --power-shutdown \"systemctl poweroff\" --power-reboot \"systemctl reboot\"";
|
user = "greeter";
|
||||||
|
command = "${pkgs.tuigreet}/bin/tuigreet -c Hyprland -t --greeting \"howdy o/\" --user-menu --remember --remember-user-session --power-shutdown \"systemctl poweroff\" --power-reboot \"systemctl reboot\"";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
# allow yubikey signin with u2f
|
# allow yubikey signin with u2f
|
||||||
security.pam.services.greetd.u2fAuth = true;
|
security.pam.services.greetd.u2fAuth = true;
|
||||||
|
|
||||||
# ensure the user exists
|
# ensure the user exists
|
||||||
users.users.greeter = {
|
users.users.greeter = {
|
||||||
isSystemUser = true;
|
isSystemUser = true;
|
||||||
description = "user for greetd";
|
description = "user for greetd";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,12 +3,18 @@
|
|||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}: {
|
}: let
|
||||||
|
cfg = config.desktop.hypr;
|
||||||
|
in {
|
||||||
|
options.desktop.hypr = {
|
||||||
|
enable = lib.mkEnableOption "enable hypr on nixos side";
|
||||||
|
};
|
||||||
|
|
||||||
# enable hyprland
|
config = lib.mkIf cfg.enable {
|
||||||
programs.hyprland.enable = true;
|
# enable hyprland
|
||||||
|
programs.hyprland.enable = true;
|
||||||
|
|
||||||
|
# give hyprlock perms to unlock
|
||||||
# give hyprlock perms to unlock
|
security.pam.services.hyprlock = {};
|
||||||
security.pam.services.hyprlock = {};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user