build out mesh some

This commit is contained in:
TheWanderingCrow 2025-07-24 10:12:31 -04:00
parent b83d6c3041
commit 6c4a91c31d

View file

@ -2,18 +2,12 @@
config,
lib,
inputs,
hostSpec,
...
}: let
s = inputs.nix-secrets.network.mesh;
in
if builtins.hasAttr "${hostSpec.hostName}" s.hosts
then lib.warn "Hey you don't have a nebula host config for this host, we'll still build but you should fix this ASAP since you won't be inside the mesh. If you don't know how to do this please talk to your computer administrator (me haha)"
else {
services.nebula.networks.wce = {
inherit (s) ca;
inherit (s.hostSpec.hostName) cert key;
enable = true;
isLighthouse = lib.mkDefault false;
};
}
in {
warnings =
if !builtins.hasAttr "${config.hostSpec.hostName}" s.hosts
then [''Hey you don't have a nebula config for this host, you should fix this ASAP so you can be connected to the mesh. If you don't know how to do this then contact your admin'']
else [];
}