mirror of
https://github.com/hyprwm/hyprlock.git
synced 2024-11-16 23:05:58 +01:00
Nix/HM module: add security.pam instructions
This commit is contained in:
parent
4286cfb29c
commit
97548ec0ad
1 changed files with 26 additions and 6 deletions
|
@ -9,11 +9,31 @@ self: {
|
||||||
inherit (lib.modules) mkIf;
|
inherit (lib.modules) mkIf;
|
||||||
inherit (lib.options) mkOption mkEnableOption;
|
inherit (lib.options) mkOption mkEnableOption;
|
||||||
|
|
||||||
boolToString = x: if x then "true" else "false";
|
boolToString = x:
|
||||||
|
if x
|
||||||
|
then "true"
|
||||||
|
else "false";
|
||||||
cfg = config.programs.hyprlock;
|
cfg = config.programs.hyprlock;
|
||||||
in {
|
in {
|
||||||
options.programs.hyprlock = {
|
options.programs.hyprlock = {
|
||||||
enable = mkEnableOption "Hyprlock, Hyprland's GPU-accelerated lock screen utility";
|
enable =
|
||||||
|
mkEnableOption ""
|
||||||
|
// {
|
||||||
|
description = ''
|
||||||
|
Whether to enable Hyprlock, Hyprland's GPU-accelerated lock screen utility.
|
||||||
|
|
||||||
|
Note that PAM must be configured to enable hyprlock to perform
|
||||||
|
authentication. The package installed through home-manager
|
||||||
|
will *not* be able to unlock the session without this
|
||||||
|
configuration.
|
||||||
|
|
||||||
|
On NixOS, it can be enabled using:
|
||||||
|
|
||||||
|
```nix
|
||||||
|
security.pam.services.hyprlock = {};
|
||||||
|
```
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
description = "The hyprlock package";
|
description = "The hyprlock package";
|
||||||
|
@ -110,7 +130,7 @@ in {
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
default = [
|
default = [
|
||||||
{ }
|
{}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -224,7 +244,7 @@ in {
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
default = [
|
default = [
|
||||||
{ }
|
{}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -290,13 +310,13 @@ in {
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
default = [
|
default = [
|
||||||
{ }
|
{}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home.packages = [ cfg.package ];
|
home.packages = [cfg.package];
|
||||||
|
|
||||||
xdg.configFile."hypr/hyprlock.conf".text = ''
|
xdg.configFile."hypr/hyprlock.conf".text = ''
|
||||||
general {
|
general {
|
||||||
|
|
Loading…
Reference in a new issue