refactor(nixos/desktop): move hyprlock config to nixos module

This commit is contained in:
Mohammad Rafiq 2025-06-13 21:46:18 +08:00
parent fba8f1bfdd
commit a654a6b9b6
No known key found for this signature in database
5 changed files with 60 additions and 51 deletions

View file

@ -17,7 +17,6 @@
refresh-rate = lib.pantheon.mkStrOption;
};
windowManager = lib.pantheon.mkStrOption;
lockscreen = lib.pantheon.mkStrOption;
terminal = lib.pantheon.mkStrOption;
notification-daemon = lib.pantheon.mkStrOption;
launcher = lib.pantheon.mkStrOption;

View file

@ -1,7 +1,15 @@
{ config, lib, ... }:
let
inherit (lib) mkEnableOption mkIf mkMerge;
cfg = config.desktop.lockscreen;
in
{
config = lib.mkMerge [
(lib.mkIf (config.desktop.lockscreen == "hyprlock") {
options.desktop.lockscreen = {
hyprlock.enable = mkEnableOption "";
};
config = mkMerge [
(mkIf cfg.hyprlock.enable {
security.pam.services.hyprlock = { };
})
];