Commit Graph

1659 Commits

Author SHA1 Message Date
Silvan Mosberger
54c8a15650
Merge pull request #271247 from h7x4/treewide-mkpackageoptionmd-to-mkpackageoption
treewide: replace `mkPackageOptionMD` with `mkPackageOption`
2023-12-01 02:09:10 +01:00
Franz Pletz
9619439772
Merge pull request #270004 from Stunkymonkey/libvirtd-add-netcat 2023-11-30 21:04:02 +01:00
Franz Pletz
32caf62376
Merge pull request #268887 from jchw-forks/libvirt-nss 2023-11-30 20:48:24 +01:00
h7x4
79d3d59f58
treewide: replace mkPackageOptionMD with mkPackageOption 2023-11-30 19:03:14 +01:00
Maciej Krüger
50bb5d3338
Merge pull request #264929 from adamcstephens/incus/generator 2023-11-30 16:01:35 +01:00
Weijia Wang
feeae486de
Merge pull request #261702 from h7x4/replace-mkoption-with-mkpackageoption
treewide: use `mkPackageOption`
2023-11-30 02:49:30 +01:00
Adam Stephens
0fdef67e07
nixos/lxc-container: add adamcstephens as maintainer 2023-11-28 15:14:45 -05:00
Adam Stephens
2cd9619801
nixos/lxc-container: use lxc systemd generator 2023-11-28 15:14:43 -05:00
h7x4
0a37316d6c
treewide: use mkPackageOption
This commit replaces a lot of usages of `mkOption` with the package
type, to be `mkPackageOption`, in order to reduce the amount of code.
2023-11-27 01:28:36 +01:00
Robert Hensing
ecef65f019
Merge pull request #269970 from emilylange/nixos-containers-warning
nixos/containers: warn if containers are used but disabled
2023-11-26 19:39:32 +01:00
Mihai-Drosi Câju
be6ac65b52 nixos/waydroid: remove with lib; and friends 2023-11-26 17:13:15 +02:00
Felix Buehler
1b5617e25b nixos/libvirtd: add netcat and support
see: https://github.com/NixOS/nixpkgs/issues/180806
2023-11-25 23:45:18 +01:00
emilylange
1c404d2584
nixos/containers: warn if containers are used but disabled
This is a follow-up to 8dfe8e447e.
2023-11-25 20:01:42 +01:00
John Chadwick
412543ddd8 nixos/libvirtd: add support for nss modules 2023-11-21 01:39:02 -05:00
Yang, Bo
6d69feb35e google-compute-image: add the missing /boot filesystem 2023-11-18 13:37:42 +01:00
Yang, Bo
bff548fef1 waagent: enable provisioning 2023-11-14 19:47:27 +01:00
Maciej Krüger
c647a12d7f
Merge pull request #265725 from nbraud/nixos/sudo-rs/gce 2023-11-11 18:09:20 +01:00
Thiago Kenji Okada
da8c62363e
Merge pull request #266310 from Atry/patch-4
azure-agent: add dependencies for its extensions
2023-11-09 09:52:10 +00:00
Yang, Bo
1ce985242c google-compute-image: support NVMe and UEFI 2023-11-08 21:05:21 +01:00
Yang, Bo
c4086e5ce9 azure-agent: add dependencies for its extensions
waagent's extension `Microsoft.OSTCExtensions.VMAccessForLinux` requires Python, otherwise it would be failed to install with the following error message in `/var/log/waagent.log`:

```
No Python interpreter found on the box
```

waagent's extension `Microsoft.CPlat.Core.RunCommandLinux` needs lsof, otherwise it would produce the following error message in `/var/log/waagent.log`:

```
/var/lib/waagent/Microsoft.Azure.Extensions.CustomScript-2.1.10/bin/custom-script-shim: line 60: lsof: command not found
```
2023-11-08 17:54:08 +00:00
Florian Brandes
2ed7a5ab59 nixos/virtualization: fix shellcheck login
fixes https://www.shellcheck.net/wiki/SC2002

Signed-off-by: Florian Brandes <florian.brandes@posteo.de>
2023-11-07 13:40:42 +01:00
Alyssa Ross
8ab2f09522 nixos/qemu-vm: fix infinite recursion
The virtualisation.directBoot.initrd option was added for netboot
images, but the assertion to check directBoot enabled if it was used
caused an infinite recursion if it was.  Minimal reproduction:

	import nixos/tests/make-test-python.nix ({ pkgs, ... }: {
	  name = "";

	  nodes = {
	    machine = { config, ...}: {
	      imports = [ nixos/modules/installer/netboot/netboot-minimal.nix ];

	      virtualisation.directBoot = {
	        enable = true;
	        initrd = "${config.system.build.netbootRamdisk}/${config.system.boot.loader.initrdFile}";
	      };
	    };
	  };
	  testScript = "";
	}) {}

The fix is to swap the two conditions, so that cfg.directBoot.enable
is checked first, and the initrd comparision will be short circuited.

