1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-09-11 15:08:33 +01:00
nixpkgs/nixos/modules
aszlig 9e9af4f9c0
nixos/confinement: Allow to include the full unit
From @edolstra at [1]:

  BTW we probably should take the closure of the whole unit rather than
  just the exec commands, to handle things like Environment variables.

With this commit, there is now a "fullUnit" option, which can be enabled
to include the full closure of the service unit into the chroot.

However, I did not enable this by default, because I do disagree here
and *especially* things like environment variables or environment files
shouldn't be in the closure of the chroot.

For example if you have something like:

  { pkgs, ... }:

  {
    systemd.services.foobar = {
      serviceConfig.EnvironmentFile = ${pkgs.writeText "secrets" ''
        user=admin
        password=abcdefg
      '';
    };
  }

We really do not want the *file* to end up in the chroot, but rather
just the environment variables to be exported.

Another thing is that this makes it less predictable what actually will
end up in the chroot, because we have a "globalEnvironment" option that
will get merged in as well, so users adding stuff to that option will
also make it available in confined units.

I also added a big fat warning about that in the description of the
fullUnit option.

[1]: https://github.com/NixOS/nixpkgs/pull/57519#issuecomment-472855704

Signed-off-by: aszlig <aszlig@nix.build>
2019-03-14 20:04:33 +01:00
..
config zram: revert "change default algorithm to zstd" (#56856) 2019-03-07 02:11:20 +02:00
hardware nixos/docker: add enableNvidia option 2019-02-27 09:56:03 +01:00
i18n/input-method docs: format 2018-09-29 20:51:11 -04:00
installer ova: remove stateVersion 2019-03-09 14:25:05 -05:00
misc nixos: doc: optionally include all modules in manual generation 2019-03-05 09:41:40 +00:00
profiles profiles/graphical.nix: Enable pulseaudio for virtualbox appliances 2019-02-22 07:23:59 +01:00
programs nixos/sway: Improve the module and adapt it to NixOS 2019-03-13 11:37:11 +01:00
security nixos/confinement: Allow to include the full unit 2019-03-14 20:04:33 +01:00
services plasma5: fix typo from pr #57037 2019-03-14 14:09:13 -04:00
system nixos: Add 'chroot' options to systemd.services 2019-03-14 19:14:01 +01:00
tasks network-scripting: do not run resolvconf if /etc/resolv.conf is managed manually (#56682) 2019-03-09 13:42:14 +02:00
testing types.optionSet: deprecate and remove last usages 2019-01-31 00:41:10 +02:00
virtualisation virtualbox-host module: fix warnings syntax 2019-03-09 11:39:22 +01:00
module-list.nix nixos/systemd-chroot: Rename chroot to confinement 2019-03-14 19:14:03 +01:00
rename.nix tautulli/plexpy: 1.4.25 -> 2.1.26 (renamed) 2019-02-28 19:07:00 +01:00