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
amazon-options.nix
appvm.nix
azure-agent.nix
azure-bootstrap-blobs.nix
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
cloudstack-config.nix
container-config.nix
containerd.nix
containers.nix
cri-o.nix
digital-ocean-config.nix
digital-ocean-image.nix
digital-ocean-init.nix
disk-image.nix
disk-size-option.nix
docker-image.nix
docker-rootless.nix
docker.nix nixos/*: tag manpage references 2025-01-27 02:47:01 +01:00
ec2-amis.nix
ec2-data.nix
ec2-metadata-fetcher.sh
ecs-agent.nix
gce-images.nix
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
hyperv-guest.nix nixos/hyperv-guest: remove the now useless videoMode option 2025-01-14 09:47:22 +03:00
hyperv-image.nix
incus-agent.nix
incus-virtual-machine.nix
incus.nix incus-ui-canonical: rename from incus.ui 2025-02-16 17:33:03 -05:00
kubevirt.nix
kvmgt.nix
libvirtd.nix nixos/libvirtd: fix path in hooks.network desc (#372951) 2025-02-19 21:32:22 +01:00
linode-config.nix
linode-image.nix
lxc-container.nix
lxc-image-metadata.nix
lxc-instance-common.nix
lxc.nix
lxcfs.nix
lxd-agent.nix
lxd-virtual-machine.nix
lxd.nix
multipass.nix
nixos-containers.nix nixos-container: avoid subshell when testing $PRIVATE_USERS (#383056) 2025-02-19 10:46:48 +01:00
oci-common.nix
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
oci-options.nix
openstack-config.nix
openstack-metadata-fetcher.nix
openstack-options.nix
openvswitch.nix
parallels-guest.nix
proxmox-image.nix
proxmox-lxc.nix
qemu-guest-agent.nix
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
vagrant-guest.nix
vagrant-virtualbox-image.nix
virtualbox-guest.nix virtualboxGuestAdditions: Additional 7.1.4 fixes (#366080) 2024-12-25 22:09:11 +01:00
virtualbox-host.nix
virtualbox-image.nix
vmware-guest.nix
vmware-host.nix
vmware-image.nix
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
xe-guest-utilities.nix
xen-boot-builder.sh
xen-dom0.nix
xen-domU.nix