From 4a624b20cb7e395feb6b1f2d1433b166a5d2cc6e Mon Sep 17 00:00:00 2001 From: Erwin Boskma Date: Tue, 23 Apr 2024 16:52:30 +0200 Subject: [PATCH] valkyrie: Set HOME variable in coredns service env --- machines/valkyrie/coredns/default.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/machines/valkyrie/coredns/default.nix b/machines/valkyrie/coredns/default.nix index b115c46..49dc16b 100644 --- a/machines/valkyrie/coredns/default.nix +++ b/machines/valkyrie/coredns/default.nix @@ -24,5 +24,13 @@ ''; }; - systemd.services.coredns.serviceConfig.EnvironmentFile = [ config.sops.secrets.coredns-env.path ]; + systemd.services.coredns = { + environment = { + HOME = "%S/coredns"; + }; + serviceConfig = { + StateDirectory = "coredns"; + EnvironmentFile = [ config.sops.secrets.coredns-env.path ]; + }; + }; }