nixos/facter: fix conflict with readOnlyPkgs (#456076)
This commit is contained in:
@@ -5,11 +5,11 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
# Skip setting hostPlatform in test VMs where it's read-only
|
# Skip setting hostPlatform if it's read-only
|
||||||
# Tests have virtualisation.test options and import read-only.nix
|
nixpkgs =
|
||||||
config.nixpkgs = lib.optionalAttrs (!(options ? virtualisation.test)) {
|
lib.optionalAttrs
|
||||||
hostPlatform = lib.mkIf (
|
(config.hardware.facter.report.system or null != null && !options.nixpkgs.hostPlatform.readOnly)
|
||||||
config.hardware.facter.report.system or null != null && !options.nixpkgs.pkgs.isDefined
|
{
|
||||||
) (lib.mkDefault config.hardware.facter.report.system);
|
hostPlatform = lib.mkDefault config.hardware.facter.report.system;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user