diff options
author | tv <tv@krebsco.de> | 2019-04-19 16:39:05 +0200 |
---|---|---|
committer | tv <tv@krebsco.de> | 2019-04-19 16:39:05 +0200 |
commit | d825d2db8796a0d19f22eba240a2e49213cf01e2 (patch) | |
tree | b7104f1b790ae0446fd44b1aad4c22f1c425af6d /krebs/3modules/syncthing.nix | |
parent | 5fbe320b9173b1ef0725a79548f34f967ad16130 (diff) | |
parent | 6c719f03c1a5533b43957d3039b4aed5f5bd8b42 (diff) |
Merge remote-tracking branch 'prism/master'
Diffstat (limited to 'krebs/3modules/syncthing.nix')
-rw-r--r-- | krebs/3modules/syncthing.nix | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/krebs/3modules/syncthing.nix b/krebs/3modules/syncthing.nix index bfbac1db9..897ba1e7f 100644 --- a/krebs/3modules/syncthing.nix +++ b/krebs/3modules/syncthing.nix @@ -10,7 +10,7 @@ let addresses = peer.addresses; }) cfg.peers; - folders = map (folder: { + folders = mapAttrsToList ( _: folder: { inherit (folder) path id type; devices = map (peer: { deviceId = cfg.peers.${peer}.id; }) folder.peers; rescanIntervalS = folder.rescanInterval; @@ -81,17 +81,18 @@ in }; folders = mkOption { - default = []; - type = types.listOf (types.submodule ({ config, ... }: { + default = {}; + type = types.attrsOf (types.submodule ({ config, ... }: { options = { path = mkOption { type = types.absolute-pathname; + default = config._module.args.name; }; id = mkOption { type = types.str; - default = config.path; + default = config._module.args.name; }; peers = mkOption { |