summaryrefslogtreecommitdiffstats
path: root/krebs/3modules
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2019-04-07 18:21:18 +0200
committerlassulus <lassulus@lassul.us>2019-04-07 18:21:18 +0200
commit212e7f4b9843790e29fd990a17279dc96e181baf (patch)
treefe32b8220e3399d7b9858b06429df20532fc5711 /krebs/3modules
parente56e7fbe7103f4c570bf8e4cdee764b9ad0b5062 (diff)
syncthing: add id option
Diffstat (limited to 'krebs/3modules')
-rw-r--r--krebs/3modules/syncthing.nix10
1 files changed, 7 insertions, 3 deletions
diff --git a/krebs/3modules/syncthing.nix b/krebs/3modules/syncthing.nix
index 3c60eec4b..34879fd3f 100644
--- a/krebs/3modules/syncthing.nix
+++ b/krebs/3modules/syncthing.nix
@@ -11,8 +11,7 @@ let
}) cfg.peers;
folders = map (folder: {
- inherit (folder) path type;
- id = folder.path;
+ inherit (folder) path id type;
devices = map (peer: { deviceId = cfg.peers.${peer}.id; }) folder.peers;
rescanIntervalS = folder.rescanInterval;
fsWatcherEnabled = folder.watch;
@@ -83,13 +82,18 @@ in
folders = mkOption {
default = [];
- type = types.listOf (types.submodule ({
+ type = types.listOf (types.submodule ({ config, ... }: {
options = {
path = mkOption {
type = types.absolute-pathname;
};
+ id = mkOption {
+ type = types.str;
+ default = config.path;
+ };
+
peers = mkOption {
type = types.listOf types.str;
default = [];