Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3ddc56ca145b
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 946f7d178ca7
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on May 23, 2020

  1. nixosTests.nextcloud: Add davfs2 example to the VM test

    Some people use davfs2 to mount a NextCloud instance, so make sure this
    works as well.
    flokli committed May 23, 2020
    Copy the full SHA
    75e18ab View commit details
  2. Merge pull request #88721 from flokli/nixostests-nextcloud-davfs2

    nixosTests.nextcloud: Add davfs2 example to the VM test
    Ma27 authored May 23, 2020
    Copy the full SHA
    946f7d1 View commit details
Showing with 17 additions and 1 deletion.
  1. +17 −1 nixos/tests/nextcloud/basic.nix
18 changes: 17 additions & 1 deletion nixos/tests/nextcloud/basic.nix
Original file line number Diff line number Diff line change
@@ -9,7 +9,22 @@ in {

nodes = {
# The only thing the client needs to do is download a file.
client = { ... }: {};
client = { ... }: {
services.davfs2.enable = true;
system.activationScripts.davfs2-secrets = ''
echo "http://nextcloud/remote.php/webdav/ ${adminuser} ${adminpass}" > /tmp/davfs2-secrets
chmod 600 /tmp/davfs2-secrets
'';
fileSystems = pkgs.lib.mkVMOverride {
"/mnt/dav" = {
device = "http://nextcloud/remote.php/webdav/";
fsType = "davfs";
options = let
davfs2Conf = (pkgs.writeText "davfs2.conf" "secrets /tmp/davfs2-secrets");
in [ "conf=${davfs2Conf}" "x-systemd.automount" "noauto"];
};
};
};

nextcloud = { config, pkgs, ... }: {
networking.firewall.allowedTCPPorts = [ 80 ];
@@ -60,5 +75,6 @@ in {
client.succeed(
"${withRcloneEnv} ${diffSharedFile}"
)
assert "hi" in client.succeed("cat /mnt/dav/test-shared-file")
'';
})