syncthing: made module more NixOps friendly
This commit is contained in:
parent
d35692126f
commit
e4f1e144a0
@ -18,7 +18,10 @@ let
|
|||||||
fsWatcherEnabled = folder.watch;
|
fsWatcherEnabled = folder.watch;
|
||||||
fsWatcherDelayS = folder.watchDelay;
|
fsWatcherDelayS = folder.watchDelay;
|
||||||
ignorePerms = folder.ignorePerms;
|
ignorePerms = folder.ignorePerms;
|
||||||
}) cfg.declarative.folders;
|
}) (filterAttrs (
|
||||||
|
_: folder:
|
||||||
|
folder.enable
|
||||||
|
) cfg.declarative.folders);
|
||||||
|
|
||||||
# get the api key by parsing the config.xml
|
# get the api key by parsing the config.xml
|
||||||
getApiKey = pkgs.writers.writeDash "getAPIKey" ''
|
getApiKey = pkgs.writers.writeDash "getAPIKey" ''
|
||||||
@ -169,6 +172,16 @@ in {
|
|||||||
type = types.attrsOf (types.submodule ({ config, ... }: {
|
type = types.attrsOf (types.submodule ({ config, ... }: {
|
||||||
options = {
|
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 {
|
path = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = config._module.args.name;
|
default = config._module.args.name;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user