Merge pull request #273693 from lopsided98/syncthing-database-dir

nixos/syncthing: add `databaseDir` option
This commit is contained in:
Kira Bruneau 2023-12-12 20:55:34 -05:00 committed by GitHub
commit 8ee593f8d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -559,6 +559,15 @@ in {
''; '';
}; };
databaseDir = mkOption {
type = types.path;
description = lib.mdDoc ''
The directory containing the database and logs.
'';
default = cfg.configDir;
defaultText = literalExpression "config.${opt.configDir}";
};
extraFlags = mkOption { extraFlags = mkOption {
type = types.listOf types.str; type = types.listOf types.str;
default = []; default = [];
@ -660,7 +669,7 @@ in {
-no-browser \ -no-browser \
-gui-address=${if isUnixGui then "unix://" else ""}${cfg.guiAddress} \ -gui-address=${if isUnixGui then "unix://" else ""}${cfg.guiAddress} \
-config=${cfg.configDir} \ -config=${cfg.configDir} \
-data=${cfg.dataDir} \ -data=${cfg.databaseDir} \
${escapeShellArgs cfg.extraFlags} ${escapeShellArgs cfg.extraFlags}
''; '';
MemoryDenyWriteExecute = true; MemoryDenyWriteExecute = true;