This commit is contained in:
陈浩南 2023-08-31 18:53:48 +08:00
parent 9aab39149a
commit fe0130fa9d
2 changed files with 13 additions and 25 deletions

View File

@ -76,22 +76,6 @@
}
},
"flake-compat_3": {
"flake": false,
"locked": {
"lastModified": 1687265871,
"narHash": "sha256-P8AOiQk/XN8/ia4289hDHlTfWB70cRQ5pc9GRfmEdpc=",
"owner": "inclyc",
"repo": "flake-compat",
"rev": "70e56389c58bbd300d11778913b255477ebbae22",
"type": "github"
},
"original": {
"owner": "inclyc",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_4": {
"flake": false,
"locked": {
"lastModified": 1673956053,
@ -107,7 +91,7 @@
"type": "github"
}
},
"flake-compat_5": {
"flake-compat_4": {
"flake": false,
"locked": {
"lastModified": 1673956053,
@ -434,7 +418,7 @@
},
"nix-alien": {
"inputs": {
"flake-compat": "flake-compat_4",
"flake-compat": "flake-compat_3",
"flake-utils": "flake-utils_2",
"nix-index-database": [
"nix-index-database"
@ -477,7 +461,7 @@
},
"nix-vscode-extensions": {
"inputs": {
"flake-compat": "flake-compat_5",
"flake-compat": "flake-compat_4",
"flake-utils": "flake-utils_3",
"nixpkgs": [
"nixpkgs"
@ -739,7 +723,6 @@
"inputs": {
"aagl": "aagl",
"deploy-rs": "deploy-rs",
"flake-compat": "flake-compat_3",
"home-manager": "home-manager",
"impermanence": "impermanence",
"napalm": "napalm",

View File

@ -19,13 +19,18 @@ inputs:
ca = ./ca.crt;
cert = ./. + "/${inputs.config.nixos.system.hostname}.crt";
key = inputs.config.sops.templates."nebula/key-template".path;
isLighthouse = nebula.lighthouse == null;
lighthouses = if nebula.lighthouse == null then [] else [ "192.168.82.1" ];
staticHostMap = if nebula.lighthouse == null then {} else { "192.168.82.1" = [(nebula.lighthouse + ":4242")]; };
listen.port = if nebula.lighthouse == null then 4242 else 0;
firewall.inbound = [ { host = "any"; port = "any"; proto = "any"; } ];
firewall.outbound = [ { host = "any"; port = "any"; proto = "any"; } ];
};
}
// (
if nebula.lighthouse == null then { isLighthouse = true; }
else
{
lighthouses = [ "192.168.82.1" ];
staticHostMap."192.168.82.1" = [ "${nebula.lighthouse}:4242" ];
listen.port = 0;
}
);
sops =
{
templates."nebula/key-template" =