Add swaylock
This commit is contained in:
parent
acb3968daf
commit
d1366a95c6
3 changed files with 23 additions and 0 deletions
17
modules/services/swaylock.nix
Normal file
17
modules/services/swaylock.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.services.swaylock;
|
||||
in
|
||||
{
|
||||
options.services.swaylock = {
|
||||
enable = mkEnableOption "Enable swaylock";
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.swaylock;
|
||||
};
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
security.pam.services.swaylock.text = readFile "${cfg.package}/etc/pam.d/swaylock";
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue