nixpkgs/nixos/modules/virtualisation
Arian van Putten 9f72791516 nixos/containers: Introduce several tweaks to systemd-nspawn from upstream systemd
* Lets container@.service  be activated by machines.target instead of
  multi-user.target

  According to the systemd manpages, all containers that are registered
  by machinectl, should be inside machines.target for easy stopping
  and starting container units altogether

* make sure container@.service and container.slice instances are
  actually located in machine.slice

  https://plus.google.com/112206451048767236518/posts/SYAueyXHeEX
  See original commit: https://github.com/NixOS/systemd/commit/45d383a3b8

* Enable Cgroup delegation for nixos-containers

  Delegate=yes should be set for container scopes where a systemd instance
  inside the container shall manage the hierarchies below its own cgroup
  and have access to all controllers.

  This is equivalent to enabling all accounting options on the systemd
  process inside the system container.  This means that systemd inside
  the container is responsible for managing Cgroup resources for
  unit files that enable accounting options inside.  Without this
  option, units that make use of cgroup features within system
  containers might misbehave

  See original commit: https://github.com/NixOS/systemd/commit/a931ad47a8

  from the manpage:
    Turns on delegation of further resource control partitioning to
    processes of the unit. Units where this is enabled may create and
    manage their own private subhierarchy of control groups below the
    control group of the unit itself. For unprivileged services (i.e.
    those using the User= setting) the unit's control group will be made
    accessible to the relevant user. When enabled the service manager
    will refrain from manipulating control groups or moving processes
    below the unit's control group, so that a clear concept of ownership
    is established: the control group tree above the unit's control
    group (i.e. towards the root control group) is owned and managed by
    the service manager of the host, while the control group tree below
    the unit's control group is owned and managed by the unit itself.
    Takes either a boolean argument or a list of control group
    controller names. If true, delegation is turned on, and all
    supported controllers are enabled for the unit, making them
    available to the unit's processes for management. If false,
    delegation is turned off entirely (and no additional controllers are
    enabled). If set to a list of controllers, delegation is turned on,
    and the specified controllers are enabled for the unit. Note that
    additional controllers than the ones specified might be made
    available as well, depending on configuration of the containing
    slice unit or other units contained in it. Note that assigning the
    empty string will enable delegation, but reset the list of
    controllers, all assignments prior to this will have no effect.
    Defaults to false.

    Note that controller delegation to less privileged code is only safe
    on the unified control group hierarchy. Accordingly, access to the
    specified controllers will not be granted to unprivileged services
    on the legacy hierarchy, even when requested.

    The following controller names may be specified: cpu, cpuacct, io,
    blkio, memory, devices, pids. Not all of these controllers are
    available on all kernels however, and some are specific to the
    unified hierarchy while others are specific to the legacy hierarchy.
    Also note that the kernel might support further controllers, which
    aren't covered here yet as delegation is either not supported at all
    for them or not defined cleanly.
