1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-03-06 23:31:34 +00:00
nixpkgs/nixos/modules/virtualisation
Maximilian Bosch 7d443d378b
nixos/oci-containers: support rootless containers & healthchecks
Closes #259770
Closes #207050

The motivation for the former is to not execute the container as root,
so you don't have to `sudo -i` to perform podman management tasks.

The idea behind healthchecks is to be able to keep the unit in the
activating state until the container is healthy, only then then unit is
marked as active.

The following changes were necessary:

* Move the ctr-id into `/run/${containerName}` to make podman can
  actually write to it since it's now in its RuntimeDirectory.

* Make `sdnotify` option configurable (`healthy` for healthchecks that
  must pass, default remains `conmon`).

* Set Delegate=yes for `sdnotify=healthy` to make sure a rootless
  container can actually talk to sd_notify[1].

* Add a warning that lingering must be enabled to have a `systemd --user`
  instance running which is required for the cgroup support to work
  properly.

* Added a testcase for rootless containers with both conmon and
  healthchecks.

[1] https://github.com/containers/podman/discussions/20573#discussioncomment-7612481
2025-02-27 11:08:33 +01:00
..
podman nixos/podman: expose virtualisation.podman.package 2024-12-24 15:08:43 +11:00
amazon-ec2-amis.nix
amazon-image.nix nixos/amazon-image: fix eval 2025-02-02 13:29:03 +01:00
amazon-init.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
amazon-options.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
appvm.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
azure-agent.nix waagent: init module 2024-12-06 23:32:16 +08:00
azure-bootstrap-blobs.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
azure-common.nix nixos/azure: enable networking.useNetworkd 2025-01-12 11:47:55 +08:00
azure-config-user.nix nixos/azure: improve code readability 2025-01-12 11:43:32 +08:00
azure-config.nix
azure-image.nix nixos/azure: improve documentation 2025-01-12 11:43:32 +08:00
build-vm.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
cloudstack-config.nix
container-config.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
containerd.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
containers.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
cri-o.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
digital-ocean-config.nix
digital-ocean-image.nix virtualisation/digital-ocean: use system.build.image 2024-11-29 17:12:26 +01:00
digital-ocean-init.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
disk-image.nix virtualisation/disk-image: init 2024-12-16 15:35:22 +01:00
disk-size-option.nix nixos/virtualisation: fix rendering of example in diskSize 2024-11-14 18:12:16 +01:00
docker-image.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
docker-rootless.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
docker.nix nixos/*: tag manpage references 2025-01-27 02:47:01 +01:00
ec2-amis.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
ec2-data.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
ec2-metadata-fetcher.sh nixos/ec2: Fix typo, chown -> chmod 2024-10-10 09:02:06 +02:00
ecs-agent.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
gce-images.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
google-compute-config.nix
google-compute-image.nix nixos/google-compute-image: fix image build 2024-12-26 17:50:39 +05:30
grow-partition.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
hyperv-guest.nix nixos/hyperv-guest: remove the now useless videoMode option 2025-01-14 09:47:22 +03:00
hyperv-image.nix virtualisation/hyperv-image: hyperv.vmFileName -> image.fileName 2024-11-29 17:12:26 +01:00
incus-agent.nix nixos/incus-agent: init 2024-08-10 12:08:33 -04:00
incus-virtual-machine.nix nixos/incus: add incus-only vm and container images 2024-08-10 13:23:36 -04:00
incus.nix incus-ui-canonical: rename from incus.ui 2025-02-16 17:33:03 -05:00
kubevirt.nix virtualisation/kubevirt: use system.build.image 2024-11-29 17:12:26 +01:00
kvmgt.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
libvirtd.nix nixos/libvirtd: fix path in hooks.network desc (#372951) 2025-02-19 21:32:22 +01:00
linode-config.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
linode-image.nix virtualisation/linode-image: Use system.build.image 2024-11-29 17:12:26 +01:00
lxc-container.nix virtualisation/lxc-container: use system.build.image 2024-11-29 17:13:52 +01:00
lxc-image-metadata.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
lxc-instance-common.nix incus: format 2024-11-30 00:04:54 -05:00
lxc.nix incus: format 2024-11-30 00:04:54 -05:00
lxcfs.nix incus: format 2024-11-30 00:04:54 -05:00
lxd-agent.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
lxd-virtual-machine.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
lxd.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
multipass.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
nixos-containers.nix nixos-container: avoid subshell when testing $PRIVATE_USERS (#383056) 2025-02-19 10:46:48 +01:00
oci-common.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
oci-config-user.nix
oci-containers.nix nixos/oci-containers: support rootless containers & healthchecks 2025-02-27 11:08:33 +01:00
oci-image.nix virtualisation/oci-image: use system.build.image 2024-11-29 17:12:26 +01:00
oci-options.nix modules/virtualisation: add unified diskSize opt 2024-10-27 12:28:37 +01:00
openstack-config.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
openstack-metadata-fetcher.nix openstack-metadata-fetcher: don't fail if any specific wget's fail 2022-04-07 15:28:28 -04:00
openstack-options.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
openvswitch.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
parallels-guest.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
proxmox-image.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
proxmox-lxc.nix virtualisation/proxmox-lxc: use system.build.image 2024-11-29 17:13:54 +01:00
qemu-guest-agent.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
qemu-vm.nix nixos/qemu-vm: set permissions for tmpfs root (#363628) 2025-01-01 21:03:57 +01:00
rosetta.nix
spice-usb-redirection.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
vagrant-guest.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
vagrant-virtualbox-image.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
virtualbox-guest.nix virtualboxGuestAdditions: Additional 7.1.4 fixes (#366080) 2024-12-25 22:09:11 +01:00
virtualbox-host.nix virtualbox: nixfmt 2024-10-16 13:15:42 +02:00
virtualbox-image.nix virtualisation/virtualbox: virtualbox.vmFileName -> image.fileName 2024-11-29 17:12:26 +01:00
vmware-guest.nix vmware-guest: Don't use lib directly for maintainers 2024-12-12 10:35:08 -05:00
vmware-host.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
vmware-image.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
waagent.nix nixos/azure: move image-specific configs from azure-common to azure-image, fix console output (#359365) 2025-02-02 22:57:49 +02:00
waydroid.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
xe-guest-utilities.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
xen-boot-builder.sh treewide: rename Xen to Xen Project 2024-09-28 14:53:59 +00:00
xen-dom0.nix nixos/xen: simplify package options 2024-10-06 20:24:29 +00:00
xen-domU.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00