summaryrefslogtreecommitdiffstats
path: root/krebs/3modules/syncthing.nix
diff options
context:
space:
mode:
authorjeschli <jeschli@gmail.com>2019-04-09 20:12:06 +0200
committerjeschli <jeschli@gmail.com>2019-04-09 20:12:06 +0200
commita4be985644762dcc2750a366db5780687690ef7d (patch)
tree5bc270cec7c01b986cd146769bc94bf2268c4113 /krebs/3modules/syncthing.nix
parentcb03267e0c3fd3bfa4beaa454f8986856a93963f (diff)
parent7e1b197dab13d024ba491c96dc959306324943c0 (diff)
Merge branch 'master' of prism.r:stockholm
Diffstat (limited to 'krebs/3modules/syncthing.nix')
-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 3c60eec4..34879fd3 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 = [];