syncthing: made module more NixOps friendly
This commit is contained in:
parent
d35692126f
commit
e4f1e144a0
1 changed files with 14 additions and 1 deletions
|
@ -18,7 +18,10 @@ let
|
|||
fsWatcherEnabled = folder.watch;
|
||||
fsWatcherDelayS = folder.watchDelay;
|
||||
ignorePerms = folder.ignorePerms;
|
||||
}) cfg.declarative.folders;
|
||||
}) (filterAttrs (
|
||||
_: folder:
|
||||
folder.enable
|
||||
) cfg.declarative.folders);
|
||||
|
||||
# get the api key by parsing the config.xml
|
||||
getApiKey = pkgs.writers.writeDash "getAPIKey" ''
|
||||
|
@ -169,6 +172,16 @@ in {
|
|||
type = types.attrsOf (types.submodule ({ config, ... }: {
|
||||
options = {
|
||||
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
share this folder.
|
||||
This option is useful when you want to define all folders
|
||||
in one place, but not every machine should share all folders.
|
||||
'';
|
||||
};
|
||||
|
||||
path = mkOption {
|
||||
type = types.str;
|
||||
default = config._module.args.name;
|
||||
|
|
Loading…
Reference in a new issue