refactor(registry): remove legacy endpoint helpers
This commit was merged in pull request #63.
This commit is contained in:
33
flake.nix
33
flake.nix
@@ -394,10 +394,6 @@
|
||||
pikachu = guestAddressConfig;
|
||||
};
|
||||
};
|
||||
fleetEndpoints = self.lib.networkEndpoints.collectFleetEndpoints {
|
||||
neogaia = hostAddressConfig;
|
||||
pikachu = guestAddressConfig;
|
||||
};
|
||||
in
|
||||
pkgs.runCommand "address-registry-check" { } ''
|
||||
${
|
||||
@@ -405,9 +401,6 @@
|
||||
!(
|
||||
registry.address.neogaia.self == "10.23.50.146"
|
||||
&& registry.address.pikachu.copyparty == "10.23.20.126"
|
||||
&& fleetEndpoints.neogaia.address == "10.23.50.146"
|
||||
&& fleetEndpoints."pikachu-copyparty".address == "10.23.20.126"
|
||||
&& !(fleetEndpoints ? pikachu)
|
||||
&& guestAddressConfig.config.containers.copyparty.config.systemd.network.networks."20-eth0".networkConfig.DHCP == "yes"
|
||||
)
|
||||
) "exit 1"
|
||||
@@ -415,7 +408,29 @@
|
||||
touch $out
|
||||
'';
|
||||
|
||||
reverse-proxy-fleet-routes =
|
||||
ssh-targets-use-address-registry =
|
||||
let
|
||||
neogaiaConfig = self.nixosConfigurations.neogaia.config;
|
||||
pikachuConfig = self.nixosConfigurations.pikachu.config;
|
||||
neogaiaUser = neogaiaConfig.user.name;
|
||||
neogaiaSsh = neogaiaConfig.home-manager.users.${neogaiaUser}.programs.ssh.settings;
|
||||
in
|
||||
pkgs.runCommand "ssh-targets-use-address-registry-check" { } ''
|
||||
${
|
||||
lib.optionalString (
|
||||
!(
|
||||
neogaiaConfig.registry.address.neogaia.self == "10.23.50.146"
|
||||
&& pikachuConfig.registry.address.pikachu.self == "10.23.10.102"
|
||||
&& neogaiaConfig.modules.ssh.targets.pikachu.hostName == pikachuConfig.registry.address.pikachu.self
|
||||
&& pikachuConfig.modules.ssh.targets.neogaia.hostName == neogaiaConfig.registry.address.neogaia.self
|
||||
&& neogaiaSsh.pikachu.data.HostName == pikachuConfig.registry.address.pikachu.self
|
||||
)
|
||||
) "exit 1"
|
||||
}
|
||||
touch $out
|
||||
'';
|
||||
|
||||
reverse-proxy-route-registry =
|
||||
let
|
||||
routeHost =
|
||||
lib.nixosSystem {
|
||||
@@ -455,7 +470,7 @@
|
||||
}).config;
|
||||
vhosts = testConfig.services.nginx.virtualHosts;
|
||||
in
|
||||
pkgs.runCommand "reverse-proxy-fleet-routes-check" { } ''
|
||||
pkgs.runCommand "reverse-proxy-route-registry-check" { } ''
|
||||
${
|
||||
lib.optionalString (
|
||||
!(
|
||||
|
||||
Reference in New Issue
Block a user