diff options
author | makefu <github@syntax-fehler.de> | 2019-04-26 20:35:52 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2019-04-26 20:35:52 +0200 |
commit | 2685464a60f32c75cf9198383ca10c3d6cf55572 (patch) | |
tree | 698bd32e2cc51be596771cc0e76ffd8521a64ff5 /krebs/3modules/syncthing.nix | |
parent | 95f6a06c5acfb6054236ea2f5aee42975dd909ec (diff) | |
parent | cd825d99342050bae35d5373e927ca999bae82cf (diff) |
Merge branch 'master' of prism:stockholm
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 { |