diff --git a/nixos/modules/services/mail/goeland.nix b/nixos/modules/services/mail/goeland.nix index e4a32de1dc3c..de2f7b457d7a 100644 --- a/nixos/modules/services/mail/goeland.nix +++ b/nixos/modules/services/mail/goeland.nix @@ -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 {