Apply suggestion

Co-authored-by: Aaron Andersen <aaron@fosslib.net>
This commit is contained in:
Bruno Inec
2023-01-20 00:39:34 +01:00
co-authored by Aaron Andersen
parent 15414ff8e1
commit 5edf9bd76f
+11 -7
View File
@@ -40,13 +40,17 @@ in
services.goeland.settings.database = "${cfg.stateDir}/goeland.db";
systemd.services.goeland = {
serviceConfig = let confFile = tomlFormat.generate "config.toml" cfg.settings; in {
ExecStart = "${pkgs.goeland}/bin/goeland run -c ${confFile}";
User = "goeland";
Group = "goeland";
StateDirectory = "goeland";
StateDirectoryMode = "0750";
};
serviceConfig = let confFile = tomlFormat.generate "config.toml" cfg.settings; in mkMerge [
{
ExecStart = "${pkgs.goeland}/bin/goeland run -c ${confFile}";
User = "goeland";
Group = "goeland";
}
(mkIf (cfg.stateDir == "/var/lib/goeland") {
StateDirectory = "goeland";
StateDirectoryMode = "0750";
})
];
startAt = cfg.schedule;
};