Commit Graph

2415 Commits

Author SHA1 Message Date
nikstur
0e8c175183 nixos/qemu-vm: add option to set shared directory cache policy (#563922) 2026-09-30 16:09:10 +00:00
Valentin Gagarin
159ea64de6 nixos/qemu-vm: add option to set shared directory cache policy
This also sets the caching default to "auto", since this is probably what we want.
2026-09-26 00:09:51 +02:00
nikstur
088e6eb738 nixos/qemu-vm: restore symlink resolution in sharedDirectories (#564379) 2026-09-25 13:27:02 +00:00
lassulus
155b7da1a8 nixos/virtualbox-guest: add package option (#552123) 2026-09-25 07:29:15 +00:00
Robert Hensing
fe6242d67a nixos/nixos-containers: fix flake container eval (#561227) 2026-09-22 11:01:02 +00:00
Maximilian Bosch
1fe4fc8444 nixos/qemu-vm: fix eval
`nix-instantiate -A nixosTests.nixos-test-driver` fails with

   error: A definition for option `virtualisation.host.pkgs' is not of type `An evaluation of Nixpkgs; the top level attribute set of packages'. Definition values:
   - In `/home/ma27/Projects/nixpkgs-2/nixos/modules/virtualisation/qemu-vm.nix'
2026-09-21 09:59:17 +02:00
Ihar Hrachyshka
0bce973c41 linux-builder-vz: fix nixdb retention; harden registration against gc (#557239) 2026-09-19 02:06:30 +00:00
rszyma
08e23790f9 nixos/qemu-vm: restore symlink resolution in sharedDirectories
9p did resolve directory symlinks passed via
sharedDirectories.<item>.source, and new implementation doesn't.
Under the new virtiofs implementation, mounting symlinks manifests
failures only when trying to access the mount in the VM, with an error:
$ ls /mnt/my_shared_dir
ls: /mnt/my_shared_dir: Input/output error
2026-09-18 01:19:37 +02:00
Robert Hensing
b3f4821490 nixos/tests/containers-eval: init + improve error messages 2026-09-17 07:14:55 +02:00
Robert Hensing
a9d3cf39fa nixos/nixos-containers: report host nix options accurately 2026-09-17 07:14:53 +02:00
Robert Hensing
bf78e69f9e nixos/nixos-containers: fix typo
Pre-existing, so separate commit.
2026-09-17 07:14:22 +02:00
Robert Hensing
dea68e7db0 nixos/nixos-containers: assert flake container needs nix on host 2026-09-17 07:14:22 +02:00
Robert Hensing
960f040ac7 nixos/nixos-containers: report assertions correctly
It used to report

    error: expected a set but found a string: "<the actual message>"
2026-09-17 07:14:22 +02:00
Robert Hensing
7657773d57 nixos/nixos-containers: fix flake container eval
See 4c9db6cedb (r199475394)
2026-09-17 07:14:17 +02:00
Jeremy Fleischman
0390e69d8d nixos/qemu-vm: virtiofsd requires shared memory
We recently switched to virtiofs for qemu-vms run on Linux
(https://github.com/NixOS/nixpkgs/pull/552774). I suspect we
only tested it with nixos tests, which just [happen to enable shared memory](673028b7b1/nixos/lib/testing/driver.nix (L259))
for the ssh backdoor. However, for folks using qemu-vm.nix outside of nixos
tests, they'll experience virtiofsd crashing with [some very obtuse
messages](https://gitlab.com/virtio-fs/virtiofsd/-/work_items/127).

Reported by @fricklerhandwerk in
<https://github.com/NixOS/nixpkgs/pull/552774#issuecomment-5668027063>.
2026-09-14 17:46:56 -05:00
Adam C. Stephens
fed772ea5f nixos/incus/virtual-machine: explicitly enable repart image
Fixes hydra eval error
2026-09-14 09:33:18 -04:00
Friedrich Altheide
8d5c759816 nixos/virtualbox-guest: add package option 2026-09-14 11:53:35 +02:00
Ihar Hrachyshka
a11877ed8a nixos/qemu-vm: restore 9p support for darwin
Keep virtiofs for linux, but use 9p otherwise. This restores darwin
support - which is used both for `darwin.linux-builder` and `build-vm`
nixpkgs VMs.

This patch does not restore removed options: their utility is not
immediately clear to me, and restoring the options would complicate the
code for unclear gains. Hopefully, the reduced scope also makes it more
palatable for maintainers to accept this functionality back in.
2026-09-11 21:55:17 -04:00
nixpkgs-ci[bot]
5a446c304d Merge master into staging-nixos 2026-09-10 18:11:51 +00:00
nixpkgs-ci[bot]
a4b7ef446c Merge master into staging-next 2026-09-10 18:10:48 +00:00
Adam C. Stephens
3311d764cf nixos/incus/virtual-machine: switch to repart image for more customization (#560600) 2026-09-10 14:23:00 +00:00
Adam C. Stephens
3466897b32 nixos/incus/virtual-machine: add hydra build product 2026-09-09 23:45:36 -04:00
lassulus
2c1231d61d nixos/qemu-vm: 9p -> virtiofs (#552774) 2026-09-08 19:09:35 +00:00
Adam C. Stephens
7c9acd1d18 nixos/incus/virtual-machine: increase ESP to allow for >=10 kernels 2026-09-08 11:21:42 -04:00
Ihar Hrachyshka
ebdfdea4aa nixos/openvswitch: clean up transient ports on boot
Run transient port cleanup after ovsdb starts and before ovs-vswitchd
starts.

To cite ovs-ctl(8),

  This is important on certain environments where some ports are
  going to be recreated after reboot, but other ports need to be
  persisted in the database.

Consumers (e.g. libvirt or ovn-kubernetes) may mark ports as transient
and expect these ports will be removed from ovsdb on new boot.

Note: this mimics upstream rhel systemd unit:
https://github.com/openvswitch/ovs/blob/main/rhel/usr_lib_systemd_system_ovs-delete-transient-ports.service

Assisted-by: Codex gpt-5.6-sol high
2026-09-07 22:23:27 -04:00
nixpkgs-ci[bot]
47ca90b74c Merge master into staging-nixos 2026-09-07 06:20:59 +00:00
Masum Reza
d6e317c7b5 nixos/qemu-vm: Fix typo in consoles example (#490771) 2026-09-07 04:37:49 +00:00
Robert Hensing
28cf1a03f6 nixosTests: do not depend on nix by default (#553728) 2026-09-06 18:50:51 +00:00
Adam C. Stephens
03ff1ca01f nixos/incus/virtual-machine: increase inodes
Default is 16KiB/inode, so set to 8KiB/inode.

Assisted-By: OpenAI Codex GPT-5.6 Terra
2026-09-06 12:46:24 -04:00
Adam C. Stephens
f0c5baaa99 nixos/incus/virtual-machine: pad disk image and increase ESP
Assisted-By: OpenAI Codex GPT-5.6 Terra
2026-09-06 12:46:23 -04:00
Adam C. Stephens
cbcbfeb169 nixos/incus/virtual-machine: add repart image
Assisted-By: OpenAI Codex GPT-5.6 Terra
2026-09-06 12:46:19 -04:00
Ihar Hrachyshka
3234e13977 nixos/openvswitch: use socket activation for ovsdb
It allows vswitchd - and its in-memory state - to survive ovsdb-server
restart. (Proved with a NixOS test and a canary openflow rule.)

This was implemented in upstream systemd unit files in 4.0.0:
https://www.mail-archive.com/ovs-dev%40openvswitch.org/msg102638.html

pfd implementation: https://github.com/openvswitch/ovs/commit/aea0116

Assisted-by: Codex, gpt-5.6-sol medium
2026-09-01 23:34:02 -04:00
Ihar Hrachyshka
00fc29ec12 nixos/openvswitch: use RestartMode=direct
Upstream enabled it for its units to avoid cascade failures.

e80b5d3a43
2026-09-01 23:34:00 -04:00
Weijia Wang
4f7af75727 nixos/libvirtd: disable cloud-hypervisor on unsupported platforms (#556564) 2026-08-31 13:42:18 +00:00
Ihar Hrachyshka
7b9d19f734 vz-vm: factor guest filesystem layout
Assisted-by: Codex, gpt-5.6-sol medium
2026-08-28 22:40:45 -04:00
Ihar Hrachyshka
32d95359f0 {qemu,vz}-vm: share store registration info
Assisted-by: Codex, gpt-5.6-sol medium
2026-08-28 22:40:44 -04:00
Ihar Hrachyshka
b726f29a3c linux-builder-vz: require store registration for boot
This guarantees that the builder will never boot without prepared nixdb.
2026-08-28 19:36:36 -04:00
Ihar Hrachyshka
dc9250e612 qemu-vm: omit registration without lower store
If there's no store, there's no registration path contained in it.
2026-08-28 19:36:34 -04:00
Ihar Hrachyshka
ef8ea67eaa {qemu,vz}-vm: load registration from lower store
Otherwise, if gc later decides to remove registration derivation from
its store, consequent reboots will point to a missing registration file.

(As of this patch, this is not fatal because registration service
failure doesn't fail builder boot; a later patch in the series makes
registration service required, making sure we never boot with db that is
not populated.)
2026-08-27 22:55:16 -04:00
Ihar Hrachyshka
2abbaae08a linux-builder-vz: order store registration after tmpfiles
While nix-store --load-db should create missing directories itself, it's
better to let tmpfiles service to prepare directories before
registration.
2026-08-27 22:54:52 -04:00
Ihar Hrachyshka
8e2dade8b2 linux-builder-vz: persist Nix database
Otherwise on reboot the builder "forgets" about any store paths present
under /nix/store that are not part of the initial registration.
2026-08-27 22:54:51 -04:00
nikstur
de829fca8c nixos/qemu-vm: 9p -> virtiofs 2026-08-26 13:51:36 +02:00
Weijia Wang
8f60e07860 nixos/libvirtd: disable cloud-hypervisor on unsupported platforms 2026-08-26 01:32:20 +02:00
tomberek
cae55792bb nixos/containers: fix warning messages for container registries (#553400) 2026-08-23 03:46:06 +00:00
rnhmjoj
374555fd64 nixos/containers: fixup 21e032ff95 2026-08-21 10:49:15 +02:00
Robert Hensing
4c9db6cedb nixos/nixos-containers: support nix.enable = false
The container tests generally don't need this, it seems to work fine
so far, and this could genuinely be useful in image-based deployments.

Why an error instead of inheriting the setting?
Containers do not and should not inherit a parent setting like this.
If a container declares requiring too much, that's the mistake.
If the host does not support a container's declared environment, that's
a host problem.
If the container inherits the setting from the parent, the container's
configuration is not respected.

Example of the error message:
nodes.machine.containers.web-noip requires a Nix daemon but the host does not provided it, as option nodes.machine.nix.daemon.enable is disabled
2026-08-17 23:31:24 +02:00
Fernando Rodrigues
ebd896ab95 xen: 4.20.4 -> 4.22.0 (#471250) 2026-08-17 12:45:31 +00:00
quantenzitrone
93a668bc54 squashfs-tools: rename from squashfsTools, enable structuredAttrs
upstream package is called squashfs-tools and other distros also call the package this way https://repology.org/project/squashfs-tools
2026-08-17 14:32:21 +02:00
nixpkgs-ci[bot]
be41d73280 Merge master into staging-nixos 2026-08-17 00:11:51 +00:00
Michele Guerini Rocco
21e032ff95 nixos/containers: fix IPv4-mapped addresses (#536638) 2026-08-16 22:25:34 +00:00