summary refs log tree commit diff
path: root/nixos/tests/nextcloud
diff options
context:
space:
mode:
authorMaximilian Bosch <maximilian@mbosch.me>2021-10-09 22:36:35 +0200
committerMaximilian Bosch <maximilian@mbosch.me>2021-10-09 22:45:31 +0200
commit1ee008fcb5d2dd4b9254a3168de97f5c45da9dac (patch)
tree27c08f08ebfbe57a47c1347afeea049dffcf1969 /nixos/tests/nextcloud
parent7856e40da626766c67f631dcc434814e22d93c78 (diff)
downloadnixpkgs-1ee008fcb5d2dd4b9254a3168de97f5c45da9dac.tar
nixpkgs-1ee008fcb5d2dd4b9254a3168de97f5c45da9dac.tar.gz
nixpkgs-1ee008fcb5d2dd4b9254a3168de97f5c45da9dac.tar.bz2
nixpkgs-1ee008fcb5d2dd4b9254a3168de97f5c45da9dac.tar.lz
nixpkgs-1ee008fcb5d2dd4b9254a3168de97f5c45da9dac.tar.xz
nixpkgs-1ee008fcb5d2dd4b9254a3168de97f5c45da9dac.tar.zst
nixpkgs-1ee008fcb5d2dd4b9254a3168de97f5c45da9dac.zip
nixos/nextcloud: fixup #119638
A few minor changes to get #119638 - nextcloud: add option to set
datadir and extensions - ready:

* `cfg.datadir` now gets `cfg.home` as default to make the type
  non-nullable.
* Enhanced the `basic` test to check the behavior with a custom datadir
  that's not `/var/lib/nextcloud`.
* Fix hashes for apps in option example.
* Simplify if/else for `appstoreenable` in override config.
* Simplify a few `mapAttrsToList`-expressions in
  `nextcloud-setup.service`.
Diffstat (limited to 'nixos/tests/nextcloud')
-rw-r--r--nixos/tests/nextcloud/basic.nix6
1 files changed, 6 insertions, 0 deletions
diff --git a/nixos/tests/nextcloud/basic.nix b/nixos/tests/nextcloud/basic.nix
index 1a7b25d5a49..eb37470a4c7 100644
--- a/nixos/tests/nextcloud/basic.nix
+++ b/nixos/tests/nextcloud/basic.nix
@@ -33,8 +33,13 @@ in {
     in {
       networking.firewall.allowedTCPPorts = [ 80 ];
 
+      systemd.tmpfiles.rules = [
+        "d /var/lib/nextcloud-data 0750 nextcloud nginx - -"
+      ];
+
       services.nextcloud = {
         enable = true;
+        datadir = "/var/lib/nextcloud-data";
         hostName = "nextcloud";
         config = {
           # Don't inherit adminuser since "root" is supposed to be the default
@@ -98,6 +103,7 @@ in {
         "${withRcloneEnv} ${copySharedFile}"
     )
     client.wait_for_unit("multi-user.target")
+    nextcloud.succeed("test -f /var/lib/nextcloud-data/data/root/files/test-shared-file")
     client.succeed(
         "${withRcloneEnv} ${diffSharedFile}"
     )