Apply suggestion

Co-authored-by: Aaron Andersen <aaron@fosslib.net>
This commit is contained in:
Bruno Inec 2023-01-18 15:22:08 +01:00
parent 15414ff8e1
commit 5edf9bd76f
No known key found for this signature in database

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