summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorIvan Kozik <ivan@ludios.org>2019-06-19 20:29:46 +0000
committerIvan Kozik <ivan@ludios.org>2019-06-20 13:49:47 +0000
commitf2ea45461767eef7b1c03d130342902e4070fe45 (patch)
tree1d686a9afa52503e0e950983af4bdc85a29fb218 /nixos
parentf399f890dd4f8b79840cbf59f2b7e7577980ee18 (diff)
downloadnixpkgs-f2ea45461767eef7b1c03d130342902e4070fe45.tar
nixpkgs-f2ea45461767eef7b1c03d130342902e4070fe45.tar.gz
nixpkgs-f2ea45461767eef7b1c03d130342902e4070fe45.tar.bz2
nixpkgs-f2ea45461767eef7b1c03d130342902e4070fe45.tar.lz
nixpkgs-f2ea45461767eef7b1c03d130342902e4070fe45.tar.xz
nixpkgs-f2ea45461767eef7b1c03d130342902e4070fe45.tar.zst
nixpkgs-f2ea45461767eef7b1c03d130342902e4070fe45.zip
usbguard-nox: init at 0.7.4
This is just usbguard without the Qt GUI that brings in Qt dependencies.

Remove pandoc to reduce closure size. The usbguard build appears to
use it only for spell checking.

Remove asciidoctor because 0.7.1 switched to asciidoc. But don't add
a dependency on asciidoc, because that causes the build fails on
external DTDs.
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/security/usbguard.nix14
1 files changed, 12 insertions, 2 deletions
diff --git a/nixos/modules/services/security/usbguard.nix b/nixos/modules/services/security/usbguard.nix
index 88d2f69db57..20d5e3b28eb 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";
       };
     };