🚚 renaming
This commit is contained in:
parent
7ef34db19b
commit
f49730a0a9
3 changed files with 8 additions and 5 deletions
|
@ -172,7 +172,7 @@
|
|||
++ [
|
||||
./machines/${name}/configuration.nix
|
||||
nix-topology.nixosModules.default
|
||||
self.nixosModules.scan
|
||||
self.nixosModules.verify
|
||||
];
|
||||
};
|
||||
|
||||
|
@ -377,7 +377,7 @@
|
|||
clan-core.flakeModules.default
|
||||
./nix/formatter.nix
|
||||
./nix/packages
|
||||
./nix/scan
|
||||
./nix/verify
|
||||
./nix/topology
|
||||
];
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
{
|
||||
imports = [ ];
|
||||
|
||||
flake.nixosModules.scan = {
|
||||
flake.nixosModules.verify = {
|
||||
imports = [ ./module.nix ];
|
||||
};
|
||||
|
||||
|
@ -15,14 +15,16 @@
|
|||
}:
|
||||
with lib;
|
||||
{
|
||||
apps.scan = {
|
||||
apps.verify = {
|
||||
type = "app";
|
||||
program =
|
||||
let
|
||||
ports = machine: self.nixosConfigurations.${machine}.options.verify.closed.value.public.ports;
|
||||
domain = machine: self.nixosConfigurations.${machine}.options.verify.closed.value.public.domain;
|
||||
in
|
||||
pkgs.writers.writeBashBin "scan" ''
|
||||
|
||||
# todo : create an alert if one of the ports should not be accessible
|
||||
pkgs.writers.writeBashBin "verify" ''
|
||||
${pkgs.rustscan}/bin/rustscan --ports ${concatStringsSep "," (map toString (ports "orbi"))} --addresses ${domain "orbi"} --greppable
|
||||
'';
|
||||
};
|
|
@ -12,6 +12,7 @@ with types;
|
|||
domain to scan
|
||||
'';
|
||||
};
|
||||
# todo: make this an attrs so I know why port xyz should be closed.
|
||||
ports = mkOption {
|
||||
type = listOf int;
|
||||
description = ''
|
Loading…
Reference in a new issue