diff options
author | Azat Bahawi <azat@bahawi.net> | 2023-11-25 18:09:05 +0300 |
---|---|---|
committer | Azat Bahawi <azat@bahawi.net> | 2023-11-25 18:09:05 +0300 |
commit | e2cc46b37e33643cf3dd017adb8a009bf143e246 (patch) | |
tree | 86f24ea544e9ed75bf8736c951a09dfdb2219f5d /modules/common/nmap.nix | |
parent | 2023-11-23 (diff) |
2023-11-25
Diffstat (limited to '')
-rw-r--r-- | modules/common/nmap.nix | 46 |
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 + ''; + }); }; }; |