nixos/syncthing: Fix submodule name usage

Module arguments should be taken from the arguments directly. This
allows evalModule's specialArgs to override them if necessary
This commit is contained in:
Silvan Mosberger 2019-12-05 06:49:23 +01:00
parent 90c82bfee7
commit bc42515736
No known key found for this signature in database
GPG Key ID: E8F1E9EAD284E17D
1 changed files with 6 additions and 6 deletions

View File

@ -112,12 +112,12 @@ in {
addresses = [ "tcp://192.168.0.10:51820" ]; addresses = [ "tcp://192.168.0.10:51820" ];
}; };
}; };
type = types.attrsOf (types.submodule ({ config, ... }: { type = types.attrsOf (types.submodule ({ name, ... }: {
options = { options = {
name = mkOption { name = mkOption {
type = types.str; type = types.str;
default = config._module.args.name; default = name;
description = '' description = ''
Name of the device Name of the device
''; '';
@ -175,7 +175,7 @@ in {
devices = [ "bigbox" ]; devices = [ "bigbox" ];
}; };
}; };
type = types.attrsOf (types.submodule ({ config, ... }: { type = types.attrsOf (types.submodule ({ name, ... }: {
options = { options = {
enable = mkOption { enable = mkOption {
@ -190,7 +190,7 @@ in {
path = mkOption { path = mkOption {
type = types.str; type = types.str;
default = config._module.args.name; default = name;
description = '' description = ''
The path to the folder which should be shared. The path to the folder which should be shared.
''; '';
@ -198,7 +198,7 @@ in {
id = mkOption { id = mkOption {
type = types.str; type = types.str;
default = config._module.args.name; default = name;
description = '' description = ''
The id of the folder. Must be the same on all devices. The id of the folder. Must be the same on all devices.
''; '';
@ -206,7 +206,7 @@ in {
label = mkOption { label = mkOption {
type = types.str; type = types.str;
default = config._module.args.name; default = name;
description = '' description = ''
The label of the folder. The label of the folder.
''; '';