doas: fix recursive calls to doas

Doas was broken for recursive calls like `doas -u operator lncli`
where `lncli` internally calls doas.
This commit is contained in:
Erik Arvstedt 2021-08-12 14:35:24 +02:00
parent 7c876664b1
commit a2454975a5
No known key found for this signature in database
GPG Key ID: 33312B944DD97846

View File

@ -70,7 +70,8 @@ with lib;
runAsUserCmd = mkOption {
readOnly = true;
default = if config.security.doas.enable
then "doas -u"
# TODO: Use absolute path until https://github.com/NixOS/nixpkgs/pull/133622 is available.
then "/run/wrappers/bin/doas -u"
else "sudo -u";
};
};