modules(pihole-container): make newuidmap available to systemd service

See https://github.com/NixOS/nixpkgs/issues/138423
Potentially a security issue as `/run/wrappers/bin/` contains more commands often with suid bit set.
This commit is contained in:
Christopher Bacher 2022-10-15 21:09:27 +02:00
parent 41d400120d
commit 73aed13f87

View file

@ -279,8 +279,11 @@ in rec {
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
after = [ "network-online.target" ]; after = [ "network-online.target" ];
# required to make `newuidmap` available to the systemd service (see https://github.com/NixOS/nixpkgs/issues/138423)
path = [ "/run/wrappers" ];
serviceConfig = let serviceConfig = let
optPihole = options.services.pihole; opt = options.services.pihole;
containerEnvVars = let containerEnvVars = let
envVarFragments = collectAttrFragments (value: isAttrs value && value ? "envVar") opt.piholeConfiguration; envVarFragments = collectAttrFragments (value: isAttrs value && value ? "envVar") opt.piholeConfiguration;