Commit Graph

1852 Commits

Author SHA1 Message Date
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
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
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
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
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
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