Commit graph

2177 commits

Author SHA1 Message Date
Illia Ostapyshyn 43300fe72a
nixos/qemu-vm: set permissions for tmpfs root
World-writable fs root breaks ssh key authentication (and likely other
programs).
2024-12-09 16:44:16 +01:00
Arne Keller 6137b22220
nixos/qemu-vm: minor readability improvements (#339681) 2024-12-09 06:35:00 +01:00
codgician d07d8a5589
waagent: improve code readability and doc 2024-12-08 11:05:57 +08:00
codgician 0d7c515332
waagent: init module 2024-12-06 23:32:16 +08:00
Nikita Pedorich 77e81fd860
nixos/podman: add systemd to extraPackages 2024-12-06 19:48:00 +09:00
Yethal 04bf3d8774
nixos/modules/virtualisation: additional configuration options (#349537)
oci-containers: additional configuration options
2024-12-05 12:48:41 -05:00
Sefa Eyeoglu d2f5c28d0d
containerd: 1.7.23 -> 2.0.0 (#356618) 2024-12-02 17:19:46 +01:00
Adam C. Stephens 9ab59bb5fb
incus: format 2024-11-30 00:04:54 -05:00
phaer 91d74082c4 virtualisation/proxmox-lxc: use system.build.image 2024-11-29 17:13:54 +01:00
phaer 06ad3811a8 virtualisation/lxc-container: use system.build.image 2024-11-29 17:13:52 +01:00
phaer f3563c996e virtualisation/azure-image: use system.build.image 2024-11-29 17:12:27 +01:00
phaer 77fce1dc58 virtualisation/digital-ocean: use system.build.image 2024-11-29 17:12:26 +01:00
phaer 41db5209c7 virtualisation/google-compute: use system.build.image 2024-11-29 17:12:26 +01:00
phaer a230d5228d virtualisation/hyperv-image: hyperv.vmFileName -> image.fileName 2024-11-29 17:12:26 +01:00
phaer 6d50a8c57f virtualisation/kubevirt: use system.build.image 2024-11-29 17:12:26 +01:00
phaer d8410d8366 virtualisation/oci-image: use system.build.image 2024-11-29 17:12:26 +01:00
phaer a0ce661c99 virtualisation/proxmox-image: use system.build.image 2024-11-29 17:12:26 +01:00
phaer 342a5021df virtualisation/vagrant-virtualbox: use system.build.image 2024-11-29 17:12:26 +01:00
phaer 6cc7449e30 virtualisation/virtualbox: virtualbox.vmFileName -> image.fileName 2024-11-29 17:12:26 +01:00
phaer b0b3a75676 virtualisation/vmware-image: vmware.vmFileName -> image.fileName 2024-11-29 17:12:26 +01:00
phaer 47c83cb438 virtualisation/linode-image: Use system.build.image 2024-11-29 17:12:26 +01:00
phaer 40142caad0 format files with nixfmt 2024-11-29 17:12:26 +01:00
Adam C. Stephens 6de1312a38
nixos/lxc/container: fix useDhcp with veth (#358806) 2024-11-29 10:45:09 -05:00
Adam C. Stephens f50a1bd99d
nixos/lxc/container: fix useDhcp with veth
https://github.com/NixOS/nixpkgs/pull/347283 changed the default to
exclude non-physical network Kind, but that unfortunately also includes
`veth` which LXC uses for its network interfaces. Re-enable that
functionality so users can use networkd with useDHCP.
2024-11-29 10:37:14 -05:00
Franz Pletz c6369bb94a
nixos-containers: fix enableTun option (#357276) 2024-11-23 17:18:57 +01:00
Franz Pletz c1fb3d817b
nixos/virtualisation: fix rendering of example in diskSize (#355944) 2024-11-23 17:06:13 +01:00
seth 328ebf2094
nixos/containerd: load after local-fs.target & dbus.service
18e4ea9a6c
2024-11-22 14:11:36 -05:00
Paul Grandperrin 853d34898d
nixos-containers: fix enableTun option
When using private users, `mknod /dev/net/tun` is run from the guest and therefor needs the `m` modifier.
2024-11-19 14:43:02 +01:00
Sandro 12afb73784
nixos/virtualisation: fix rendering of example in diskSize 2024-11-14 18:12:16 +01:00
Dawid Dziurla ea9923c62f
nixos/incus: add incus-user service and socket 2024-11-13 12:25:40 +01:00
Sandro 681bc920f8
nixos/libvirt: fix shellcheck findings with enableStrictShellChecks enabled (#349620) 2024-11-12 19:18:26 +01:00
Sandro cd67342284
nixos/docker: keep live-restore disabled by default (#348983) 2024-11-05 16:44:19 +01:00
Sandro a96e4d9bfe
docker: use lib.versionOlder in literalExpression 2024-11-05 11:23:29 +01:00
Sandro a04d33c0c3
vmware-guest: allow the user to override the open-vm-tools package (#347939) 2024-11-05 02:08:39 +01:00
taku0 a009d2b73f nixos-container: do not touch os-release if it is a symlink
`/etc/os-release` of NixOS containers, which are
`/var/lib/nixos-containers/*/etc/os-release` on the host, are usually
symlinks to the absolute path `/etc/static/os-release` but it doesn't
exist in non-NixOS host.  Since `startScript` is evaluated by the host
system, both `[ -e "$root/etc/os-release" ]` and
`touch "$root/etc/os-release"` fail, so that the container fails to
start on the second boot (on the first boot, the symlink doesn't exist,
so the command succeeds).

This commit avoids `touch "$root/etc/os-release"` if
`$root/etc/os-release` is a symlink, so imperative NixOS containers are
usable on non-NixOS host.
2024-11-03 22:02:50 +09:00
Sefa Eyeoglu 12ba522dfd
nixos/docker: move imports
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2024-11-02 20:15:35 +01:00
benaryorg 048d8cceee
nixos/qemu-vm: minor readability improvements
The script generation is using the *lib.imap* functions in several other places already so this spot using a shell script variable instead seems a bit off.
Moving the previous shell script code to Nix improves upon the Nix code by removing the additional *lib.optionalString* for the variable initialisation making the code more concise.
The shell code is reduced to a one-liner per disk image, making it much easier to determine that this is a templated loop.

Compare the previous:

```bash
idx=0
if ! test -e "empty$idx.qcow2"; then
    /nix/store/73n3qwfazqw8zwr1z840jsirjllqpg9v-qemu-host-cpu-only-for-vm-tests-9.0.2/bin/qemu-img create -f qcow2 "empty$idx.qcow2" "20480M"
fi
idx=$((idx + 1))
if ! test -e "empty$idx.qcow2"; then
    /nix/store/73n3qwfazqw8zwr1z840jsirjllqpg9v-qemu-host-cpu-only-for-vm-tests-9.0.2/bin/qemu-img create -f qcow2 "empty$idx.qcow2" "20480M"
fi
idx=$((idx + 1))
if ! test -e "empty$idx.qcow2"; then
    /nix/store/73n3qwfazqw8zwr1z840jsirjllqpg9v-qemu-host-cpu-only-for-vm-tests-9.0.2/bin/qemu-img create -f qcow2 "empty$idx.qcow2" "20480M"
fi
idx=$((idx + 1))
```

and the new:

```bash
test -e "empty0.qcow2" || /nix/store/73n3qwfazqw8zwr1z840jsirjllqpg9v-qemu-host-cpu-only-for-vm-tests-9.0.2/bin/qemu-img create -f qcow2 "empty0.qcow2" "20480M"
test -e "empty1.qcow2" || /nix/store/73n3qwfazqw8zwr1z840jsirjllqpg9v-qemu-host-cpu-only-for-vm-tests-9.0.2/bin/qemu-img create -f qcow2 "empty1.qcow2" "20480M"
test -e "empty2.qcow2" || /nix/store/73n3qwfazqw8zwr1z840jsirjllqpg9v-qemu-host-cpu-only-for-vm-tests-9.0.2/bin/qemu-img create -f qcow2 "empty2.qcow2" "20480M"
```

While the line becomes slightly longer it also becomes immediately obvious on a visual level which parts are changing for each invocation (i.e. different disk sizes as well as the incremented counter stick out).
Since the "idx" variable is now embedded, this also becomes copy&pastable, and also shows the maximum index readily in the last line, as opposed to having to count the number of if statements otherwise.
None of this is *needed* of course.

Signed-off-by: benaryorg <binary@benary.org>
2024-11-02 02:57:40 +00:00
Jeremy Kolb c756281b2e Add kjeremy as a maintainer 2024-10-31 13:18:32 -04:00
Jeremy Kolb 145c5d03ad virtualisation.vmware.guest: allow the user to override the open-vm-tools package 2024-10-31 13:18:32 -04:00
Robert Hensing 2ba15d4f55
modules/virtualisation: add shared options, merge various diskSize options (#341058) 2024-10-27 17:49:33 +01:00
phaer c6da9ef32d modules/virtualisation: add unified diskSize opt
See https://github.com/NixOS/nixpkgs/pull/339535 and https://github.com/NixOS/nixpkgs/pull/341058
2024-10-27 12:28:37 +01:00
Sefa Eyeoglu 840af567fb
nixos/libvirt: fix shellcheck findings with enableStrictShellChecks enabled
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2024-10-18 22:02:14 +02:00
phaer 88b285c01d nixos/virtualisation: format image-related files 2024-10-18 13:32:50 +02:00
Friedrich Altheide 53b37c99b4 virtualbox: nixfmt 2024-10-16 13:15:42 +02:00
Sefa Eyeoglu 77a65d189a
nixos/docker: keep live-restore disabled by default
See https://docs.docker.com/engine/daemon/live-restore/
See https://discourse.nixos.org/t/docker-hanging-on-reboot/18270/5
Closes https://github.com/NixOS/nixpkgs/issues/182916

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2024-10-16 11:17:37 +02:00
Sefa Eyeoglu 5900b644bb
nixos/docker: move live-restore option into daemon.settings
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2024-10-16 11:15:37 +02:00
Arian van Putten 0890727868 nixos/ec2-data: Make arianvp maintainer 2024-10-14 12:44:16 +02:00
nikstur ca8147e42e
qemu-vm: fix case-hack appearing in store image (#347636) 2024-10-12 21:50:11 +02:00
Pol Dellaiera a72a8bcfb3
treewide: fix typo chown -> chmod (#347678) 2024-10-10 10:55:34 +02:00
r-vdp 11d9033d85
nixos/ec2: Fix typo, chown -> chmod 2024-10-10 09:02:06 +02:00
Franz Pletz be6a26cae7
nixos/libvirtd: add startDelay and shutdownTimeout option (#347023) 2024-10-09 16:58:16 +02:00
Michael Hoang b2e9cc6167 qemu-vm: fix case-hack appearing in store image 2024-10-09 16:59:48 +11:00
Peder Bergebakken Sundt cd9a00431c
ec2: shellcheck fixes (#340489) 2024-10-07 15:39:38 +02:00
codgician 2a848b3732
nixos/libvirtd: add startDelay and shutdownTimeout option 2024-10-07 14:43:45 +08:00
Fernando Rodrigues 251dc99c70
nixos/xen: simplify package options
Signed-off-by: Fernando Rodrigues <alpha@sigmasquadron.net>
2024-10-06 20:24:29 +00:00
r-vdp cc28f2bef5
nixos/containers: Fix shellcheck issues 2024-10-03 17:57:41 +02:00
Emily 818089ba73
teams: create the Xen Project Team and rename instances of Xen to Xen Project. (#344314) 2024-09-28 15:57:32 +01:00
Fernando Rodrigues dc7db9bcc4
treewide: rename Xen to Xen Project
Xen is a trademark of the Cloud Software Group; we're not packaging
Xen(Server), we're packaging the Xen Project Hypervisor, which is open
source and owned by the Linux Foundation.

This is based on advice from Kelly Choi, the Xen Project Community
Manager, who has assisted us in the branding aspects of pacakaging.

Signed-off-by: Fernando Rodrigues <alpha@sigmasquadron.net>
2024-09-28 14:53:59 +00:00
Fernando Rodrigues 82f0ee2c5b
treewide: assign maintainership of the Xen-related packages to the Xen Project Hypervisor Team
Signed-off-by: Fernando Rodrigues <alpha@sigmasquadron.net>
2024-09-28 14:53:59 +00:00
K900 307dda84c0 nixos/nixos-containers: partially revert aa4570ca05
Word splitting is actually intentional here, as both of those variables
can (and often do) contain multiple flags.
2024-09-27 10:00:58 +03:00
r-vdp aa4570ca05
nixos/nixos-containers: fix shellcheck errors in systemd scripts 2024-09-26 21:54:07 +02:00
Will Fancher ea2838e1ce
nixos/qemu-vm: Ensure 9pnet_virtio module is loaded for shared dirs (#343574) 2024-09-25 23:11:08 -04:00
Will Fancher 4e54d10912 nixos/qemu-vm: Ensure 9pnet_virtio module is loaded for shared dirs
When `diskImage = null`, the root fs is a tmpfs instead of
`/dev/vda`. Thus, it doesn't have to wait for virtio modules to load
before being mounted. The root fs is a dependency of shared
directories by nature of being their parent directory. Without
depending on `/dev/vda`, these shared directories may attempt to mount
without virtio modules being loaded.
2024-09-25 17:37:34 -04:00
Artturin e0464e4788 treewide: replace stdenv.is with stdenv.hostPlatform.is
In preparation for the deprecation of `stdenv.isX`.

These shorthands are not conducive to cross-compilation because they
hide the platforms.

Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way

One example of why this is bad and especially affects compiler packages
https://www.github.com/NixOS/nixpkgs/pull/343059

There are too many files to go through manually but a treewide should
get users thinking when they see a `hostPlatform.isX` in a place where it
doesn't make sense.

```
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is"
fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is"
```
2024-09-25 00:04:37 +03:00
Fernando Rodrigues da018db144
nixos/xen: fix spurious ShellCheck warning
It thinks we want to expand the `*` regex expressions inside the `sed`
commands. We do not.

Signed-off-by: Fernando Rodrigues <alpha@sigmasquadron.net>
2024-09-21 13:37:01 -03:00
Adam Stephens ee30c817cb
incus-lts: 6.0.1 -> 6.0.2
https://discuss.linuxcontainers.org/t/incus-6-0-2-lts-has-been-released/21633
2024-09-19 12:17:17 -04:00
Emily 5320e21a4b
nixos/xen: refactor dom0 configuration (#324911) 2024-09-18 23:22:38 +01:00
Fernando Rodrigues 9e5f77a3e2
nixos/xen: refactor dom0 configuration
- Cleans up downstream systemd units in favour of using upstream units.
- Xen 4.18 on Nixpkgs now supports EFI booting, so we have an EFI boot
  builder here that runs after systemd-boot-builder.py.
- Add more options for setting up dom0 resource limits.
- Adds options for the declarative configuration of oxenstored.
- Disables the automatic bridge configuration, as it was broken.
- Drops legacy BIOS boot
- Adds an EFI boot entry builder script.

Signed-off-by: Fernando Rodrigues <alpha@sigmasquadron.net>
Co-authored-by: Yaroslav Bolyukin <iam@lach.pw>
2024-09-18 17:36:39 -03:00
Fernando Rodrigues c3fa245245
nixos/xen: format with nixfmt-rfc-style
Signed-off-by: Fernando Rodrigues <alpha@sigmasquadron.net>
2024-09-17 21:02:14 +00:00
Graham Christensen 76b614be39 amazon-init: include the general system's software and wrappers in PATH
It is surprising that software which was installed by the user at AMI
generation time isn't available to a script run over user data by
default.

When authoring user data to execute at startup, users will now have
more predictable access to baked-in software instead of an extremely
bare-minimum set currently there.
2024-09-17 12:57:43 -04:00
Felix Buehler f1dfc8d363 nixos/virtualisation.vmware.guest: remove with lib; 2024-09-15 10:43:58 +02:00
Felix Buehler 7d7e294262 nixos/virtualbox-image: remove with lib; 2024-09-15 10:43:58 +02:00
Felix Buehler 217557441c nixos/virtualisation.virtualbox.host: remove with lib; 2024-09-15 10:43:58 +02:00
Felix Buehler 49fe5ca12c nixos/virtualisation.virtualbox.guest: remove with lib; 2024-09-15 10:43:58 +02:00
Felix Buehler 3cd35f7830 nixos/virtualisation.docker.rootless: remove with lib; 2024-09-15 10:43:58 +02:00
Sandro da1b2b5adb
nixos/profiles/minimal: drop noXLibs
noXLibs is an advanced option for advanced users which know how to recognize and debug build failures which might be caused by the added overlays.

The minimal profile should be minimal but also save to use for many people and not cause build failures in packages it really shouldn't.
2024-09-14 00:59:14 +02:00
Weijia Wang 7cd6534e42
linuxPackages_latest.prl-tools: 19.4.1-54985 -> 20.0.0-55653 (#341283) 2024-09-13 11:50:54 +02:00
codgician 0d25a978f2
parallels-guest: remove autoMountShares 2024-09-13 00:47:01 +08:00
K900 5cef278170 nixos/qemu-vm: expose installBootLoader as an option, assert when it's enabled without stc
We need stc to actually, well, install the bootloader.
2024-09-12 15:43:28 +03:00
nicoo 9e5a44bcfc
nixos/podman: set preferLocalBuild on trivial runCommands (#340980) 2024-09-10 10:53:46 +00:00
Martin Weinelt 4cec81a995
Revert "modules/virtualisation: add shared options, merge various diskSize options" (#340894)
Breaks evaluation of all nixos tests, and is therefore a channel blocker.
2024-09-10 03:12:55 +02:00
Jonas Chevalier 7c4dde339a
modules/virtualisation: add shared options, merge various diskSize options (#339535) 2024-09-09 21:23:11 +02:00
Aleksana 03e62e5bc3
podman: drop slirp4netns which has been replaced by passt (#313670) 2024-09-09 09:53:33 +08:00
r-vdp 8e325b5086
ec2: shellcheck fixes 2024-09-08 12:27:58 +02:00
phaer b6114fd1d5 hyperv-image: double default size 2024-09-05 15:56:25 +02:00
phaer 3a505620ec hyperv-image: use virtualisation.diskSize 2024-09-05 15:56:25 +02:00
phaer f8a876644b virtualbox-image: use virtualisation.diskSize 2024-09-05 15:56:25 +02:00
phaer a4b1638f7f azure-image: use virtualisation.diskSize 2024-09-05 15:56:25 +02:00
phaer d223461d54 digital-ocean-image: use virtualisation.diskSize
This makes negative diskSizes, that were previously allowed illegal.
2024-09-05 15:56:25 +02:00
phaer d37a3ea1ef promox-image: use virtualisation.diskSize 2024-09-05 15:56:24 +02:00
phaer 9e18e9fedc google-compute-image: use virtualisation.diskSize 2024-09-05 15:56:24 +02:00
phaer 048599f0d7 linode-image: use virtualisation.diskSize 2024-09-05 15:56:24 +02:00
phaer 564b6ce153 oci-{options,image}: use virtualisation.diskSize 2024-09-05 15:56:24 +02:00
phaer 39df221e77 virtualisation-options: init
see header comment in virtualisation-options.nix
2024-09-05 15:56:24 +02:00
phaer 04fadac429 run nixfmt-rfc-style 2024-09-05 15:56:22 +02:00
phaer 74180c6159 brightboxImage: remove, as it seems unmaintained
...and is broken/flaky on master, due to custom script with mknod usage.
2024-09-05 14:40:29 +02:00
Sandro 6e055283a9
virtualisation/azure-images: drop outdated list... (#338426) 2024-09-03 21:16:39 +02:00
Jon Seager d6834ede48
nixos/vmware.guest: disable xf86inputvmmouse on aarch64 (#326395) 2024-09-03 08:02:55 +01:00
phaer 53df1e4ece virtualisation/qemu-vm: disallow nullable diskSize
Because `virtualisation.diskSize = null` does result in a broken vm runner,
see https://github.com/NixOS/nixpkgs/issues/292901.

diskSize was declared to be nullable when it first got types in a
tree-wide commit:
30f0faac22

But it seemingly never actually supported it, as "${cfg.diskSize}M" is
passed to qemu-img create, which doesn't allow an empty size parameter.

closes: https://github.com/NixOS/nixpkgs/issues/292901
2024-09-02 12:09:15 +02:00
Philip Taron 9916dc8728
treewide/nixos: remove with lib; part 2 (#335618) 2024-08-30 15:56:57 -07:00
Felix Buehler dcb2e4eba4 nixos/services.xe-guest-utilities: remove with lib; 2024-08-30 23:01:45 +02:00
Felix Buehler 3e5d6ba7df nixos/virtualisation.vmware.image: remove with lib; 2024-08-30 23:01:45 +02:00
phaer 6b6a7fbc3a virtualisation/azure-images: drop outdated list...
This list of microsoft-hosted, pre-built azure-images might have been
useful, but it hasn't seen any updates since NixOS 16.0.9, eight years
ago. As there is also no in-tree usage, and the results of a quick
GitHub search yielded no out-tree usage which was *not* either about
the same age or looked like vendored copies of this list, this seems
safe to drop to me.
2024-08-30 17:36:48 +02:00
Jonas Chevalier 1e9fccb79f
nixos/azure: add Gen 2 VM, aarch64 and accelerated networking support (#333508) 2024-08-30 10:59:49 +02:00
Matteo Sozzi 389de87aed
lxc: added option for unprivileged containers.
Added extra option to enable unprivileged containers. This includes a
patch to remove the hard-coded path to `lxc-user-nic` and a new security
wrapper to set SUID to `lxc-user-nic`.
2024-08-28 09:18:23 -04:00
Robert Hensing 727351517e
Merge pull request #335660 from Gabriella439/gabriella/containers_nixpkgs.pkgs
containers.*.config.nixpkgs: use `host.pkgs.stdenv.hostPlatform`
2024-08-25 14:40:31 +02:00
Franz Pletz 35b2bfb7ed
Merge pull request #335967 from CajuM/waydroid-svc-stop 2024-08-25 01:40:42 +02:00
Mihai-Drosi Câju 05313fc5b3 nixos/waydroid: Update service definition according to upstream
* Upstream switched the service's Type to dbus in 1.4.0
* Enable D-Bus activation
* Fixes #334687
2024-08-24 19:48:20 +03:00
Gabriella Gonzalez 0b6fa5ee40
virtualisation.oci-containers: Add new imageStream option (#335430)
This adds a new `imageStream` option that can be used in conjunction
with `pkgs.dockerTools.streamLayeredImage` so that the image archive
never needs to be materialized in the `/nix/store`.  This greatly
improves the disk utilization for systems that use container images
built using Nix because they only need to store image layers instead of
the full image.  Additionally, when deploying the new system and only
new layers need to be built/copied.
2024-08-24 04:38:27 +02:00
Someone 2d7db58c2f
Merge pull request #313225 from ereslibre/nvidia-consistent-casing
docs: fix Nvidia casing to be consistent across different places
2024-08-22 16:51:41 +00:00
Someone 4c930c0635
Merge pull request #331071 from ereslibre/fix-nvidia-container-toolkit-docker-contamination
Fix nvidia container toolkit docker contamination
2024-08-22 16:40:06 +00:00
Jared Baur cd998f9de9
nixos/qemu-vm: suppress mkfs.erofs output
The mkfs.erofs utility has a lot of output by default that slows down
running tests. We don't need to capture any of the output from
mkfs.erofs, so we can suppress it.
2024-08-19 14:55:55 -07:00
Gabriella Gonzalez 79e5dbb262 Restore check for container not defining nixpkgs.hostPlatform option 2024-08-18 17:00:16 -07:00
Gabriella Gonzalez 0600255046 Use host.pkgs.stdenv.hostPlatform 2024-08-18 16:49:57 -07:00
Gabriella Gonzalez de83fcb2df containers.*.config: reuse host nixpkgs.pkgs if defined
The minimum reproduction for the problem I'm trying to solve is that
the following NixOS test with a trivial NixOS container:

```
{ inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/24.05";

    flake-utils.url = "github:numtide/flake-utils/v1.0.0";
  };

  outputs = { flake-utils, nixpkgs, self, ... }:
    flake-utils.lib.eachDefaultSystem (system: {
      checks.default = nixpkgs.legacyPackages."${system}".nixosTest {
        name = "test";

        nodes.machine.containers.tutorial.config = { };

        testScript = "";
      };
    });
}
```

… fails with the following error message:

```
error: Neither nodes.machine.nixpkgs.hostPlatform nor the legacy option nodes.machine.nixpkgs.system has been set.
You can set nodes.machine.nixpkgs.hostPlatform in hardware-configuration.nix by re-running
a recent version of nixos-generate-config.
The option nodes.machine.nixpkgs.system is still fully supported for NixOS 22.05 interoperability,
but will be deprecated in the future, so we recommend to set nodes.machine.nixpkgs.hostPlatform.
```

The root of the problem appears to be that in
`nixos/modules/virtualisation/nixos-containers.nix` there is support
for deriving the guest's `nixpkgs.hostPlatform` or
`nixpkgs.localSystem` from the corresponding host's values, but this
doesn't work if the host sets `nixpkgs.pkgs` instead of one of those
values.  In fact, this is what happens when using `pkgs.nixosTest`
(which sets `nixpkgs.pkgs` in
`pkgs/build-support/testers/default.nix`).

The solution I went with was to forward the `nixpkgs.pkgs` setting from
the host to the guest, but only if it is defined (matching the same
treatment as `nixpkgs.hostPlatform` and `nixpkgs.localSystem`.
2024-08-18 11:32:46 -07:00
Adam Stephens 659308a8c1
nixos/incusContainer: create hydra build product 2024-08-17 09:01:17 -04:00
Fabián Heredia Montiel 2c94341824
Merge pull request #328532 from LeSuisse/openstack-config-no-default-root-password
openstack-config: remove hardcoded default password for the root account
2024-08-16 12:30:12 -06:00
Rafael Fernández López 058e8f5ef1
nvidia-podman: remove nvidia wrapper
Since version 4.1.0, podman has support for CDI, and is the
recommended way to expose GPU's for containers for podman.

More information: https://web.archive.org/web/20240729183805/https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html#configuring-podman
2024-08-16 18:16:23 +02:00
Rafael Fernández López f7b4d57421
virtualisation/docker: fix nvidia wrapper
Although CDI should be used in order to not require container runtime
wrappers anymore, fix the nvidia-container-runtime integration with
Docker for cases when Docker < 25.
2024-08-16 15:49:35 +02:00
codgician 94683f9e55 azure-common: take networkmanager users into account for accelerated networking 2024-08-14 11:02:58 +08:00
Pol Dellaiera c556059765
Merge pull request #334344 from truh/docs/oci-containers-docs-urls
nixos/oci-containers: replace broken links to docker docs
2024-08-13 20:44:55 +02:00
Adam C. Stephens 7e95d0361c
Merge pull request #333730 from adamcstephens/incus/from-lxd
nixos/incus: add incus-only vm and container images
2024-08-13 08:39:26 -04:00
Jakob Klepp 0b8954f8d2 nixos/oci-containers: replace broken links to docker docs
Old links in descriptions now lead to 404 pages.
2024-08-13 11:49:08 +02:00
codgician 88c5242599 azure-common: remove bootloader timeout since we can access serial console now 2024-08-13 17:39:47 +08:00
Philip Taron c44e170e3f
nixos/proxmox-lxc: lib.mdDoc is deprecated 2024-08-12 08:02:57 -07:00
Adam Stephens ac18c4d1e9
treewide: remove lxc team from lxd packages and modules
LXD is not under the LXC project any longer
2024-08-10 13:23:38 -04:00
Adam Stephens 094f2b6c9d
nixos/incus: add incus-only vm and container images 2024-08-10 13:23:36 -04:00
Adam Stephens 293c17926d
nixos/incus-agent: init 2024-08-10 12:08:33 -04:00
codgician 028138f201 azure-common: put mlx drivers into availableKernelModules 2024-08-10 11:47:18 +08:00
codgician 1f26575842 azure-common: rm trailing whitespace 2024-08-10 02:03:27 +08:00
codgician 5b4f446d6a azure-common: improve code style 2024-08-09 15:17:12 +08:00
codgician 85fcdad66c azure-common: fix unsupported attribute 2024-08-09 15:10:07 +08:00
codgician 0769bb8aac azure-image: support creating v2 image 2024-08-09 14:47:30 +08:00
codgician f6fe3b3bff azure-common: add accelerated networking configs 2024-08-09 08:47:10 +08:00
codgician 0799550a95 azure-agent: remove x86 assertion 2024-08-09 08:46:10 +08:00
Aleksana e38e6a4490
Merge pull request #328164 from truh/docs/oci-containers-firewall-bypass
nixos/oci-containers: document firewall bypass
2024-08-04 16:35:23 +08:00
Winter 6c11488ce0 Revert "nixos/podman: use given package for dockerCompat"
This reverts commit df74ebcabb, which breaks
eval when Podman is enabled due to infinite recursion [0] [1].

I take full responsibility for merging this without looking too closely
nor running the NixOS test.

[0]: df74ebcabb (commitcomment-145003824)
[1]: https://github.com/NixOS/nixpkgs/pull/267321#issuecomment-2267076978
2024-08-03 15:13:24 -04:00
Chris Maniewski df74ebcabb nixos/podman: use given package for dockerCompat
Defining a package that isn't the default results in podman-compat linking to a different version of podman (always the default one). This PR changes the behavior so that the given alternative package is used for the dockerCompat option as well. This could technically break things for people who rely on this quirk, albeit the previous behavior is probably not what one would expect.

Co-authored-by: Winter <winter@winter.cafe>
2024-08-03 10:54:26 -04:00
Arian van Putten 4e4b14e3f6 nixos/lxd: delegate cgroup to lxd
Just doing what arch does as well: https://gitlab.archlinux.org/archlinux/packaging/packages/lxd/-/blob/main/lxd.service?ref_type=heads

Also container managers should always have this option set. See https://systemd.io/CONTAINER_INTERFACE/
2024-07-31 13:49:58 +02:00
Arian van Putten ee81fdfa56 nixos/lxd: use unified cgroup hierachy 2024-07-31 13:49:58 +02:00
Masum Reza 184957277e
Merge pull request #322282 from tylerjl/tylerjl/print-host-key-soft-fail
nixos/ec2-data: skip unrecognized keys in print-host-keys
2024-07-31 10:59:10 +05:30
Rafael Fernández López 3d2a21eddf virtualisation/{docker,podman}: update nvidia-ctk warning
Warnings and descriptions for `virtualisation.docker.enableNvidia` and
`virtualisation.podman.enableNvidia` point erroneously to set
`virtualisation.containers.cdi.dynamic.nvidia.enable`. This NixOS
option has been deprecated and the recommended NixOS option is
`hardware.nvidia-container-toolkit.enable`.
2024-07-28 13:12:27 +02:00
Sohalt c11439943d
nixos/containers: add wants and after dependency for network interfaces (#153234)
Co-authored-by: Franz Pletz <fpletz@fnordicwalking.de>
2024-07-22 01:22:19 +02:00
Sandro 49831e2e65
Merge pull request #328604 from illustris/pve-kvm
nixos/proxmoxImage: fix build
2024-07-21 21:23:06 +02:00
Franz Pletz 1a3c164570
Merge pull request #328682 from fpletz/nixos/fix-proxmox-lxc 2024-07-21 09:09:40 +02:00
Adam C. Stephens 65ef67740b
Merge pull request #328665 from adamcstephens/incus/fix-lts-unstable
incus: fix OVMF path backward compatibility
2024-07-20 14:09:46 -04:00
lassulus e209fc2f2f
Merge pull request #241373 from nikstur/qemu-vm-simplify-nix-store-image
nixos/qemu-vm: simplify building nix store image
2024-07-20 19:27:40 +02:00
Franz Pletz ceafec213f
nixos/proxmox-lxc: fix nixos-rebuild
Same is being done in lxc-container module.
2024-07-20 16:54:29 +02:00
Franz Pletz c501d3fa97
nixos/proxmox-lxc: fix getty start
Otherwise there is no getty on tty1 in Proxmox.
2024-07-20 16:54:28 +02:00
Franz Pletz 4aa419c046
nixos/proxmox-lxc: reformat 2024-07-20 16:54:28 +02:00
Franz Pletz 7c67f72893
Merge pull request #320075 from illustris/pve-lxc-ping-fix 2024-07-20 16:52:05 +02:00
Adam Stephens 28922c4421
incus: fix OVMF path backward compatibility
incus 6.3.0 changed the OVMF path, but our module needs to support LTS
as well. Also move the newer OCI deps to be conditional on version.
2024-07-20 09:54:07 -04:00
illustris 0dca765a25
nixos/proxmoxImage: fix build 2024-07-20 12:12:16 +05:30
Thomas Gerbet 66c0275843 openstack-config: remove hardcoded default password for the root account 2024-07-19 21:24:37 +02:00
nikstur 289dd22132 nixos/qemu-vm: simplify building nix store image
Summary of this change:

- Simplify code.
- Stop a disk image from being cached in the binary cache.
- Make erofs Nix Store image build in an acceptable time outside of
  testing environments (like `darwin.builder`).
- Do not regress on performance for tests that use many store paths in
  their Nix store image.
- Slightly longer startup time for tests where not many store paths are
  included in the image (these probably shouldn't use `useNixStoreImage`
  anyways).
- Slightly longer startup time when inputs of VM do not change because
  the Nix store image is not cached anymore.

Remove the `storeImage` built with make-disk-image.nix. This produced a
separate derivation which is then cached in the binary cache. These
types of images should be avoided because they gunk up the cache as they
change frequently. Now all Nix store images, whether read-only or
writable are based on the erofs image previously only used for read-only
images.

Additionally, simplify the way the erofs image is built by copying the
paths to include to a separate directory and build the erofs image from
there.

Before this change, the list of Nix store paths to include in the Nix
store image was converted to a complex regex that *excludes* all other
paths from a potentially large Nix store.

This previous approach suffers from two issues:

1. The regex is complex and, as admitted in the source code of the
   includes-to-excludes.py script, most likely contains at least one
   error. This means that it's unlikely that anyone will touch this
   piece of software again.

2. When the Nix store image is built from a large Nix store (like when
   you build the VM script to run outside of any testing context) this
   regex becomes painfully slow. There is at least one prominent
   use-case where this matters: `darwin.builder`.

Benchmarking impressions:

- Building Nix store via make-disk-image.nix takes ~25s
- Building Nix store as an erofs image takes ~4s
- Running nixosTests.qemu-vm-writable-store-image takes ~10s when
  building the erofs image with the regex vs ~14s when building by
  copying to a temporary directory.
- nixosTests.gitlab which had the biggest gains from the initial erofs
  change takes the same time as before.
- On a host with ~140k paths in /nix/store, building the erofs image
  with the regex takes 410s as opposed to 6s when copying to a temporary
  directory.
2024-07-18 20:24:58 +02:00
lassulus a62c421981
Merge pull request #290730 from nikstur/qemu-vm-refactoring
qemu-vm.nix refactoring
2024-07-18 19:34:51 +02:00
nikstur b6e354f052 nixos/qemu-vm: remove creation of /etc/nixos
/etc/nixos is already created by stage-2-init.sh
2024-07-18 19:11:28 +02:00
nikstur cb5a876e82 nixos/qemu-vm: consistently use efiSysMountPoint
Remove the explicit creation of efiSysMountPoint. This is not needed in
the scripted or the systemd initrd.
2024-07-18 19:11:27 +02:00
nikstur b7b90d0455 nixos/qemu-vm: fsck ESP
The ESP is a writable vfat filesystem that can be fscked like any other
fs thus we should stick to the default.
2024-07-18 19:11:27 +02:00
nikstur ded6d983d6 nixos/qemu-vm: use new overlayfs API 2024-07-18 19:11:24 +02:00
nikstur 54674e9063 nixos/qemu-vm: remove duplication between scripted and systemd initrd 2024-07-18 19:09:28 +02:00
Jakob Klepp c5c92feff7
nixos/oci-containers: document firewall bypass
Add explanation about the security impact of the
ports option.
Provide a safer example.

The problem is discussed in greater depth here:
https://github.com/NixOS/nixpkgs/issues/111852
2024-07-18 14:32:08 +02:00
Frédéric Christ c6f6c28218 nixos/testing: Add ipv6 configuration
This contribution enables a working IPv6 setup by default. This works
analog to the current automatic IPv4 setup.
2024-07-18 10:22:32 +02:00
Sandro c0e4367e8f
Merge pull request #267764 from Silver-Golden/nixos/proxmox-lxc-import-not-activate 2024-07-16 17:02:47 +02:00
Philip Taron 2e17c4a4da
nixos/amazon-image: avoid top-level with statements 2024-07-15 22:02:39 -07:00
Adam C. Stephens a167a16697
Merge pull request #326620 from bbigras/incus
incus: 6.2.0 -> 6.3.0
2024-07-15 14:47:18 -04:00
Bruno Bigras 856651fda8 nixos/incus: INCUS_OVMF_PATH -> INCUS_EDK2_PATH 2024-07-15 12:10:50 -04:00
K900 3eeff54780 nixos/alsa: kill sound.enable and friends with fire 2024-07-13 13:56:18 +03:00
Bruno Bigras c2a12db1a4 nixos/incus: add skopeo and umoci 2024-07-12 16:34:17 -04:00
Spencer Heywood bb0c512b54
nixos/vmware.guest: disable xf86inputvmmouse on aarch64 2024-07-11 16:52:22 -06:00
Basti 56e8106538
Remove trailing whitespace 2024-07-09 22:14:23 +00:00
Basti 2232311c93
Update nixos/modules/virtualisation/podman/default.nix 2024-07-09 22:12:12 +00:00
Aleksana d5a4f459ea
Merge pull request #304362 from Stunkymonkey/ec2-data-chmod-install
ec2-data: prefer 'install/umask' over 'chmod'
2024-07-04 12:51:53 +08:00
Felix Buehler 6fd0acb81b ec2-data: prefer 'install/umask' over 'chmod' 2024-07-03 23:18:43 +02:00
Nick Cao ffa6fef5ad
Merge pull request #321010 from blitz/virtualbox-kvm
virtualboxKvm: 20240515 -> 20240617
2024-06-30 09:53:43 -04:00
Brendan Golden c20f3b70ab nixos/proxmox-lxc: allow importing module without activation, for used in mixed machine clusters 2024-06-27 13:05:05 +01:00
Sandro 33f83c6252
Merge pull request #316977 from eclairevoyant/fix-mkEnableOption
treewide: fix mkEnableOption usage
2024-06-25 22:42:16 +02:00
Michael Franzl cae086d605
nixos/virtualisation: increase priority for libvirt NSS modules
When `services.resolved` is enabled, then `resolve [!UNAVAIL=return]`
is added to `system.nssDatabases.hosts` with priority 501,
which prevents lower-priority NSS modules from running
unless systemd-resolved is not available.

Quoting from `man nss-resolve`:

> To activate the NSS module, add "resolve [!UNAVAIL=return]" to the line
> starting with "hosts:" in /etc/nsswitch.conf. Specifically, it is
> recommended to place "resolve" early in /etc/nsswitch.conf's "hosts:"
> line. It should be before the "files" entry, since systemd-resolved
> supports /etc/hosts internally, but with caching. To the contrary, it
> should be after "mymachines", to give hostnames given to local VMs and
> containers precedence over names received over DNS. Finally, we
> recommend placing "dns" somewhere after "resolve", to fall back to
> nss-dns if systemd-resolved.service is not available.

Note that the man page (just) recommends "early" and means with this
"before the 'files' and 'dns' entries". It does not insist on being
first or excluding other modules.

For this reason, libvirt NSS modules should run before the `resolve`
module. They should come right next to `mymachines` because both are
conceptually very similar -- they resolve local VMs/containers.

Since the data source of the libvirt NSS modules are local
plain text files (see source code of the libvirt NSS module),
no performance impact is expected form this raise of priorities.

Other NSS modules in NixOS also explicitly set their priority, which is
why this change increases consistency.

Fixes #322022
2024-06-25 20:22:14 +02:00
Franz Pletz e6e4cd92ad
Merge pull request #322211 from NyCodeGHG/update-libvirt
libvirt: 10.0.0 -> 10.4.0, nixos/libvirtd: add ssh proxy option
2024-06-25 05:47:13 +02:00
Tyler Langlois 404fb5ab9c nixos/ec2-data: skip unrecognized keys in print-host-keys
The recent move to strip out DSS support from the openssh package
means that older key formats cause the key-printing command to
fail. Rather than causing the entire unit to fail, we should instead
skip those keys - while still letting the error through to the
console - and continue to print other keys the loop may find.
2024-06-24 16:08:59 -06:00
Felix Bühler e1f89770af
Merge pull request #302909 from Stunkymonkey/vagrant-guest-install-chmod
nixos/vagrant-guest: prefer 'install' over 'chmod'
2024-06-24 19:47:59 +02:00
Marie Ramlow 35b3707f20 nixos/libvirtd: add ssh proxy option 2024-06-24 17:20:05 +02:00
Linus Heckemann e5adf0b547 maintainers: drop lheckemann 2024-06-21 15:54:54 +02:00
Sirio Balmelli 80712f254c
nixos/oci-image: expose diskSize as a configurable option
diskSize defaults to the previous hard-coded 8192:
no change for existing users.

Users can set diskSize when building images which require
larger disk space; thus avoiding the error:

    ERROR: cptofs failed. diskSize might be too small for closure.

Signed-off-by: Sirio Balmelli <sirio@b-ad.ch>
Co-authored-by: superherointj <5861043+superherointj@users.noreply.github.com>
2024-06-21 08:54:08 +02:00
Julian Stecklina 9cec4b55f6 nixos/virtualbox-host: remove obsolete warnings
Version 20240617 of the KVM patch allows for turning hardening on in
VirtualBox.
2024-06-19 09:42:54 +02:00
K900 98cef4c273 treewide: big opengl cleanup
- rename hardware.opengl to hardware.graphics
- remove hardware.opengl.driSupport, which does nothing
- remove hardware.opengl.setLdLibraryPath, which should never be done
- rename hardware.opengl.driSupport32Bit to hardware.graphics.enable32Bit
- lost of small docs / formatting cleanups
2024-06-16 14:11:33 +03:00
illustris 01b159092f
nixos/proxmox-lxc: fix ping in unprivileged LXCs 2024-06-15 20:29:01 +05:30
éclairevoyant 7d8742da87
treewide: fix mkEnableOption usage 2024-06-14 02:41:42 -04:00
Sandro Jäckel e2e28f84f3
nixos/podman: add slirp4netns if configured 2024-06-11 01:01:19 +02:00
Arnout Engelen 2389f5fdc3
virtualbox guest module: draganddrop became dragAndDrop (#317756)
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2024-06-06 16:48:47 +02:00
tomf b2b3f5d68d
nixos/oci-containers: add preRunExtraOptions (#315356)
`podman --help` and `docker --help` each have global options, that
must be specified before `run`.
2024-06-05 18:18:37 -04:00
a-kenji 406e613b95 nixos/virtualbox-host: fix typo in assertion 2024-06-05 14:04:03 +02:00
Sandro Jäckel 41452802cb
treewide: fix all obviously wrong mkEnableOptions 2024-06-03 13:20:32 +02:00
illustris da799551a4
nixos/proxmox-lxc: fix console access (#307163)
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2024-06-03 00:15:27 +02:00
Sandro 1e8d02875f
Merge pull request #307287 from illustris/proxmox-vma 2024-06-03 00:12:40 +02:00
Onur C. Cakmak b3f70c29d5
nixos/containerd: remove LimitNOFILE from service (#313507) 2024-06-02 17:51:10 +02:00
Arnout Engelen 61c1d28215
Merge pull request #303790 from FriedrichAltheide/cleanup-virtualbox
virtualbox & virtualboxGuestAdditions: cleanup
2024-06-01 13:42:14 +02:00
Rafael Fernández López 7749696f61 docs: fix Nvidia casing to be consistent across different places 2024-05-20 22:17:31 +02:00
Fabian Möller da68f358bc
treewide: Remove usage of pkgs.{system,hostPlatform} aliases
These aliases should not be used inside nixpkgs and are only there for backward
compatibility.
2024-05-16 11:48:32 +02:00
Friedrich Altheide 64512b6200 virtualboxGuestAdditions: Add dragAndDrop service 2024-05-13 06:36:03 +02:00
Adam C. Stephens 215dd64e07
Merge pull request #307039 from adamcstephens/nixos-unstable
nixos/incus: add support for soft daemon restarts
2024-05-09 09:59:37 -04:00
Adam Stephens 7d5b333dcd
nixos/incus: add support for soft daemon restart
This is a feature supported out of the box by upstream and allows the
incusd service to be restarted without impacting running
instances. While this does give up a bit of reproducibility, qemu and
lxc for example, there are clear benefits in allowing the host to
apply updates without impacting instances.

Modeled after the zabbly implementation: 2a67c3e260/systemd/incus-startup.service

This will now be the default.
2024-05-09 09:01:12 -04:00
Sandro Jäckel d8137e77ec
nixos/containers: set storage.settings via mkDefault
to make them easily overwriteable, aka without mkForce
2024-05-06 16:34:00 +02:00
Leona Maroni d9bdb87f7d
Merge pull request #307498 from SuperSandro2000/podman-storage-default
nixos/containers: move storage.settings default into config
2024-05-03 22:31:06 +02:00
Robert Hensing 188ba247d5
nixos/podman: Create docker socket symlink via socket unit (#305803)
This ensures that both "sockets" are available after sockets.target.
See https://github.com/hercules-ci/arion/issues/238
2024-05-02 14:04:37 +00:00
Adam C. Stephens 51cc3442af
Merge pull request #307218 from adamcstephens/incus/more-deps
nixos/incus: add missing packages to path
2024-05-01 09:08:22 -04:00
Michele Guerini Rocco 08e2a324ed
Merge pull request #287821 from ajamtli/qemu-vm-virtfs-security-model
nixos/qemu-vm: add option to specify security model to use for a shared directory
2024-04-30 10:44:37 +02:00
illustris 523f157dba
nixos/proxmox-image: change scsi controller model to upstream default 2024-04-29 11:01:45 +05:30
Sandro Jäckel aaa86f2926
nixos/containers: move storage.settings default into config
This avoids having to use workarounds like the following to retain the
default settings which podman requires to run.

virtualisation.containers.storage.settings = lib.recursiveUpdate options.virtualisation.containers.storage.settings.default {
  storage.options.mount_program = lib.getExe pkgs.fuse-overlayfs;
};
2024-04-28 17:55:56 +02:00
illustris fe35866a2e
nixos/proxmox-image: add cloud init disk and use cloud-init by default 2024-04-28 00:48:18 +05:30
illustris b90b63db92
nixos/proxmox-image: qemu: 7.2.1 -> 8.1.5 2024-04-27 22:43:09 +05:30
Adam Stephens 4ca0d88d17
nixos/incus: add missing packages to path
I manually audited all `RunCommand` and `exec.LookPath` calls in the incus repo, combined with the following information

/run/wrappers/bin
lxc usable-cub 20240427123718.368 WARN     idmap_utils - ../src/lxc/idmap_utils.c:lxc_map_ids:165 - newuidmap binary is missing

iw
lxc 20240427123830.358 ERROR    network - ../src/lxc/network.c:lxc_netdev_move_wlan:1679 - Couldn't find the application iw in PATH

minio-client
https://github.com/lxc/incus/pull/777

ceph-client
Added, but could be missing bits to actually work
May need full ceph package for `radosgw-admin` for object storage?
2024-04-27 09:55:36 -04:00
illustris 6b2373aee1
nixos/proxmox-image: remove raw image from hydra-build-products 2024-04-27 18:34:18 +05:30
Adam C. Stephens 2a899c07e4
Merge pull request #301564 from adamcstephens/lxc/6
lxc: 5.0.3 -> 6.0.0
2024-04-26 16:26:14 -04:00
Someone 7035968845
Merge pull request #290979 from ereslibre/cdi-add-nvidia-docker-1-directories
CDI: Add `mount-nvidia-binaries` and `mount-nvidia-docker-1-directories` options
2024-04-23 19:55:41 +00:00
Rafael Fernández López 471ff2c33c nixos/nvidia-container-toolkit: rename from virtualisation.containers.cdi.dynamic.nvidia.enable
Add the NixOS option `hardware.nvidia-container-toolkit-cdi-generator.enable`.

This enables the ability to expose GPU's in containers for container
runtimes that support the Container Device Interface (CDI)

Remove `cdi.static` and `cdi.dynamic.nvidia.enable` attributes.
2024-04-23 12:26:00 +02:00
Martin Weinelt 8541ec6d85
nixos/incus: add support for software TPMs
Was previously broken due to a missing runtime dependency.

> Error: Failed to start device "vtpm": Failed to validate environment: Required tool 'swtpm' is missing
2024-04-23 12:04:14 +02:00
Adam Stephens f171f4ffd4
nixos/lxc: add package option and use for incus/lxd 2024-04-22 08:31:05 -04:00
Anders Johan Jamtli cb46e6864b
nixos/qemu-vm: set secrurity model for 'shared' and 'certs' directories to 'none' 2024-04-22 05:55:58 +02:00
Anders Johan Jamtli 7aa7920fb0
Revert "nixos/qemu-vm: set security model for 'xchg' directory to 'none'"
This reverts commit c16ff7f9f3.
2024-04-22 05:49:11 +02:00
Anders Johan Jamtli c16ff7f9f3
nixos/qemu-vm: set security model for 'xchg' directory to 'none'
Co-authored-by: Michele Guerini Rocco <rnhmjoj@users.noreply.github.com>
2024-04-22 05:41:11 +02:00
André Schröder 168793f151 digital-ocean: revert "make it easier to use disko"
This reverts parts of commit d87c4e1a72 from @Mic92

After switching from nixos-23.11 to nixos-unstable, I got the following error:

```
$ nixos-rebuild switch --flake nixos/#digitalocean
...
error:
Failed assertions:
- You must set the option ‘boot.loader.grub.devices’ or 'boot.loader.grub.mirroredBoots' to make the system bootable.
```

In my nixos config I don't set boot.loader.grub.devices or boot.loader.grub.mirroredBoots explicitly.

It seems like the values are not really defaulted via mkDefault? I am still relatively new to Nix, not sure how to fix this properly, so I am proposing to revert this change.
2024-04-21 11:36:17 +02:00
Anders Johan Jamtli 11dfebc306
nixos/qemu-vm: set security model 'none' for shared xchg directory
Co-authored-by: Michele Guerini Rocco <rnhmjoj@users.noreply.github.com>
2024-04-21 07:35:44 +02:00
Anders Johan Jamtli b73cc8fe46
Merge branch 'NixOS:master' into qemu-vm-virtfs-security-model 2024-04-20 07:43:49 +02:00
Anders Johan Jamtli 5612e8ba7b
nixos/qemu-vm: removed use of lib.mdDoc
Co-authored-by: éclairevoyant <848000+eclairevoyant@users.noreply.github.com>
2024-04-19 19:03:55 +02:00
Adam Stephens 76c69af624
nixos/lxd-virtual-machine: enable CPU hotplug for x86 VMs 2024-04-18 10:36:55 -04:00
stuebinm 6afb255d97 nixos: remove all uses of lib.mdDoc
these changes were generated with nixq 0.0.2, by running

  nixq ">> lib.mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> Inherit >> mdDoc[remove]" --batchmode nixos/**.nix

two mentions of the mdDoc function remain in nixos/, both of which
are inside of comments.

Since lib.mdDoc is already defined as just id, this commit is a no-op as
far as Nix (and the built manual) is concerned.
2024-04-13 10:07:35 -07:00
Jörg Thalheim 949fe90552
Merge pull request #297640 from Mic92/digitalocean
digital-ocean: 'make it easier to use disko' and 'no longer disable multiple nixos generations in bootloader'
2024-04-10 09:08:20 +02:00
Felix Buehler 42de9f06d5 nixos/vagrant-guest: prefer 'install' over 'chmod' 2024-04-09 21:41:00 +02:00
Adam C. Stephens f3ee2a75d4
Merge pull request #301712 from adamcstephens/incus/6
incus: 0.7.0 -> 6.0.0, add lts
2024-04-08 23:25:58 -04:00
Adam Stephens dce92a3114
incus-lts: init at 6.0.0 and make default 2024-04-08 14:18:02 -04:00
Kira Bruneau f0034ee975
Merge pull request #297517 from kira-bruneau/nixos-containers
nixos/nixos-containers: require mounts for bind mount host paths
2024-04-06 18:07:45 -04:00
Ryan Lahfa 99ca8d4ea5
Merge pull request #300757 from K900/installer-tests-unfucking
nixos/tests/installer: spring cleaning
2024-04-05 03:50:39 -07:00
K900 15d95c7b74 nixos/qemu-vm: split up the "keep EFI variables from system image" logic 2024-04-05 09:00:12 +03:00
Kira Bruneau 7f3643bef6 nixos/nixos-containers: require mounts for bind mount host paths
Fixes starting containers before bind mount host paths are mounted
2024-04-04 19:48:15 -04:00
K900 7b602cff5c nixos/tests/installer: avoid create_machine, clean up
- use normal VM nodes for target, with some extra trickery
- rename preBootCommands to postBootCommands to match its actual intent
- rename VMs to installer and target, so they're not all called machine
- set platforms on non-UEFI tests properly
- add missing packages for systemd-boot test
- fix initrd secrets leaking into the store and having wrong paths
2024-04-03 16:16:11 +03:00
Adam Stephens 893be2587b
lxd: rename to lxd-lts 2024-04-02 19:35:44 -04:00
Adam Stephens 91a3a6a29b
lxd-ui: move to standalone by-name and format 2024-04-02 00:10:11 -04:00
Adam Stephens cf4a88db79
nixos/incus: fix OVMF path for existing VMs 2024-03-29 15:33:26 -04:00
K900 95318bd0b8
Merge pull request #290122 from FriedrichAltheide/virtualbox-guest-additions-fixes
virtualbox: guest additions resize & clipboard fixes
2024-03-28 11:42:22 +03:00
Adam Stephens a5a4da89ba
incus: 0.6 -> 0.7 2024-03-26 20:08:43 -04:00
Friedrich Altheide f0887fa040 virtualbox: fix guest additions resize support
- Build virtualbox guest additions from source and fix paths
- Install VBoxDRMClient to support resizing
  - Support resizing on wayland and x11
- Adding multiple new options
  - clipboard
  - seamless
- Removing x11 option
- Support linux 6.8
2024-03-26 11:47:00 +01:00
Adam C. Stephens c9c612f159
Merge pull request #294548 from adamcstephens/incus/override
incus: move wrapper to nixos module
2024-03-25 16:40:14 -04:00
Jörg Thalheim 3f71d1bc02 digital-ocean: no longer disable multiple nixos generations in bootloader
Since digitalocean has a recovery console it's possible to boot
into an old generation.
2024-03-21 08:10:00 +01:00
Jörg Thalheim d87c4e1a72 digital-ocean: make it easier to use disko
If the user provides a `fileSystems."/".device` option, it should have
higher precedence than the default value.
Same for `loader.grub.devices` (also set by disko internally).
2024-03-21 08:09:27 +01:00
Florian Klink 39ebd395cc
Merge pull request #224666 from grindhold/container_underscores
check nixos-container names for underscores
2024-03-20 11:41:34 +02:00
Adam Stephens deb5be50c4
incus: move wrapper to nixos module 2024-03-19 22:48:07 -04:00
Arian van Putten d211b80d29
Merge pull request #294493 from endgame/ec2-image-ssm-agent
nixos/amazon-image: Enable Amazon SSM Agent by default
2024-03-16 17:57:42 +01:00
Rok Garbas 6f11ba9ffe
Merge branch 'master' into amazon-ec2-amis 2024-03-13 00:37:12 +01:00
Azat Bahawi d3e30a442b
nixos/incus: fix systemd service path
Fixes a regression introduced in #294754.
2024-03-12 20:03:36 +03:00