mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 07:23:20 +00:00
Merge pull request #195681 from maifel-maifel/mr-containers-hostPlatform
nixos/containers: now uses nixpkgs.hostPlatform
This commit is contained in:
commit
8837a5d68e
@ -1,4 +1,4 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }@host:
|
||||
|
||||
with lib;
|
||||
|
||||
@ -284,7 +284,6 @@ let
|
||||
DeviceAllow = map (d: "${d.node} ${d.modifier}") cfg.allowedDevices;
|
||||
};
|
||||
|
||||
inherit (config.nixpkgs) localSystem;
|
||||
kernelVersion = config.boot.kernelPackages.kernel.version;
|
||||
|
||||
bindMountOpts = { name, ... }: {
|
||||
@ -480,10 +479,13 @@ in
|
||||
merge = loc: defs: (import "${toString config.nixpkgs}/nixos/lib/eval-config.nix" {
|
||||
modules =
|
||||
let
|
||||
extraConfig = {
|
||||
extraConfig = { options, ... }: {
|
||||
_file = "module at ${__curPos.file}:${toString __curPos.line}";
|
||||
config = {
|
||||
nixpkgs = { inherit localSystem; };
|
||||
nixpkgs = if options.nixpkgs?hostPlatform && host.options.nixpkgs.hostPlatform.isDefined
|
||||
then { inherit (host.config.nixpkgs) hostPlatform; }
|
||||
else { inherit (host.config.nixpkgs) localSystem; }
|
||||
;
|
||||
boot.isContainer = true;
|
||||
networking.hostName = mkDefault name;
|
||||
networking.useDHCP = false;
|
||||
|
Loading…
Reference in New Issue
Block a user