databaseDirectory -> StateDir and changed description

This commit is contained in:
Bruno Inec 2023-01-18 15:18:36 +01:00
parent 8f10857af4
commit 15414ff8e1
No known key found for this signature in database

View File

@ -16,25 +16,28 @@ in
See the [example config file](https://github.com/slurdge/goeland/blob/master/cmd/asset/config.default.toml) for the available options.
'';
default = { };
type = types.submodule {
freeformType = tomlFormat.type;
};
type = tomlFormat.type;
};
schedule = mkOption {
type = types.str;
default = "12h";
example = "Mon, 00:00:00";
description = mdDoc "How often to run goeland, in systemd time format";
description = mdDoc "How often to run goeland, in systemd time format.";
};
databaseDirectory = mkOption {
stateDir = mkOption {
type = types.path;
default = "/var/lib/goeland";
description = mdDoc "Directory where the goeland database will reside if using the `unseen` filter";
description = mdDoc ''
The data directory for goeland where the database will reside if using the unseen filter.
If left as the default value this directory will automatically be created before the goeland
server starts, otherwise you are responsible for ensuring the directory exists with
appropriate ownership and permissions.
'';
};
};
config = mkIf cfg.enable {
services.goeland.settings.database = "${cfg.databaseDirectory}/goeland.db";
services.goeland.settings.database = "${cfg.stateDir}/goeland.db";
systemd.services.goeland = {
serviceConfig = let confFile = tomlFormat.generate "config.toml" cfg.settings; in {