diff options
| author | Gregor Kleen <gkleen@yggdrasil.li> | 2024-08-08 10:45:09 +0200 |
|---|---|---|
| committer | Gregor Kleen <gkleen@yggdrasil.li> | 2024-08-08 10:45:09 +0200 |
| commit | 63adb41f1a060c21a68143eb9e86c2790ef66f36 (patch) | |
| tree | 3902b85e7659fd396ded1d2e42ea318153d08a13 /modules/yggdrasil/default.nix | |
| parent | 73b08cbd76d4471c9a6fddd05265d7d7fc4c45ff (diff) | |
| download | nixos-63adb41f1a060c21a68143eb9e86c2790ef66f36.tar nixos-63adb41f1a060c21a68143eb9e86c2790ef66f36.tar.gz nixos-63adb41f1a060c21a68143eb9e86c2790ef66f36.tar.bz2 nixos-63adb41f1a060c21a68143eb9e86c2790ef66f36.tar.xz nixos-63adb41f1a060c21a68143eb9e86c2790ef66f36.zip | |
...
Diffstat (limited to 'modules/yggdrasil/default.nix')
| -rw-r--r-- | modules/yggdrasil/default.nix | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/modules/yggdrasil/default.nix b/modules/yggdrasil/default.nix deleted file mode 100644 index f4100e73..00000000 --- a/modules/yggdrasil/default.nix +++ /dev/null | |||
| @@ -1,50 +0,0 @@ | |||
| 1 | { config, lib, customUtils, ... }: | ||
| 2 | let | ||
| 3 | cfg = config.services.tinc.yggdrasil; | ||
| 4 | in { | ||
| 5 | options = { | ||
| 6 | services.tinc.yggdrasil = lib.mkOption { | ||
| 7 | default = {}; | ||
| 8 | type = lib.types.submodule { | ||
| 9 | options = { | ||
| 10 | enable = lib.mkEnableOption "Yggdrasil tinc network"; | ||
| 11 | |||
| 12 | connect = lib.mkOption { | ||
| 13 | default = true; | ||
| 14 | type = lib.types.bool; | ||
| 15 | description = '' | ||
| 16 | Connect to central server | ||
| 17 | ''; | ||
| 18 | }; | ||
| 19 | }; | ||
| 20 | }; | ||
| 21 | }; | ||
| 22 | }; | ||
| 23 | |||
| 24 | config = lib.mkIf cfg.enable { | ||
| 25 | services.tinc.networks.yggdrasil = { | ||
| 26 | name = config.networking.hostName; | ||
| 27 | hostSettings = customUtils.nixImport { dir = ./hosts; }; | ||
| 28 | debugLevel = 2; | ||
| 29 | interfaceType = "tap"; | ||
| 30 | settings = { | ||
| 31 | Mode = "switch"; | ||
| 32 | PingTimeout = 30; | ||
| 33 | ConnectTo = lib.mkIf cfg.connect "ymir"; | ||
| 34 | }; | ||
| 35 | }; | ||
| 36 | |||
| 37 | sops.secrets = { | ||
| 38 | tinc-yggdrasil-rsa = { | ||
| 39 | key = "rsa"; | ||
| 40 | path = "/etc/tinc/yggdrasil/rsa_key.priv"; | ||
| 41 | sopsFile = ./hosts + "/${config.services.tinc.networks.yggdrasil.name}/private-keys.yaml"; | ||
| 42 | }; | ||
| 43 | tinc-yggdrasil-ed25519 = { | ||
| 44 | key = "ed25519"; | ||
| 45 | path = "/etc/tinc/yggdrasil/rsa_key.priv"; | ||
| 46 | sopsFile = ./hosts + "/${config.services.tinc.networks.yggdrasil.name}/private-keys.yaml"; | ||
| 47 | }; | ||
| 48 | }; | ||
| 49 | }; | ||
| 50 | } | ||
