commit cb5f7174451722e40369bac50374899263ac1835
parent 2ee66de25c5c259e7eb92b3e457c474f4627dfd6
Author: Leah (ctucx) <leah@ctu.cx>
Date: Thu, 3 Feb 2022 14:30:40 +0100
parent 2ee66de25c5c259e7eb92b3e457c474f4627dfd6
Author: Leah (ctucx) <leah@ctu.cx>
Date: Thu, 3 Feb 2022 14:30:40 +0100
services/syncthing: deploy cert and key via agenix
1 file changed, 16 insertions(+), 0 deletions(-)
diff --git a/configurations/services/syncthing.nix b/configurations/services/syncthing.nix @@ -67,13 +67,29 @@ let dataDir = "/home/leah" + (if builtins.elem config.networking.hostName appendDataDirHosts then "/syncthing" else ""); in { + + age.secrets = { + syncthing-key = { + file = ../../secrets + "/${config.networking.hostName}/syncthing/key.age"; + owner = "leah"; + }; + syncthing-cert = { + file = ../../secrets + "/${config.networking.hostName}/syncthing/cert.age"; + owner = "leah"; + }; + }; + services = { syncthing = { enable = true; openDefaultPorts = true; + user = "leah"; group = "users"; + key = config.age.secrets.syncthing-key.path; + cert = config.age.secrets.syncthing-cert.path; + dataDir = "${dataDir}"; configDir = "/home/leah/.config/syncthing";