summary refs log tree commit diff
path: root/nixos/modules/services/security/fprot.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-04-09 00:17:16 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-04-09 00:17:16 +0200
commit2bb8d963b1b5b3925f22efdd3dbecbbad2961425 (patch)
treed9117cabb8a9bf08355e580bf0dca539071a8d7c /nixos/modules/services/security/fprot.nix
parent331fa06c79ff562fbf39ff842404fd316a6e81bb (diff)
downloadnixpkgs-2bb8d963b1b5b3925f22efdd3dbecbbad2961425.tar
nixpkgs-2bb8d963b1b5b3925f22efdd3dbecbbad2961425.tar.gz
nixpkgs-2bb8d963b1b5b3925f22efdd3dbecbbad2961425.tar.bz2
nixpkgs-2bb8d963b1b5b3925f22efdd3dbecbbad2961425.tar.lz
nixpkgs-2bb8d963b1b5b3925f22efdd3dbecbbad2961425.tar.xz
nixpkgs-2bb8d963b1b5b3925f22efdd3dbecbbad2961425.tar.zst
nixpkgs-2bb8d963b1b5b3925f22efdd3dbecbbad2961425.zip
Die tabs die
Diffstat (limited to 'nixos/modules/services/security/fprot.nix')
-rw-r--r--nixos/modules/services/security/fprot.nix72
1 files changed, 36 insertions, 36 deletions
diff --git a/nixos/modules/services/security/fprot.nix b/nixos/modules/services/security/fprot.nix
index a109191be55..5f8d398996f 100644
--- a/nixos/modules/services/security/fprot.nix
+++ b/nixos/modules/services/security/fprot.nix
@@ -10,31 +10,31 @@ in {
 
     services.fprot = {
       updater = {
-	enable = mkOption {
-	  default = false;
-	  description = ''
-	    Whether to enable automatic F-Prot virus definitions database updates.
-	  '';
-	};
-
-	productData = mkOption {
-	  description = ''
-	    product.data file. Defaults to the one supplied with installation package.
-	  '';
-	};
-
-	frequency = mkOption {
-	  default = 30;
-	  description = ''
-	    Update virus definitions every X minutes.
-	  '';
-	};
-
-	licenseKeyfile = mkOption {
-	  description = ''
-	    License keyfile. Defaults to the one supplied with installation package.
-	  '';
-	};
+        enable = mkOption {
+          default = false;
+          description = ''
+            Whether to enable automatic F-Prot virus definitions database updates.
+          '';
+        };
+
+        productData = mkOption {
+          description = ''
+            product.data file. Defaults to the one supplied with installation package.
+          '';
+        };
+
+        frequency = mkOption {
+          default = 30;
+          description = ''
+            Update virus definitions every X minutes.
+          '';
+        };
+
+        licenseKeyfile = mkOption {
+          description = ''
+            License keyfile. Defaults to the one supplied with installation package.
+          '';
+        };
 
       };
     };
@@ -44,8 +44,8 @@ in {
 
   config = mkIf cfg.updater.enable {
 
-    services.fprot.updater.productData = "${pkgs.fprot}/opt/f-prot/product.data";
-    services.fprot.updater.licenseKeyfile = "${pkgs.fprot}/opt/f-prot/license.key";
+    services.fprot.updater.productData = mkDefault "${pkgs.fprot}/opt/f-prot/product.data";
+    services.fprot.updater.licenseKeyfile = mkDefault "${pkgs.fprot}/opt/f-prot/license.key";
 
     environment.systemPackages = [ pkgs.fprot ];
     environment.etc = singleton {
@@ -69,22 +69,22 @@ in {
 
     jobs = {
       fprot_updater = {
-	name = "fprot-updater";
-	  task = true;
+        name = "fprot-updater";
+          task = true;
 
-	  # have to copy fpupdate executable because it insists on storing the virus database in the same dir
+          # have to copy fpupdate executable because it insists on storing the virus database in the same dir
           preStart = ''
             mkdir -m 0755 -p ${stateDir}
             chown ${fprotUser}:${fprotGroup} ${stateDir}
-	    cp ${pkgs.fprot}/opt/f-prot/fpupdate ${stateDir}
-	    ln -sf ${cfg.updater.productData} ${stateDir}/product.data
+            cp ${pkgs.fprot}/opt/f-prot/fpupdate ${stateDir}
+            ln -sf ${cfg.updater.productData} ${stateDir}/product.data
           '';
-	  #setuid = fprotUser;
-	  #setgid = fprotGroup;
+          #setuid = fprotUser;
+          #setgid = fprotGroup;
           exec = "/var/lib/fprot/fpupdate --keyfile ${cfg.updater.licenseKeyfile}";
-      }; 
+      };
     };
 
  };
 
-}
\ No newline at end of file
+}