Commit Graph

1545 Commits

Author SHA1 Message Date
lucasew
8587646ef3 nixos/virtualisation/google-compute-config: minor refactoring
Signed-off-by: lucasew <lucas59356@gmail.com>
2023-05-26 00:56:32 +00:00
illustris
6a20c13258
nixos/proxmox-image: fix qemu build failure 2023-05-25 16:25:43 +05:30
Sandro Jäckel
64361e26b2
nixos/libvirtd: enable polkit
it is enforced by an assert anyway
2023-05-20 17:30:34 +02:00
Maciej Krüger
5bb24e21ee
Merge pull request #231097 from aanderse/lxc/nixos-rebuild-boot 2023-05-16 04:13:01 +02:00
Fabian Möller
c51fe112cc
treewide: pass system argument to eval-config.nix
Calling `eval-config.nix` without a `system` from a Nix flake fails with
`error: attribute 'currentSystem' missing` since #230523. Setting
`system = null` removes the use of `currentSystem` and instead uses the
value from the `nixpkgs` module.
2023-05-12 14:56:23 +02:00
Arian van Putten
6c0935d466
Merge pull request #231140 from NixOS/rosetta-nix-build
modules/rosetta: configure nix build sandbox to use rosetta
2023-05-11 14:21:54 -04:00
ajs124
30bea8d82d nixos/*: remove boot.grub.version 2023-05-10 21:51:26 +02:00
Arian van Putten
a33d032939 modules/rosetta: configure nix build sandbox to use rosetta
With this we can do x86_64 builds on aarch64
2023-05-10 14:28:50 -04:00
Aaron Andersen
dd2c3b1310 nixos/lxc-container: ensure /sbin/init is updated on nixos-rebuild boot 2023-05-10 11:04:07 -04:00
Ryan Lahfa
98167d573d
Merge pull request #229313 from mped-oticon/mped_proxmox_assert
nixos/proxmox-image: Disable O_DIRECT to fix assert when writing to tmpfs
2023-05-08 16:11:40 +02:00
Mark Ruvald Pedersen
66fb2f539a nixos/proxmox-image: Disable O_DIRECT to fix assert
Context summary:
'vma create' can't otherwise write to tmpfs such as /dev/shm.
This is important when used from non-nixos machines which may
have /build as tmpfs.

VMA is Proxmox's virtual machine image format that wraps QEMU images,
augmenting these with proxmox-specific configuration file.
proxmox-image.nix uses the VMA tool to create vma image files.
The VMA tool exists as a patchset ontop of QEMU.

VMA writes its output with open() and O_DIRECT flag.
O_DIRECT does not work on Linux tmpfs [1]. Thus:
$ vma create ~/output.vma ...  # works, assuming home isn't tmpfs.
$ vma create /dev/shm/output.vma ...  # fails since /dev/shm is tmpfs
Failure results in assert(*errp == NULL).

O_DIRECT is a cache performance hint.
But it currently blocks our usage of nixos-generate -f proxmox from
Non-NixOS hosts and Docker.

The patch here simply removes O_DIRECT:
vma-writer.c later performs memalign due to O_DIRECT, but this is
safe to do with or without O_DIRECT.
Ideally, this should be fixed in upstream Proxmox: Perhaps by falling
back to open without O_DIRECT.

Another attempt to fix this SIGABRT is [2], which writes the vma file
directory to $out/ folder -- however that may still be tmpfs mounted
which it is in our case.

[1] https://lore.kernel.org/lkml/45A29EC2.8020502@tmr.com/t/
[2] https://github.com/NixOS/nixpkgs/pull/224282
2023-05-08 12:33:41 +02:00
Vladimír Čunát
5674901601
Revert "nixos/qemu-vm: fix diskless VMs" 2023-05-06 21:41:14 +02:00
Ryan Lahfa
1ab4d7d0c3
Merge pull request #228047 from RaitoBezarius/diskless-vm
nixos/qemu-vm: fix diskless VMs
2023-05-05 15:37:11 +02:00
Peter Kling
996db6d059
virtualisation/qemu-vm: escape bash variable in shell script
Fixes #229729
2023-05-04 09:52:49 +02:00
Raito Bezarius
6e8248c8b2 nixos/qemu-vm: make it possible to use UEFI without bootloaders
`useEFIBoot` is somewhat misleading, but we should make it possible to
enable UEFI environment / firmware without buying into a bootloader.

This makes it possible.
2023-05-02 23:20:03 +02:00
Raito Bezarius
be4e7ef905 nixos/qemu-vm: fix diskless VMs
Previously, it was possible to run with a tmpfs / with
`virtualisation.diskImage = null;`, this was likely broken by my changes
in 4b4e4c3ef9.

It is reintroduced by disabling properly the bootloader for now, as it
is complicated to make it work with.
2023-04-25 02:12:26 +02:00
Raito Bezarius
0df5257b82 nixos/qemu-vm: introduce virtualisation.mountHostNixStore option
Now that `useBootLoader` produces a full system image, moving disk
images can be slow because they have a full Nix store in them.

It does not make sense to keep the 9p mountpoint to shadow the
/nix/store of the VM.

We disable it if we have `useBootLoader` and introduce an option for
easy overrides.
2023-04-23 23:58:46 +02:00
Florian Klink
6b27ed3229
Merge pull request #169116 from ElvishJerricco/systemd-stage-1-networkd
Systemd stage 1 networkd
2023-04-21 18:40:59 +02:00
Raito Bezarius
614b83a328 nixos/virtualisation/qemu-vm: remove persistBootDevice option
This option has been introduced in 678eed323f without realizing there was this
PR inflight, unfortunately, it collide with what this PR does and make
it irrelevant.

Therefore, I remove it here.
2023-04-21 13:00:19 +02:00
Raito Bezarius
76c7b656bf nixos/qemu-vm: refactor bootDisk generation using make-disk-image 2023-04-21 13:00:18 +02:00
Weijia Wang
e2d6255e9e
Merge pull request #226882 from wegank/parallels-guests-final
systemd.services.prlshprint: fix type
2023-04-21 10:37:11 +03:00
Artturi
b83db86a9e
Merge pull request #222080 from Stunkymonkey/nixos-optionalString 2023-04-20 16:07:30 +03:00
Ryan Lahfa
645bc49f34
Merge pull request #225981 from jnsgruk/multipass-wait-online
multipass: don't start until online
2023-04-19 18:04:47 +02:00
Weijia Wang
8eb15c5320 systemd.services.prlshprint: fix type 2023-04-18 18:55:47 +03:00
Sandro
893f073fe1
Merge pull request #224171 from alan-strohm/master
nixos/proxmox-image: don't assume virtio0 is using local-lvm storage
2023-04-16 03:30:46 +02:00
adisbladis
4ab1021a1b
Merge pull request #213036 from SuperSandro2000/cri-o/update_storagedrivers
nixos/cri-o: add aufs, devmapper, and zfs to storageDrivers
2023-04-15 16:27:50 +12:00
Calum MacRae
7d03f1aa9f
nixos/cri-o: add aufs, devmapper, and zfs to storageDrivers
Update the storageDrivers option to align with the supported drivers, as listed here:
https://github.com/containers/storage/blob/master/docs/containers-storage.conf.5.md#storage-table
2023-04-15 01:15:46 +02:00
Jon Seager
0dfc5c14d7
nixos/multipass: don't start until online 2023-04-14 11:27:57 +01:00
Sandro
603320b64f
Merge pull request #204534 from SuperSandro2000/boot-tmp 2023-04-12 21:37:47 +02:00
Will Fancher
fef26d88e2 systemd-initrd: Support secrets when boot loader doesn't
initrd-secrets: Fix service config with systemd-stage-1
2023-04-11 15:20:47 -04:00
Felix Buehler
327b0cff7a treewide: use more lib.optionalString 2023-04-07 13:38:33 +02:00
Alan Strohm
121fddc901 nixos/proxmox-image: don't assume virtio0 is using local-lvm storage 2023-03-31 18:42:01 -07:00
David Houston
6e8c2760ac
maintainers: Update houstdav000 -> cyntheticfox 2023-03-30 18:50:29 -04:00
Sandro Jäckel
056be64f11 nixos/podman: add example to enable network dns 2023-03-27 08:42:29 +10:00
Sandro
6f558d3009
Merge pull request #212599 from SuperSandro2000/podman-cleanup 2023-03-27 00:05:30 +02:00
Sandro Jäckel
a5d95ac5fc
nixos/tmp: move /tmp options under boot.tmp 2023-03-19 18:49:37 +01:00
Vladimír Čunát
a86610144f
Merge #219444: staging-next 2023-03-04 2023-03-15 17:35:39 +01:00
Sandro
83dcadaf61
Merge pull request #218482 from illustris/ec2-metadata
nixos/ec2: don't populate nonexistent metadata files
2023-03-15 16:53:40 +01:00
Martin Weinelt
d03d74aa67
Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:
- pkgs/development/python-modules/aiopulse/default.nix
- pkgs/development/python-modules/identify/default.nix
- pkgs/development/python-modules/spur/default.nix
2023-03-12 23:28:23 +01:00
Guillaume Girol
db901673ea
Merge pull request #209156 from pwaller/issue-114594
nixos/grub: Name initrd-secrets by system, not by initrd
2023-03-12 18:50:33 +00:00
github-actions[bot]
98d00577f6
Merge master into staging-next 2023-03-09 06:01:01 +00:00
Will Fancher
46089f7efe
Merge pull request #217886 from lilyinstarlight/fix/qemu-vm-initrd-mkdir-0755
nixos/qemu-vm: fix minor typo
2023-03-08 19:17:28 -05:00
Martin Weinelt
e93e71ce44 Merge remote-tracking branch 'origin/master' into staging-next 2023-03-04 14:58:24 +01:00
K900
e8fbf83f5e nixos/virtualbox-image: remove the raw image trick
This is slower, but the raw image thing no longer works with VirtualBox 7.0.6.
2023-03-04 13:39:50 +03:00
Frederik Rietdijk
8cf8d77121 Merge master into staging-next 2023-03-04 09:38:25 +01:00
Linus Heckemann
48269da315
Merge pull request #206839 from lheckemann/stateless-vms
nixos/qemu-vm: allow use without a disk image
2023-03-04 02:02:45 +01:00
Martin Weinelt
3686005e6e Merge remote-tracking branch 'origin/staging-next' into staging 2023-02-28 21:17:51 +00:00
maxine
7ceeb440c1
Merge pull request #213604 from mikroskeem/feature/docker-local-log-driver
nixos/docker: add "local" as valid logDriver option
2023-02-28 21:47:55 +01:00
github-actions[bot]
445e4a4069
Merge staging-next into staging 2023-02-28 12:01:54 +00:00
Jon Seager
cad6488509
nixos/multipass: typo s/SyslogIdentifer/SyslogIdentifier/ 2023-02-28 10:45:38 +00:00