summary refs log tree commit diff
diff options
context:
space:
mode:
authorAntoine Eiche <lewo@abesis.fr>2020-06-07 20:31:45 +0200
committerAntoine Eiche <lewo@abesis.fr>2020-06-07 20:47:11 +0200
commitcb682317b008799e3bf647484c6a48d078bc0230 (patch)
tree027e365c08248569f77a5c6d2ce9b88ae67d94cc
parent1059cdab38907496fd3370a9ec4420b1ff200ed2 (diff)
downloadnixpkgs-cb682317b008799e3bf647484c6a48d078bc0230.tar
nixpkgs-cb682317b008799e3bf647484c6a48d078bc0230.tar.gz
nixpkgs-cb682317b008799e3bf647484c6a48d078bc0230.tar.bz2
nixpkgs-cb682317b008799e3bf647484c6a48d078bc0230.tar.lz
nixpkgs-cb682317b008799e3bf647484c6a48d078bc0230.tar.xz
nixpkgs-cb682317b008799e3bf647484c6a48d078bc0230.tar.zst
nixpkgs-cb682317b008799e3bf647484c6a48d078bc0230.zip
nixos/nextcloud: preserve OC_PASS env variable in the occ wrapper
The OC_PASS environment variable can be used to create a user with
`occ user:add --password-from-env`. It is currently not possible to
use the `nextcloud-occ` to "non-interactively" create a user since
this variable is ignored by sudo.
-rw-r--r--nixos/modules/services/web-apps/nextcloud.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/services/web-apps/nextcloud.nix b/nixos/modules/services/web-apps/nextcloud.nix
index f826096bf60..5b9065dec3c 100644
--- a/nixos/modules/services/web-apps/nextcloud.nix
+++ b/nixos/modules/services/web-apps/nextcloud.nix
@@ -34,7 +34,7 @@ let
     cd ${cfg.package}
     sudo=exec
     if [[ "$USER" != nextcloud ]]; then
-      sudo='exec /run/wrappers/bin/sudo -u nextcloud --preserve-env=NEXTCLOUD_CONFIG_DIR'
+      sudo='exec /run/wrappers/bin/sudo -u nextcloud --preserve-env=NEXTCLOUD_CONFIG_DIR --preserve-env=OC_PASS'
     fi
     export NEXTCLOUD_CONFIG_DIR="${cfg.home}/config"
     $sudo \