@@ -465,20 +465,24 @@ in
465465 merge = loc: defs: (import ../../lib/eval-config.nix {
466466 inherit system;
467467 modules =
468− let extraConfig =
469− { boot.isContainer = true;
470− networking.hostName = mkDefault name;
471− networking.useDHCP = false;
472− assertions = [
473− {
474− assertion = config.privateNetwork -> stringLength name < 12;
475− message = ''
476− Container name `${name}` is too long: When `privateNetwork` is enabled, container names can
477− not be longer than 11 characters, because the container's interface name is derived from it.
478− This might be fixed in the future. See https://github.com/NixOS/nixpkgs/issues/38509
479− '';
480− }
481− ];
468+ let
469+ extraConfig = {
470+ _file = "module at ${__curPos.file}:${toString __curPos.line}";
471+ config = {
472+ boot.isContainer = true;
473+ networking.hostName = mkDefault name;
474+ networking.useDHCP = false;
475+ assertions = [
476+ {
477+ assertion = config.privateNetwork -> stringLength name < 12;
478+ message = ''
479+ Container name `${name}` is too long: When `privateNetwork` is enabled, container names can
480+ not be longer than 11 characters, because the container's interface name is derived from it.
481+ This might be fixed in the future. See https://github.com/NixOS/nixpkgs/issues/38509
482+ '';
483+ }
484+ ];
485+ };
482486 };
483487 in [ extraConfig ] ++ (map (x: x.value) defs);
484488 prefix = [ "containers" name ];