1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 03:30:45 +00:00
Commit graph

1826 commits

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