From 59180328cda59817d71cd58c8f48ead047375064 Mon Sep 17 00:00:00 2001 From: azahi Date: Mon, 17 Feb 2025 02:21:56 +0300 Subject: 2025-02-17 --- modules/nmap.nix | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'modules/nmap.nix') 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 ]; -- cgit 1.4.1