mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
make nix.settings.system-features default mergeable again (#383052)
This commit is contained in:
commit
611bfa1dd4
1 changed files with 17 additions and 14 deletions
|
@ -45,6 +45,19 @@ let
|
||||||
|
|
||||||
isNixAtLeast = versionAtLeast (getVersion nixPackage);
|
isNixAtLeast = versionAtLeast (getVersion nixPackage);
|
||||||
|
|
||||||
|
defaultSystemFeatures = [
|
||||||
|
"nixos-test"
|
||||||
|
"benchmark"
|
||||||
|
"big-parallel"
|
||||||
|
"kvm"
|
||||||
|
] ++ optionals (pkgs.stdenv.hostPlatform ? gcc.arch) (
|
||||||
|
# a builder can run code for `gcc.arch` and inferior architectures
|
||||||
|
[ "gccarch-${pkgs.stdenv.hostPlatform.gcc.arch}" ]
|
||||||
|
++ map (x: "gccarch-${x}") (
|
||||||
|
systems.architectures.inferiors.${pkgs.stdenv.hostPlatform.gcc.arch} or [ ]
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
legacyConfMappings = {
|
legacyConfMappings = {
|
||||||
useSandbox = "sandbox";
|
useSandbox = "sandbox";
|
||||||
buildCores = "cores";
|
buildCores = "cores";
|
||||||
|
@ -315,20 +328,9 @@ in
|
||||||
|
|
||||||
system-features = mkOption {
|
system-features = mkOption {
|
||||||
type = types.listOf types.str;
|
type = types.listOf types.str;
|
||||||
default =
|
# We expose system-featuers here and in config below.
|
||||||
[
|
# This allows users to access the default value via `options.nix.settings.system-features`
|
||||||
"nixos-test"
|
default = defaultSystemFeatures;
|
||||||
"benchmark"
|
|
||||||
"big-parallel"
|
|
||||||
"kvm"
|
|
||||||
]
|
|
||||||
++ optionals (pkgs.stdenv.hostPlatform ? gcc.arch) (
|
|
||||||
# a builder can run code for `gcc.arch` and inferior architectures
|
|
||||||
[ "gccarch-${pkgs.stdenv.hostPlatform.gcc.arch}" ]
|
|
||||||
++ map (x: "gccarch-${x}") (
|
|
||||||
systems.architectures.inferiors.${pkgs.stdenv.hostPlatform.gcc.arch} or [ ]
|
|
||||||
)
|
|
||||||
);
|
|
||||||
defaultText = literalExpression ''[ "nixos-test" "benchmark" "big-parallel" "kvm" "gccarch-<arch>" ]'';
|
defaultText = literalExpression ''[ "nixos-test" "benchmark" "big-parallel" "kvm" "gccarch-<arch>" ]'';
|
||||||
description = ''
|
description = ''
|
||||||
The set of features supported by the machine. Derivations
|
The set of features supported by the machine. Derivations
|
||||||
|
@ -385,6 +387,7 @@ in
|
||||||
trusted-public-keys = [ "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" ];
|
trusted-public-keys = [ "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" ];
|
||||||
trusted-users = [ "root" ];
|
trusted-users = [ "root" ];
|
||||||
substituters = mkAfter [ "https://cache.nixos.org/" ];
|
substituters = mkAfter [ "https://cache.nixos.org/" ];
|
||||||
|
system-features = defaultSystemFeatures;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue