From a2454975a58ce3d3773f4ec5b2c0cd50738cbcac Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Thu, 12 Aug 2021 14:35:24 +0200 Subject: [PATCH] doas: fix recursive calls to doas Doas was broken for recursive calls like `doas -u operator lncli` where `lncli` internally calls doas. --- modules/modules.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/modules.nix b/modules/modules.nix index fbfe272..c32bdf0 100644 --- a/modules/modules.nix +++ b/modules/modules.nix @@ -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"; }; };