about summary refs log tree commit diff
path: root/modules/nmap.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/nmap.nix')
-rw-r--r--modules/nmap.nix50
1 files changed, 23 insertions, 27 deletions
diff --git a/modules/nmap.nix b/modules/nmap.nix
index 894dcb4..f3fe701 100644
--- a/modules/nmap.nix
+++ b/modules/nmap.nix
@@ -35,33 +35,29 @@ in
       };
 
       systemd.user = {
-        services.update-nmap-vulscan-lists = {
-          Service = {
-            ExecStart = lib.getExe (
-              pkgs.writeShellApplication {
-                name = "update-nmap-vulscan-lists";
-                runtimeInputs = [ pkgs.curl ];
-                text = ''
-                  declare -a vulscandbs=(
-                    "cve"
-                    "exploitdb"
-                    "openvas"
-                    "osvdb"
-                    "scipvuldb"
-                    "securityfocus"
-                    "securitytracker"
-                    "xforce"
-                  )
-                  for i in "''${vulscandbs[@]}"; do
-                    curl \
-                      -o "${config.my.home}/.nmap/scripts/vulscan/$i.csv" \
-                      "https://www.computec.ch/projekte/vulscan/download/$i.csv"
-                  done
-                '';
-              }
-            );
-          };
-        };
+        services.update-nmap-vulscan-lists.Service.ExecStart =
+          pkgs.writeShellApplication {
+            name = "update-nmap-vulscan-lists";
+            runtimeInputs = [ pkgs.curl ];
+            text = ''
+              declare -a vulscandbs=(
+                "cve"
+                "exploitdb"
+                "openvas"
+                "osvdb"
+                "scipvuldb"
+                "securityfocus"
+                "securitytracker"
+                "xforce"
+              )
+              for i in "''${vulscandbs[@]}"; do
+                curl \
+                  -o "${config.my.home}/.nmap/scripts/vulscan/$i.csv" \
+                  "https://www.computec.ch/projekte/vulscan/download/$i.csv"
+              done
+            '';
+          }
+          |> lib.getExe;
 
         timers.update-nmap-vulscan-lists = {
           Timer = {

Consider giving Nix/NixOS a try! <3