diff options
author | Sarah Brofeldt <sbrofeldt@gmail.com> | 2019-08-23 16:25:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-23 16:25:13 +0200 |
commit | 3a64303a20a61847da217c8b2725e277a975c669 (patch) | |
tree | 9ccc086518d42ff346ba7ddf7ac9a9e6a01e8b41 /nixos | |
parent | 79c2ed6b603550501bc684aa768616a5bf3341a2 (diff) | |
parent | f2ea45461767eef7b1c03d130342902e4070fe45 (diff) |
Merge pull request #63539 from ivan/usbguard-nox
usbguard-nox: init at 0.7.4
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/security/usbguard.nix | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/nixos/modules/services/security/usbguard.nix b/nixos/modules/services/security/usbguard.nix index 88d2f69db5729..20d5e3b28eb9e 100644 --- a/nixos/modules/services/security/usbguard.nix +++ b/nixos/modules/services/security/usbguard.nix @@ -39,6 +39,16 @@ in { services.usbguard = { enable = mkEnableOption "USBGuard daemon"; + package = mkOption { + type = types.package; + default = pkgs.usbguard; + defaultText = "pkgs.usbguard"; + description = '' + The usbguard package to use. If you do not need the Qt GUI, use + <literal>pkgs.usbguard-nox</literal> to save disk space. + ''; + }; + ruleFile = mkOption { type = types.path; default = "/var/lib/usbguard/rules.conf"; @@ -179,7 +189,7 @@ in { config = mkIf cfg.enable { - environment.systemPackages = [ pkgs.usbguard ]; + environment.systemPackages = [ cfg.package ]; systemd.services.usbguard = { description = "USBGuard daemon"; @@ -195,7 +205,7 @@ in { serviceConfig = { Type = "simple"; - ExecStart = ''${pkgs.usbguard}/bin/usbguard-daemon -P -k -c ${daemonConfFile}''; + ExecStart = ''${cfg.package}/bin/usbguard-daemon -P -k -c ${daemonConfFile}''; Restart = "on-failure"; }; }; |