use EnvironmentFile in dyndns systemd service to drastically uncomplicate things

This commit is contained in:
leonhard committed 2026-02-11 22:21:56 +01:00
1 parent 52486cdb13
commit 9d92c0bbd8
2 files changed
+8 -19

No files matched your search

+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";
};
};
}