summary refs log tree commit diff
path: root/nixos/modules/services/security/fprot.nix
diff options
context:
space:
mode:
authorRenaud <c0bw3b@users.noreply.github.com>2022-03-02 20:51:47 +0100
committerGitHub <noreply@github.com>2022-03-02 21:51:47 +0200
commit671a068a0166a5474e51b4d151b64250f8feaec8 (patch)
tree3620c98ac6a944927ac4dbdbc25a10fb04a9fe54 /nixos/modules/services/security/fprot.nix
parent6fc2b4b5e923501d0540e35edf5937c7ea6a52bd (diff)
downloadnixpkgs-671a068a0166a5474e51b4d151b64250f8feaec8.tar
nixpkgs-671a068a0166a5474e51b4d151b64250f8feaec8.tar.gz
nixpkgs-671a068a0166a5474e51b4d151b64250f8feaec8.tar.bz2
nixpkgs-671a068a0166a5474e51b4d151b64250f8feaec8.tar.lz
nixpkgs-671a068a0166a5474e51b4d151b64250f8feaec8.tar.xz
nixpkgs-671a068a0166a5474e51b4d151b64250f8feaec8.tar.zst
nixpkgs-671a068a0166a5474e51b4d151b64250f8feaec8.zip
Remove F-PROT package and service module (EoL) (#160372)
Diffstat (limited to 'nixos/modules/services/security/fprot.nix')
-rw-r--r--nixos/modules/services/security/fprot.nix82
1 files changed, 0 insertions, 82 deletions
diff --git a/nixos/modules/services/security/fprot.nix b/nixos/modules/services/security/fprot.nix
deleted file mode 100644
index df60d553e85..00000000000
--- a/nixos/modules/services/security/fprot.nix
+++ /dev/null
@@ -1,82 +0,0 @@
-{ config, lib, pkgs, ... }:
-with lib;
-let
-  fprotUser = "fprot";
-  stateDir = "/var/lib/fprot";
-  fprotGroup = fprotUser;
-  cfg = config.services.fprot;
-in {
-  options = {
-
-    services.fprot = {
-      updater = {
-        enable = mkEnableOption "automatic F-Prot virus definitions database updates";
-
-        productData = mkOption {
-          description = ''
-            product.data file. Defaults to the one supplied with installation package.
-          '';
-          type = types.path;
-        };
-
-        frequency = mkOption {
-          default = 30;
-          type = types.int;
-          description = ''
-            Update virus definitions every X minutes.
-          '';
-        };
-
-        licenseKeyfile = mkOption {
-          type = types.path;
-          description = ''
-            License keyfile. Defaults to the one supplied with installation package.
-          '';
-        };
-
-      };
-    };
-  };
-
-  ###### implementation
-
-  config = mkIf cfg.updater.enable {
-
-    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."f-prot.conf" = {
-      source = "${pkgs.fprot}/opt/f-prot/f-prot.conf";
-    };
-
-    users.users.${fprotUser} =
-      { uid = config.ids.uids.fprot;
-        description = "F-Prot daemon user";
-        home = stateDir;
-      };
-
-    users.groups.${fprotGroup} =
-      { gid = config.ids.gids.fprot; };
-
-    services.cron.systemCronJobs = [ "*/${toString cfg.updater.frequency} * * * * root start fprot-updater" ];
-
-    systemd.services.fprot-updater = {
-      serviceConfig = {
-        Type = "oneshot";
-        RemainAfterExit = false;
-      };
-      wantedBy = [ "multi-user.target" ];
-
-      # 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
-      '';
-
-      script = "/var/lib/fprot/fpupdate --keyfile ${cfg.updater.licenseKeyfile}";
-    };
- };
-}