containers: fix for NixOS 26.05

This commit is contained in:
Jonas Nick
2026-08-08 06:54:06 +00:00
parent e8328251af
commit 8f7dcb6e2a
7 changed files with 49 additions and 3 deletions
+12 -1
View File
@@ -56,12 +56,23 @@ let
extra-container.lib.buildContainers {
inherit system legacyInstallDirs;
config = {
imports = [ ./extra-container-workaround.nix ];
# The container name has a 11 char length limit
containers.nb-test = { config, ... }: {
imports = [
{
config = {
extra = config.config.test.container;
extra = {
# Defined here instead of in the container config because NixOS
# 26.05 derives the container's `networking.interfaces` from
# `localAddress`, which extra-container derives from
# `addressPrefix`. Reading it from the container config would
# thus be circular.
addressPrefix = "10.225.255";
inherit (config.config.test.container)
enableWAN firewallAllowHost exposeLocalhost;
};
config = testConfig;
};
}