mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 12:51:34 +01:00
nebula: Assert routability of lighthouses
This commit is contained in:
parent
d58da5ce7d
commit
de16ca49e8
1 changed files with 5 additions and 0 deletions
|
|
@ -55,6 +55,11 @@ in
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
meta.ports.udp = lib.optional (cfg.routablePort != null) cfg.routablePort;
|
meta.ports.udp = lib.optional (cfg.routablePort != null) cfg.routablePort;
|
||||||
|
|
||||||
|
assertions = lib.singleton {
|
||||||
|
assertion = cfg.isLighthouse -> cfg.routableAddress != null;
|
||||||
|
message = "'${hostname}' is a Nebula lighthouse, but routableAddress is not set. Lighthouses must be publicly reachable.";
|
||||||
|
};
|
||||||
|
|
||||||
sops.secrets."nebula/host-key" = {
|
sops.secrets."nebula/host-key" = {
|
||||||
owner = config.users.users.nebula-main.name;
|
owner = config.users.users.nebula-main.name;
|
||||||
restartUnits = [ "nebula@main.service" ];
|
restartUnits = [ "nebula@main.service" ];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue