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>
This commit is contained in:
parent
43243539b3
commit
8ac4b251c8
|
@ -25,6 +25,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
packages = mkOption {
|
packages = mkOption {
|
||||||
|
type = types.functionTo (types.listOf types.package);
|
||||||
default = hp: [];
|
default = hp: [];
|
||||||
defaultText = "hp: []";
|
defaultText = "hp: []";
|
||||||
example = "hp: with hp; [ text lens ]";
|
example = "hp: with hp; [ text lens ]";
|
||||||
|
|
|
@ -42,6 +42,7 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
extraPackages = mkOption {
|
extraPackages = mkOption {
|
||||||
|
type = types.functionTo (types.listOf types.package);
|
||||||
default = self: [];
|
default = self: [];
|
||||||
example = literalExample ''
|
example = literalExample ''
|
||||||
haskellPackages: [
|
haskellPackages: [
|
||||||
|
|
|
@ -21,6 +21,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
extraPackages = mkOption {
|
extraPackages = mkOption {
|
||||||
|
type = types.functionTo (types.listOf types.package);
|
||||||
default = self: [];
|
default = self: [];
|
||||||
example = literalExample ''
|
example = literalExample ''
|
||||||
haskellPackages: [
|
haskellPackages: [
|
||||||
|
|
|
@ -66,6 +66,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
plugins = mkOption {
|
plugins = mkOption {
|
||||||
|
type = types.functionTo (types.listOf types.package);
|
||||||
default = plugins: [];
|
default = plugins: [];
|
||||||
defaultText = "plugins: []";
|
defaultText = "plugins: []";
|
||||||
example = literalExample "plugins: with plugins; [ themeify stlviewer ]";
|
example = literalExample "plugins: with plugins; [ themeify stlviewer ]";
|
||||||
|
|
|
@ -77,6 +77,7 @@ in {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
extraPackages = mkOption {
|
extraPackages = mkOption {
|
||||||
|
type = types.functionTo (types.listOf types.package);
|
||||||
default = ps: [];
|
default = ps: [];
|
||||||
defaultText = "ps: []";
|
defaultText = "ps: []";
|
||||||
example = literalExample ''
|
example = literalExample ''
|
||||||
|
|
|
@ -64,6 +64,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
extraPackages = mkOption {
|
extraPackages = mkOption {
|
||||||
|
type = types.functionTo (types.listOf types.package);
|
||||||
default = p: [];
|
default = p: [];
|
||||||
description = ''
|
description = ''
|
||||||
Extra Python packages available to supybot plugins. The
|
Extra Python packages available to supybot plugins. The
|
||||||
|
|
|
@ -37,6 +37,7 @@ in
|
||||||
description = "Enable an uncustomised exwm configuration.";
|
description = "Enable an uncustomised exwm configuration.";
|
||||||
};
|
};
|
||||||
extraPackages = mkOption {
|
extraPackages = mkOption {
|
||||||
|
type = types.functionTo (types.listOf types.package);
|
||||||
default = self: [];
|
default = self: [];
|
||||||
example = literalExample ''
|
example = literalExample ''
|
||||||
epkgs: [
|
epkgs: [
|
||||||
|
|
|
@ -53,6 +53,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
extraPackages = mkOption {
|
extraPackages = mkOption {
|
||||||
|
type = types.functionTo (types.listOf types.package);
|
||||||
default = self: [];
|
default = self: [];
|
||||||
defaultText = "self: []";
|
defaultText = "self: []";
|
||||||
example = literalExample ''
|
example = literalExample ''
|
||||||
|
|
Loading…
Reference in a new issue