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

@ -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 = { };
})
];