nixos/zmap: init module
The module installs `zmap` globally and links the config files to `/etc/zmap`, the default location of config files for zmap. The package provides pretty much a sensitive default, custom configs can be created like this: ``` { lib, ... }: { environment.etc."zmap/blacklist.conf" = lib.mkForce { text = '' # custom zmap blacklist 0.0.0.0/0 ''; }; } ```
This commit is contained in:
parent
ecafe8a7af
commit
3d6fe3d760
@ -144,6 +144,7 @@
|
||||
./programs/xonsh.nix
|
||||
./programs/xss-lock.nix
|
||||
./programs/yabar.nix
|
||||
./programs/zmap.nix
|
||||
./programs/zsh/oh-my-zsh.nix
|
||||
./programs/zsh/zsh.nix
|
||||
./programs/zsh/zsh-autoenv.nix
|
||||
|
18
nixos/modules/programs/zmap.nix
Normal file
18
nixos/modules/programs/zmap.nix
Normal file
@ -0,0 +1,18 @@
|
||||
{ pkgs, config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.programs.zmap;
|
||||
in {
|
||||
options.programs.zmap = {
|
||||
enable = mkEnableOption "ZMap";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [ pkgs.zmap ];
|
||||
|
||||
environment.etc."zmap/blacklist.conf".source = "${pkgs.zmap}/etc/zmap/blacklist.conf";
|
||||
environment.etc."zmap/zmap.conf".source = "${pkgs.zmap}/etc/zmap.conf";
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user