nixos/facter: handle case where we do not have readOnly included

This commit is contained in:
Jörg Thalheim
2025-11-20 12:59:58 +01:00
parent a555914285
commit 484feccb9f
+4 -1
View File
@@ -8,7 +8,10 @@
# Skip setting hostPlatform if it's read-only
config.nixpkgs =
lib.optionalAttrs
(config.hardware.facter.report.system or null != null && !options.nixpkgs.hostPlatform.readOnly)
(
config.hardware.facter.report.system or null != null
&& !(options.nixpkgs.hostPlatform.readOnly or false)
)
{
hostPlatform = lib.mkDefault config.hardware.facter.report.system;
};