diff options
author | Jörg Thalheim <Mic92@users.noreply.github.com> | 2017-04-16 21:40:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-16 21:40:21 +0200 |
commit | 002a2b479a245d10691a394454f29e27d95de719 (patch) | |
tree | a793fa676c14f3f1d8ef66a154d865e1e7015a27 /nixos | |
parent | e760c7bd6a76ed27d156d7df3d493af2a9558f11 (diff) | |
parent | 7138b559189defc1426df800ca713d43a9aacbe7 (diff) |
Merge pull request #24486 from srp/master
slock needs suid privileges
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/module-list.nix | 1 | ||||
-rw-r--r-- | nixos/modules/programs/slock.nix | 26 |
2 files changed, 27 insertions, 0 deletions
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 0cd02d259e45..52de4b23370b 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -89,6 +89,7 @@ ./programs/nano.nix ./programs/oblogout.nix ./programs/screen.nix + ./programs/slock.nix ./programs/shadow.nix ./programs/shell.nix ./programs/spacefm.nix diff --git a/nixos/modules/programs/slock.nix b/nixos/modules/programs/slock.nix new file mode 100644 index 000000000000..0e1281e62cd7 --- /dev/null +++ b/nixos/modules/programs/slock.nix @@ -0,0 +1,26 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + cfg = config.programs.slock; + +in +{ + options = { + programs.slock = { + enable = mkOption { + default = false; + type = types.bool; + description = '' + Whether to install slock screen locker with setuid wrapper. + ''; + }; + }; + }; + + config = mkIf cfg.enable { + environment.systemPackages = [ pkgs.slock ]; + security.wrappers.slock.source = "${pkgs.slock.out}/bin/slock"; + }; +} |