interactive-vm: disable disko.enableConfig to avoid duplicate swapDevices

When building `vmWithDisko` via `extendModules`, the outer `module.nix` is
evaluated with `disko.enableConfig = true` (default), contributing
`swapDevices = cfg.devices._config.swapDevices or [ ]`. At the same time,
`interactive-vm.nix` contributes `cfg_.disko.devices._config.swapDevices`
via `diskoBasedConfiguration`.

Because `swapDevices` in NixOS is a `listOf submodule`, definitions are
merged by concatenation, causing every swap device from the disko config to
appear twice in the generated fstab. During boot, `systemd-fstab-generator`
then fails with exit status 1 due to conflicting generated swap units.

Setting `disko.enableConfig = false` in `interactive-vm.nix` prevents the outer
module from injecting unmapped host disko configurations, while allowing
`interactive-vm.nix` to supply the QEMU-mapped devices cleanly.

Closes #1283

Signed-off-by: Ravi Arnan <raviarnankeren@gmail.com>
This commit is contained in:
Ravi Arnan committed 2026-10-19 16:43:31 +08:00
1 parent 725ea35e41
commit 5c23390694
2 files changed
+22

No files matched your search

+1
View File
@@ -55,6 +55,7 @@ in
diskoBasedConfiguration
];
disko.enableConfig = false;
disko.testMode = true;
disko.imageBuilder.copyNixStore = false;