CrOS/hosts/common/core/nebula.nix
TheWanderingCrow b8eb01ba9d nebula work
2025-07-27 17:59:34 -04:00

19 lines
615 B
Nix

{
config,
lib,
inputs,
...
}: let
s = inputs.nix-secrets.network.mesh;
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 [];
services.nebula.networks.wce = lib.mkIf (builtins.hasAttr "${config.hostSpec.hostName}" s.hosts) {
inherit (s) ca lighthouses staticHostMap;
inherit (s.hosts.${config.hostSpec.hostName}) key cert isLighthouse firewall;
enable = true;
};
}