diff options
| author | Tim Keller <tjk@tjkeller.xyz> | 2026-06-14 15:41:11 -0500 |
|---|---|---|
| committer | Tim Keller <tjk@tjkeller.xyz> | 2026-06-14 15:41:11 -0500 |
| commit | 5c2ffcc0774dbdb7f0d7bd1ff76b1fe65fc54d6b (patch) | |
| tree | e8323b5e0f739f1d92f94a755447507ba745c0a0 /hosts/poweredge/ddns-updater.nix | |
| parent | 6451ea9aee5adb416570e6756402303d0c2e3554 (diff) | |
| download | nixos-5c2ffcc0774dbdb7f0d7bd1ff76b1fe65fc54d6b.tar.xz nixos-5c2ffcc0774dbdb7f0d7bd1ff76b1fe65fc54d6b.zip | |
fix ddns-updater service it works now!
Diffstat (limited to 'hosts/poweredge/ddns-updater.nix')
| -rw-r--r-- | hosts/poweredge/ddns-updater.nix | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/hosts/poweredge/ddns-updater.nix b/hosts/poweredge/ddns-updater.nix index 103c23b..319e3c4 100644 --- a/hosts/poweredge/ddns-updater.nix +++ b/hosts/poweredge/ddns-updater.nix @@ -1,19 +1,22 @@ -{ config, lib, ... }: { - # Password file for mail application password +{ config, lib, ... }: let + credential = "config"; +in { + # Config for ddns-updater, owned by the ddns-updater systemd service user sops.secrets.ddns-updater-config.sopsFile = ./resources/secrets/ddns-updater-config.yaml; + # Load secret as a credential in systemd service + systemd.services.ddns-updater.serviceConfig = { + LoadCredential = [ + "${credential}:${config.sops.secrets.ddns-updater-config.path}" + ]; + }; + # Enable ddns updater services.ddns-updater = { enable = true; environment = { SERVER_ENABLED="no"; - CONFIG_FILEPATH = config.sops.secrets.ddns-updater-config.path; - PERIOD = "5m"; + CONFIG_FILEPATH = "%d/${credential}"; }; }; - - # FIXME Required root permissions to open secret - systemd.services.ddns-updater = { - serviceConfig.DynamicUser = lib.mkForce false; - }; } |
