0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-14 06:00:33 +03:00

Restore check for container not defining nixpkgs.hostPlatform option

This commit is contained in:
Gabriella Gonzalez 2024-08-18 17:00:16 -07:00
parent 0600255046
commit 79e5dbb262

View file

@ -488,7 +488,11 @@ in
extraConfig = { options, ... }: {
_file = "module at ${__curPos.file}:${toString __curPos.line}";
config = {
nixpkgs = { inherit (host.pkgs.stdenv) hostPlatform; };
nixpkgs =
if options.nixpkgs?hostPlatform
then { inherit (host.pkgs.stdenv) hostPlatform; }
else { localSystem = host.pkgs.stdenv.hostPlatform; }
;
boot.isContainer = true;
networking.hostName = mkDefault name;
networking.useDHCP = false;