Revert "nixos/nixpkgs: make config.nixpkgs.{localSystem,crossSystem,buildPlatform,hostPlatform} write only"

This reverts commit 0a19371146.
This commit is contained in:
Robert Hensing 2025-02-05 14:29:18 +01:00
parent 692a57e61d
commit 0b47fba230
6 changed files with 46 additions and 37 deletions

View file

@ -506,12 +506,8 @@ in
config = {
nixpkgs =
if options.nixpkgs?hostPlatform
then {
hostPlatform =
if host.options.nixpkgs.hostPlatform.isDefined
then host.config.nixpkgs.hostPlatform
else lib.defaultTo host.config.nixpkgs.localSystem host.config.nixpkgs.crossSystem;
} else { localSystem = lib.defaultTo host.config.nixpkgs.localSystem host.config.nixpkgs.crossSystem; }
then { inherit (host.pkgs.stdenv) hostPlatform; }
else { localSystem = host.pkgs.stdenv.hostPlatform; }
;
boot.isContainer = true;
networking.hostName = mkDefault name;