aboutsummaryrefslogtreecommitdiff
path: root/hosts
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-02-24 19:12:17 -0800
committerFranck Cuny <franck@fcuny.net>2022-02-24 19:12:17 -0800
commitba5c5d9f4400759cbcaf137fc98db1c9789e3f78 (patch)
tree6e9a70500464f9becbf19b9a5dfc43bee5670426 /hosts
parentbackups: initial configuration (diff)
downloadinfra-ba5c5d9f4400759cbcaf137fc98db1c9789e3f78.tar.gz
agenix: store wireguard key in persistent storage
The key was created under /run/agenix, which is wiped out after a reboot. The key being absent prevents the wireguard interface to come up. Store the key somewhere persistent to prevent this to happen.
Diffstat (limited to 'hosts')
-rw-r--r--hosts/aptos/default.nix7
1 files changed, 7 insertions, 0 deletions
diff --git a/hosts/aptos/default.nix b/hosts/aptos/default.nix
index 1e79543..c94efd0 100644
--- a/hosts/aptos/default.nix
+++ b/hosts/aptos/default.nix
@@ -32,6 +32,13 @@
};
networking.wireless.iwd.enable = true;
+
+ age.secrets.wg-net = {
+ file = ../../secrets/network/aptos/wireguard_privatekey.age;
+ path = "/var/lib/wireguard/wg0.key";
+ symlink = false;
+ };
+
networking.private-wireguard.enable = true;
services.thermald.enable = true;