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.nix11
1 files changed, 5 insertions, 6 deletions
diff --git a/modules/nmap.nix b/modules/nmap.nix
index c358e71..894dcb4 100644
--- a/modules/nmap.nix
+++ b/modules/nmap.nix
@@ -5,14 +5,13 @@
   inputs,
   ...
 }:
-with lib;
 let
   cfg = config.nixfiles.modules.nmap;
 in
 {
-  options.nixfiles.modules.nmap.enable = mkEnableOption "Nmap";
+  options.nixfiles.modules.nmap.enable = lib.mkEnableOption "Nmap";
 
-  config = mkIf cfg.enable {
+  config = lib.mkIf cfg.enable {
     nixfiles.modules.common.shell.aliases = {
       nmap-vulners = "nmap -sV --script=vulners/vulners.nse";
       nmap-vulscan = "nmap -sV --script=vulscan/vulscan.nse";
@@ -30,15 +29,15 @@ in
           nmap-formatter
         ];
 
-        activation.regenerateNmapScripts = with pkgs; ''
-          ${getExe' nmap "nmap"} --script-updatedb
+        activation.regenerateNmapScripts = ''
+          ${lib.getExe' pkgs.nmap "nmap"} --script-updatedb
         '';
       };
 
       systemd.user = {
         services.update-nmap-vulscan-lists = {
           Service = {
-            ExecStart = getExe (
+            ExecStart = lib.getExe (
               pkgs.writeShellApplication {
                 name = "update-nmap-vulscan-lists";
                 runtimeInputs = [ pkgs.curl ];

Consider giving Nix/NixOS a try! <3