diff options
author | Silvan Mosberger <contact@infinisil.com> | 2019-12-05 06:49:23 +0100 |
---|---|---|
committer | Silvan Mosberger <contact@infinisil.com> | 2020-01-02 09:59:35 +0100 |
commit | bc42515736154efd577baafa592734ff1bc198bc (patch) | |
tree | 17dcbc47fc3c399cecf8a31e1e7fa3f97f2b2add | |
parent | 90c82bfee7bf4eb8f9d529f3bb61ea31a004e4cb (diff) | |
download | nixpkgs-bc42515736154efd577baafa592734ff1bc198bc.tar nixpkgs-bc42515736154efd577baafa592734ff1bc198bc.tar.gz nixpkgs-bc42515736154efd577baafa592734ff1bc198bc.tar.bz2 nixpkgs-bc42515736154efd577baafa592734ff1bc198bc.tar.lz nixpkgs-bc42515736154efd577baafa592734ff1bc198bc.tar.xz nixpkgs-bc42515736154efd577baafa592734ff1bc198bc.tar.zst nixpkgs-bc42515736154efd577baafa592734ff1bc198bc.zip |
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
-rw-r--r-- | nixos/modules/services/networking/syncthing.nix | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/nixos/modules/services/networking/syncthing.nix b/nixos/modules/services/networking/syncthing.nix index b3f2af5b179..47b10e408c0 100644 --- a/nixos/modules/services/networking/syncthing.nix +++ b/nixos/modules/services/networking/syncthing.nix @@ -112,12 +112,12 @@ in { addresses = [ "tcp://192.168.0.10:51820" ]; }; }; - type = types.attrsOf (types.submodule ({ config, ... }: { + type = types.attrsOf (types.submodule ({ name, ... }: { options = { name = mkOption { type = types.str; - default = config._module.args.name; + default = name; description = '' Name of the device ''; @@ -175,7 +175,7 @@ in { devices = [ "bigbox" ]; }; }; - type = types.attrsOf (types.submodule ({ config, ... }: { + type = types.attrsOf (types.submodule ({ name, ... }: { options = { enable = mkOption { @@ -190,7 +190,7 @@ in { path = mkOption { type = types.str; - default = config._module.args.name; + default = name; description = '' The path to the folder which should be shared. ''; @@ -198,7 +198,7 @@ in { id = mkOption { type = types.str; - default = config._module.args.name; + default = name; description = '' The id of the folder. Must be the same on all devices. ''; @@ -206,7 +206,7 @@ in { label = mkOption { type = types.str; - default = config._module.args.name; + default = name; description = '' The label of the folder. ''; |