use EnvironmentFile in dyndns systemd service to drastically uncomplicate things

This commit is contained in:
2026-02-11 22:21:56 +01:00
parent 52486cdb13
commit 9d92c0bbd8
2 changed files with 8 additions and 19 deletions
+3 -7
View File
@@ -3,12 +3,7 @@
...
}:
let
pyenv = pkgs.python3.withPackages (
ps: with ps; [
nc-dnsapi
python-dotenv
]
);
pyenv = pkgs.python3.withPackages (ps: with ps; [ nc-dnsapi ]);
in
{
users.groups.dyndns = { };
@@ -32,7 +27,8 @@ in
serviceConfig = {
Type = "oneshot";
User = "dyndns";
ExecStart = "${pyenv.interpreter} ${./dyndns.py} ${./nc.env.secret}";
ExecStart = "${pyenv.interpreter} ${./dyndns.py}";
EnvironmentFile = ./. + "/nc.env.secret";
};
};
}