3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/nixos/modules/system/boot
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
..
loader raspberrypi-bootloader: pass initrd to kernel 2018-10-21 17:44:11 +03:00
binfmt.nix nixos/binfmt: Initial binfmt_msc support. 2018-02-18 12:42:17 -05:00
coredump.nix manual: Clarify that limits.conf doesn't apply to systemd services. (#40267) 2018-05-12 17:44:57 +02:00
emergency-mode.nix
grow-partition.nix Fix kernel crash caused by absent root device 2018-05-12 02:55:33 +03:00
initrd-network.nix Merge pull request #46459 from volth/volth-patch-3 2018-10-05 22:47:45 -05:00
initrd-ssh.nix nixos/modules: users.(extraUsers|extraGroup->users|group) 2018-06-30 03:02:58 +02:00
kernel.nix kernel: fix boot.consoleLogLevel description 2018-04-17 10:45:30 +09:00
kexec.nix nixos/kexec: Fix typo in meta.platforms 2018-09-28 17:44:42 +02:00
luksroot.nix nixos: initrd/luks: fix detection of devices by UUID 2018-10-11 16:02:41 -04:00
modprobe.nix modprobe activation: Order after specialfs 2018-02-05 21:04:40 +01:00
networkd.nix nixos/networkd: do not require gateway for routes 2018-09-07 02:23:12 +03:00
pbkdf2-sha512.c
plymouth.nix nixos/plymouth: multi-user.target wants plymouth-quit-wait.service 2018-05-04 16:06:57 +02:00
resolved.nix [bot] nixos/*: remove unused arguments in lambdas 2018-07-20 20:56:59 +00:00
shutdown.nix
stage-1-init.sh stage-1-init.sh: do not check mounted filesystems (#45891) 2018-09-01 15:26:16 +02:00
stage-1.nix bootStage1: fix cross build (@matthewbauer's solution) 2018-10-12 09:24:00 +00:00
stage-2-init.sh nixos/stage-2: create empty machine-id at boot 2018-09-30 10:45:35 -07:00
stage-2.nix systemd: ensure fsck Requires/After links are created in mount units 2018-08-28 17:12:49 +02:00
systemd-lib.nix nixos/systemd-lib: fix assertValueOneOf 2018-09-20 13:40:50 +02:00
systemd-nspawn.nix nixos/containers: Introduce several tweaks to systemd-nspawn from upstream systemd 2018-10-22 22:36:08 +02:00
systemd-unit-options.nix Fix systemd timer unit documentation 2018-10-03 14:39:36 +02:00
systemd.nix Merge pull request #47563 from jameysharp/unscripted 2018-10-02 19:21:34 +01:00
timesyncd.nix [bot] nixos/*: remove unused arguments in lambdas 2018-07-20 20:56:59 +00:00
tmp.nix