This wasn't noticed during review because in earlier versions of the
virtualisation.directBoot patch, the assertion was accidentally in the
conditional above, so wasn't evaluated unless port forwarding was in
use.
2023-11-06 13:49:31 +01:00
nicoo
89fd59c12a nixos/vagrant-guest: Set security.sudo-rs.wheelNeedsPassword too 2023-11-06 12:39:04 +01:00
adisbladis
a1592fb410
Merge pull request #258299 from Arcayr/virtualisation-hostname
nixos/virtualisation: add hostname option to oci-containers.
2023-11-06 10:44:26 +13:00
nicoo
326904b128 nixos/google-compute-config: Add sudo-rs rules 2023-11-05 20:33:19 +00:00
Lily Foster
5c5d730067
Merge pull request #262347 from adamcstephens/incus/module
nixos/incus: init module and tests
2023-11-03 09:42:24 -04:00
Adam Stephens
3132ba6cda
nixos/incus: shutdown instances on service stop 2023-11-02 19:54:11 -04:00
Adam Stephens
3087595a6b
nixos/incus: preseed should not trigger socket-activation 2023-11-02 19:54:04 -04:00
Adam Stephens
1fff6a9031
nixos/incus: init module and tests 2023-11-02 19:54:02 -04:00
Franz Pletz
265ca81834
Merge pull request #241908 from picnoir/nin/oci-container-pre-start-list 2023-10-31 15:53:35 +01:00
K900
6f06066e94 nixos/containers: use latest stateVersion as example
Hopefully this way we don't confuse people into thinking you have to set it to 21.05.
2023-10-27 12:56:12 +03:00
Robert Hensing
5dfc78a8ad
Merge pull request #262021 from Enzime/linux-builder-cross
linux-builder: support `x86_64-linux` on `aarch64`
2023-10-24 14:34:29 +02:00
Michael Hoang
ab1f45f3d3 linux-builder: support x86_64-linux on aarch64 2023-10-24 13:35:37 +02:00
Maciej Krüger
1ecbbb6e3f
Merge pull request #260595 from adamcstephens/lxc/squashfs
lxc-container: add squashfs image support and release output
2023-10-24 02:06:36 +02:00
Ryan Lahfa
b9337215cd
Merge pull request #229035 from NixOS/qemu-vm/tpm
qemu-vm: support TPM usecases
2023-10-23 10:10:27 +01:00
Arthur Gautier
08f4fe2087 qemu-vm: stop the swtpm once qemu stops
The idea is to run an async process waiting for swtpm
and we have to ensure that `FD_CLOEXEC` is cleared on this process'
stdin file descriptor, we use `fdflags` for this, a loadable builtin in
Bash ≥ 5.

The async process when exited will terminate `swtpm`, we bind the
termination of the async process to the termination of QEMU by virtue of
having `qemu` exec in that Bash script.

Signed-off-by: Arthur Gautier <baloo@superbaloo.net>
Co-authored-by: Raito Bezarius <masterancpp@gmail.com>
2023-10-23 01:02:24 +02:00
Raito Bezarius
25872524f0 nixos/qemu-vm: add virtualisation.tpm for running TPM in QEMU infrastructure 2023-10-22 16:01:37 +02:00
Maciej Krüger
49bc1a76e0
Merge pull request #261692 from josephst/fix-lxc-container-bootloader
nixos/lxc-container: use absolute path for ln in install-lxc-sbin-init.sh
2023-10-22 13:47:14 +02:00
Joseph Stahl
d156ab6c9c nixos/lxc-container: use absolute path for ln in install-lxc-sbin-init.sh
Recent change to nixos-rebuild (https://github.com/NixOS/nixpkgs/pull/258571)
adds systemd-run, which brings with it a cleaner environment
(ie $PATH not available).
Workaround: use absolute path for ln to avoid command-not-found error
2023-10-22 03:18:15 +03:00
Robert Hensing
7096340f9e nixos/qemu-vm: Rename nixos-disk-image -> nix-store-image
For the image that's actually a store image only.
Helps with visibility. The name "nixos-disk-image" has no special
significance, by grepping nixpkgs.
2023-10-21 19:13:58 +02:00
Lin Jian
fbc62319f1
Merge pull request #260291 from donovanglover/nixos-containers/optional-restart
nixos/nixos-containers: add restartIfChanged option
2023-10-16 20:41:32 +08:00
Maciej Krüger
afc33ef9d2
Merge pull request #260687 from mkg20001/lxd-ui
nixos/lxd: fix ui.enable desc
2023-10-16 01:30:58 +02:00
Adam Stephens
dbeeeb8e06
nixos/lxc-container: enable udev-trigger for nested containers 2023-10-12 15:11:09 -04:00
Adam Stephens
c2ff509e66
lxc-container: add squashfs image support and release output 2023-10-12 10:52:05 -04:00
Maciej Krüger
d934d20cd3
nixos/lxd: fix ui.enable desc
Otherwise it would show up as "Whether to enable Enables the (experimental) LXD UI. ."

Now is just "Whether to enable (experimental) LXD UI."
2023-10-12 15:24:01 +02:00
Donovan Glover
fd7daf9fc4
nixos/nixos-containers: add restartIfChanged option
This commit makes auto-restarting declarative containers optional.

This is useful when you don't want changes to your config to automatically
restart the container and thus stop any applications running inside it.
2023-10-11 21:53:42 -04:00
Sarah Brofeldt
a655e7a1aa
Merge pull request #259240 from haenoe/oci-containers-labels-option
nixos/oci-containers: add labels option
2023-10-09 18:52:20 +02:00
HaeNoe
2f021def6e nixos/oci-containers: add labels option 2023-10-09 10:43:29 +02:00
ners
dccd00027e
nixos/azure: add contents module option (#244364) 2023-10-08 19:35:14 +02:00
nikstur
62e95d095d nixos/qemu-vm: optionally disable overriding fileSystems
Allow the user to disable overriding the fileSystems option with
virtualisation.fileSystems by setting
`virtualisation.fileSystems = lib.mkForce { };`.

With this change you can use the qemu-vm module to boot from an external
image that was not produced by the qemu-vm module itself. The user can
now re-use the modularly set fileSystems option instead of having to
reproduce it in virtualisation.fileSystems.
2023-10-02 11:13:26 +02:00