nixos: use functionTo to prevent evaluation errors while merging

Without this patch merging options like
services.xserver.windowManager.xmonad.extraPackages
results in the evaluation error:

  error: value is a list while a set was expected, at nixpkgs/lib/options.nix:77:23

With this patch we get the desired merging behaviour that just concatenates the
resulting package lists.

(cherry picked from commit 6e99f9fdecb1f28308c8e0aed0fc851737354864)

Co-Authored-By: Silvan Mosberger <contact@infinisil.com>
wip/yesman
Bas van Dijk 6 years ago committed by Silvan Mosberger
parent 43243539b3
commit 8ac4b251c8
No known key found for this signature in database
GPG Key ID: E8F1E9EAD284E17D
  1. 1
      nixos/modules/services/development/hoogle.nix
  2. 1
      nixos/modules/services/misc/gitit.nix
  3. 1
      nixos/modules/services/misc/ihaskell.nix
  4. 1
      nixos/modules/services/misc/octoprint.nix
  5. 1
      nixos/modules/services/monitoring/netdata.nix
  6. 1
      nixos/modules/services/networking/supybot.nix
  7. 1
      nixos/modules/services/x11/window-managers/exwm.nix
  8. 1
      nixos/modules/services/x11/window-managers/xmonad.nix

@ -25,6 +25,7 @@ in {
};
packages = mkOption {
type = types.functionTo (types.listOf types.package);
default = hp: [];
defaultText = "hp: []";
example = "hp: with hp; [ text lens ]";

@ -42,6 +42,7 @@ let
};
extraPackages = mkOption {
type = types.functionTo (types.listOf types.package);
default = self: [];
example = literalExample ''
haskellPackages: [

@ -21,6 +21,7 @@ in
};
extraPackages = mkOption {
type = types.functionTo (types.listOf types.package);
default = self: [];
example = literalExample ''
haskellPackages: [

@ -66,6 +66,7 @@ in
};
plugins = mkOption {
type = types.functionTo (types.listOf types.package);
default = plugins: [];
defaultText = "plugins: []";
example = literalExample "plugins: with plugins; [ themeify stlviewer ]";

@ -77,6 +77,7 @@ in {
'';
};
extraPackages = mkOption {
type = types.functionTo (types.listOf types.package);
default = ps: [];
defaultText = "ps: []";
example = literalExample ''

@ -64,6 +64,7 @@ in
};
extraPackages = mkOption {
type = types.functionTo (types.listOf types.package);
default = p: [];
description = ''
Extra Python packages available to supybot plugins. The

@ -37,6 +37,7 @@ in
description = "Enable an uncustomised exwm configuration.";
};
extraPackages = mkOption {
type = types.functionTo (types.listOf types.package);
default = self: [];
example = literalExample ''
epkgs: [

@ -53,6 +53,7 @@ in {
};
extraPackages = mkOption {
type = types.functionTo (types.listOf types.package);
default = self: [];
defaultText = "self: []";
example = literalExample ''

Loading…
Cancel
Save