nixos-config/nix/verify/modules/closed.nix
Ingolf Wagner 7e8c3d41c9
Some checks failed
Build all NixOS Configurations / nix build (push) Has been cancelled
🚸 improve verify flake
2024-09-15 06:09:53 +07:00

54 lines
1.1 KiB
Nix

{ lib, ... }:
with lib;
with types;
{
options.verify.closed = mkOption {
default = { };
example = {
public = {
host = "example.com";
ports = {
arr = [
7878
8989
8686
];
};
};
work_vpn = {
host = "10.1.1.100";
ports = {
arr = [
7878
8989
8686
];
};
};
};
description = ''
Verify that ports the defined ports are closed for a specific interface.
Verification is done by rustscan.
'';
type = attrsOf (submodule {
options = {
host = mkOption {
type = str;
description = ''
The host against which the rustscan will be done.
Needed because we have more than interface on the machine.
'';
};
ports = mkOption {
default = { };
type = attrsOf (listOf int);
description = ''
service -> [port, ... ]
Ports that should be verified as beeing closed.
'';
};
};
});
};
}