mirror of
https://github.com/nix-community/disko.git
synced 2026-11-30 13:03:28 +01:00
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>