2018-10-22 22:36:08 +02:00
..
amazon-image.nix amazon-image.nix: Disable udisks 2018-10-15 21:54:28 +02:00
amazon-init.nix nixos: Move uses of stdenv.shell to runtimeShell. 2018-03-01 14:38:53 -05:00
amazon-options.nix Revert "nixos: rename system.{stateVersion,defaultChannel} -> system.nixos.\1" 2018-07-28 00:12:55 +03:00
azure-agent-entropy.patch
azure-agent.nix reewide: Purge all uses stdenv.system and top-level system 2018-08-30 17:20:32 -04:00
azure-bootstrap-blobs.nix
azure-common.nix [bot] nixos/*: remove unused arguments in lambdas 2018-07-20 20:56:59 +00:00
azure-config-user.nix [bot] nixos/*: remove unused arguments in lambdas 2018-07-20 20:56:59 +00:00
azure-config.nix [bot] nixos/*: remove unused arguments in lambdas 2018-07-20 20:56:59 +00:00
azure-image.nix azure: stop carrying qemu-220 patch 2018-06-12 02:06:03 -07:00
azure-images.nix Add file with Azure image locations, similar to ec2-amis.nix. Will be used by nixops. 2017-07-18 09:18:51 +00:00
brightbox-config.nix [bot] nixos/*: remove unused arguments in lambdas 2018-07-20 20:56:59 +00:00
brightbox-image.nix reewide: Purge all uses stdenv.system and top-level system 2018-08-30 17:20:32 -04:00
container-config.nix nixos-container: Force container to talk to host nix-daemon 2018-10-05 18:36:47 +02:00
containers.nix nixos/containers: Introduce several tweaks to systemd-nspawn from upstream systemd 2018-10-22 22:36:08 +02:00
docker-image.nix [bot] nixos/*: remove unused arguments in lambdas 2018-07-20 20:56:59 +00:00
docker.nix nixos/modules: users.(extraUsers|extraGroup->users|group) 2018-06-30 03:02:58 +02:00
ec2-amis.nix ec2-amis.nix: Add 18.09 images 2018-10-15 21:43:16 +02:00
ec2-data.nix
ecs-agent.nix
gce-images.nix Update GCE image for 18.03 2018-05-30 19:36:39 +02:00
google-compute-config.nix [bot] nixos/*: remove unused arguments in lambdas 2018-07-20 20:56:59 +00:00
google-compute-image.nix google-compute-engine: 20180510 -> 20180905 2018-09-26 11:48:16 +02:00
grow-partition.nix nixos: introduce boot.growPartition (#33521) 2018-01-06 13:52:51 +00:00
hyperv-guest.nix nixos on hyperv: hot-add CPU 2018-09-28 22:28:26 +08:00
kvmgt.nix kvmgt module: add service restart on failure 2018-10-18 22:35:32 +03:00
libvirtd.nix nixos/libvirtd: add option to run qemu as non-root 2018-08-10 13:59:58 +02:00
lxc-container.nix [bot] nixos/*: remove unused arguments in lambdas 2018-07-20 20:56:59 +00:00
lxc.nix lxd: 2.16 -> 3.0.0 2018-04-14 11:02:24 +01:00
lxcfs.nix lxcfs: remove cgmanager dependency 2017-11-07 11:04:12 +00:00
lxd.nix nixos/modules: users.(extraUsers|extraGroup->users|group) 2018-06-30 03:02:58 +02:00
nova-config.nix [bot] nixos/*: remove unused arguments in lambdas 2018-07-20 20:56:59 +00:00
openvswitch.nix [bot]: remove unreferenced code 2018-07-20 18:48:37 +00:00
parallels-guest.nix parallels: add package config option 2018-03-01 17:09:13 -06:00
qemu-guest-agent.nix nixos/qemu-guest-agent: pkgs.{kvm -> qemu} (#48293) 2018-10-13 00:41:46 +02:00
qemu-vm.nix Revert "virtualization/qemu-vm: fix and improve virtio/scsi switching" 2018-09-25 11:10:10 +02:00
rkt.nix nixos/modules: users.(extraUsers|extraGroup->users|group) 2018-06-30 03:02:58 +02:00
virtualbox-guest.nix reewide: Purge all uses stdenv.system and top-level system 2018-08-30 17:20:32 -04:00
virtualbox-host.nix Merge remote-tracking branch 'origin/master' into vbox-extpack 2018-08-16 00:40:09 +09:00
virtualbox-image.nix Revert "Increase Virtualbox disk image size" (#48151) 2018-10-10 12:53:48 +02:00
vmware-guest.nix reewide: Purge all uses stdenv.system and top-level system 2018-08-30 17:20:32 -04:00
xe-guest-utilities.nix nixos: correct improper uses of mkEnableOption, clarify service descriptions 2018-10-05 13:14:45 +07:00
xen-dom0.nix reewide: Purge all uses stdenv.system and top-level system 2018-08-30 17:20:32 -04:00
xen-domU.nix [bot] nixos/*: remove unused arguments in lambdas 2018-07-20 20:56:59 +00:00