syncthing: add id option
This commit is contained in:
parent
e56e7fbe71
commit
212e7f4b98
@ -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 = [];
|
||||
|
Loading…
Reference in New Issue
Block a user