diff options
author | Alyssa Ross <hi@alyssa.is> | 2019-06-18 18:30:18 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2019-06-18 18:30:18 +0000 |
commit | ef93931efff0323fd13c4270415b578c73b5ef35 (patch) | |
tree | e5b089306c481ce3237027bfb46c940fed1e2114 /nixpkgs/nixos/modules/virtualisation | |
parent | c5571a126859eb658ffd7340cb580f7d91f12bb6 (diff) | |
parent | a1dd419c1ffacea87eba066a2bb332e03cb68f66 (diff) | |
download | nixlib-ef93931efff0323fd13c4270415b578c73b5ef35.tar nixlib-ef93931efff0323fd13c4270415b578c73b5ef35.tar.gz nixlib-ef93931efff0323fd13c4270415b578c73b5ef35.tar.bz2 nixlib-ef93931efff0323fd13c4270415b578c73b5ef35.tar.lz nixlib-ef93931efff0323fd13c4270415b578c73b5ef35.tar.xz nixlib-ef93931efff0323fd13c4270415b578c73b5ef35.tar.zst nixlib-ef93931efff0323fd13c4270415b578c73b5ef35.zip |
Merge commit 'a1dd419c1ffacea87eba066a2bb332e03cb68f66'
Diffstat (limited to 'nixpkgs/nixos/modules/virtualisation')
-rw-r--r-- | nixpkgs/nixos/modules/virtualisation/containers.nix | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/nixpkgs/nixos/modules/virtualisation/containers.nix b/nixpkgs/nixos/modules/virtualisation/containers.nix index 97243e3304ee..2235eec9d95a 100644 --- a/nixpkgs/nixos/modules/virtualisation/containers.nix +++ b/nixpkgs/nixos/modules/virtualisation/containers.nix @@ -465,20 +465,24 @@ in merge = loc: defs: (import ../../lib/eval-config.nix { inherit system; modules = - let extraConfig = - { boot.isContainer = true; - networking.hostName = mkDefault name; - networking.useDHCP = false; - assertions = [ - { - assertion = config.privateNetwork -> stringLength name < 12; - message = '' - Container name `${name}` is too long: When `privateNetwork` is enabled, container names can - not be longer than 11 characters, because the container's interface name is derived from it. - This might be fixed in the future. See https://github.com/NixOS/nixpkgs/issues/38509 - ''; - } - ]; + let + extraConfig = { + _file = "module at ${__curPos.file}:${toString __curPos.line}"; + config = { + boot.isContainer = true; + networking.hostName = mkDefault name; + networking.useDHCP = false; + assertions = [ + { + assertion = config.privateNetwork -> stringLength name < 12; + message = '' + Container name `${name}` is too long: When `privateNetwork` is enabled, container names can + not be longer than 11 characters, because the container's interface name is derived from it. + This might be fixed in the future. See https://github.com/NixOS/nixpkgs/issues/38509 + ''; + } + ]; + }; }; in [ extraConfig ] ++ (map (x: x.value) defs); prefix = [ "containers" name ]; |