pkgs/top-level: make package sets composable (reapply) (#376988)

This commit is contained in:
Wolfgang Walther
2025-02-02 11:41:17 +01:00
committed by GitHub
9 changed files with 262 additions and 182 deletions

View File

@@ -506,8 +506,12 @@ in
config = {
nixpkgs =
if options.nixpkgs?hostPlatform
then { inherit (host.pkgs.stdenv) hostPlatform; }
else { localSystem = host.pkgs.stdenv.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; }
;
boot.isContainer = true;
networking.hostName = mkDefault name;