From ba5c5d9f4400759cbcaf137fc98db1c9789e3f78 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Thu, 24 Feb 2022 19:12:17 -0800 Subject: 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. --- hosts/aptos/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'hosts') 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; -- cgit 1.4.1