restructure desktop with option config wrappers

This commit is contained in:
2025-11-05 18:40:25 -06:00
parent f448ce43ec
commit 8c4a82a73f
3 changed files with 40 additions and 23 deletions

View File

@@ -6,9 +6,8 @@
(modulesPath + "/installer/scan/not-detected.nix")
#./hardware-configuration.nix
../../nixos
../../../modules/desktop/hypr
../../../modules/desktop/greetd
../../../users/blake
../../../modules/desktop
../../../modules/system
];
@@ -28,6 +27,11 @@
};
};
desktop = {
hypr.enable = true;
greetd.enable = true;
};
# fix power buttons
services.logind.settings.Login = {
HandlePowerKey = "suspend";

View File

@@ -3,8 +3,14 @@
lib,
config,
...
}: {
}: let
cfg = config.desktop.greetd;
in {
options.desktop.hypr = {
enable = lib.mkEnableOption "enable greetd with tuigreet";
};
config = lib.mkIf cfg.enable {
services.greetd = {
enable = true;
# tuigreet command to run
@@ -24,4 +30,5 @@
isSystemUser = true;
description = "user for greetd";
};
};
}

View File

@@ -3,12 +3,18 @@
lib,
config,
...
}: {
}: let
cfg = config.desktop.hypr;
in {
options.desktop.hypr = {
enable = lib.mkEnableOption "enable hypr on nixos side";
};
config = lib.mkIf cfg.enable {
# enable hyprland
programs.hyprland.enable = true;
# give hyprlock perms to unlock
security.pam.services.hyprlock = {};
};
}