🚚 renaming

This commit is contained in:
Ingolf Wagner 2024-09-13 14:36:17 +07:00
parent 7ef34db19b
commit f49730a0a9
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B
3 changed files with 8 additions and 5 deletions

View file

@ -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
];

View file

@ -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
'';
};

View file

@ -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 = ''