refactor(nixos/desktop): move hyprlock config to nixos module
This commit is contained in:
parent
fba8f1bfdd
commit
a654a6b9b6
5 changed files with 60 additions and 51 deletions
|
@ -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 = { };
|
||||
})
|
||||
];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue