diff options
author | Antoine Eiche <lewo@abesis.fr> | 2020-06-07 20:31:45 +0200 |
---|---|---|
committer | Antoine Eiche <lewo@abesis.fr> | 2020-06-07 20:47:11 +0200 |
commit | cb682317b008799e3bf647484c6a48d078bc0230 (patch) | |
tree | 027e365c08248569f77a5c6d2ce9b88ae67d94cc | |
parent | 1059cdab38907496fd3370a9ec4420b1ff200ed2 (diff) | |
download | nixpkgs-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.nix | 2 |
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 \ |