about summary refs log tree commit diff
path: root/modules/common/nmap.nix
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2023-11-25 18:09:05 +0300
committerAzat Bahawi <azat@bahawi.net>2023-11-25 18:09:05 +0300
commite2cc46b37e33643cf3dd017adb8a009bf143e246 (patch)
tree86f24ea544e9ed75bf8736c951a09dfdb2219f5d /modules/common/nmap.nix
parent2023-11-23 (diff)
2023-11-25
Diffstat (limited to '')
-rw-r--r--modules/common/nmap.nix46
1 files changed, 21 insertions, 25 deletions
diff --git a/modules/common/nmap.nix b/modules/common/nmap.nix
index 6c6192c..85beb21 100644
--- a/modules/common/nmap.nix
+++ b/modules/common/nmap.nix
@@ -33,31 +33,27 @@ in {
       systemd.user = {
         services.update-nmap-vulscan-lists = {
           Service = {
-            ExecStart = let
-              pkg = with pkgs;
-                writeShellApplication {
-                  name = "update-nmap-vulscan-lists";
-                  runtimeInputs = [curl];
-                  text = ''
-                    declare -a vulscandbs=(
-                      "cve"
-                      "exploitdb"
-                      "openvas"
-                      "osvdb"
-                      "scipvuldb"
-                      "securityfocus"
-                      "securitytracker"
-                      "xforce"
-                    )
-                    for i in "''${vulscandbs[@]}"; do
-                      ${getExe curl} \
-                        -o "${config.my.home}/.nmap/scripts/vulscan/$i.csv" \
-                        "https://www.computec.ch/projekte/vulscan/download/$i.csv"
-                    done
-                  '';
-                };
-            in
-              getExe pkg;
+            ExecStart = 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
+              '';
+            });
           };
         };
 

Consider giving Nix/NixOS a try! <3