From 37f37f59b59d38a9ad8044f8074edd1ac9785e85 Mon Sep 17 00:00:00 2001 From: Reuben Ferabend <63928521+railwhale@users.noreply.github.com> Date: Wed, 29 Oct 2025 23:08:11 +1300 Subject: [PATCH] nixos/facter: fix conflict with `readOnlyPkgs` --- nixos/modules/hardware/facter/system.nix | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/nixos/modules/hardware/facter/system.nix b/nixos/modules/hardware/facter/system.nix index 02e329f8e162..ef51b0e44f1d 100644 --- a/nixos/modules/hardware/facter/system.nix +++ b/nixos/modules/hardware/facter/system.nix @@ -5,11 +5,11 @@ ... }: { - # Skip setting hostPlatform in test VMs where it's read-only - # Tests have virtualisation.test options and import read-only.nix - config.nixpkgs = lib.optionalAttrs (!(options ? virtualisation.test)) { - hostPlatform = lib.mkIf ( - config.hardware.facter.report.system or null != null && !options.nixpkgs.pkgs.isDefined - ) (lib.mkDefault config.hardware.facter.report.system); - }; + # Skip setting hostPlatform if it's read-only + nixpkgs = + lib.optionalAttrs + (config.hardware.facter.report.system or null != null && !options.nixpkgs.hostPlatform.readOnly) + { + hostPlatform = lib.mkDefault config.hardware.facter.report.system; + }; }