mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-11 08:13:04 +00:00
3d6fe3d760
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 ''; }; } ```
19 lines
401 B
Nix
19 lines
401 B
Nix
{ 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";
|
|
};
|
|
}
|