Skip to content
This repository was archived by the owner on Apr 12, 2021. It is now read-only.
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-channels
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: fea8c13075b1
Choose a base ref
...
head repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 6a99d5d6485b
Choose a head ref
  • 2 commits
  • 4 files changed
  • 2 contributors

Commits on Jun 20, 2020

  1. Copy the full SHA
    cdd1ece View commit details
  2. nixos/nextcloud: add occ internal option

    This option exposes the prefconfigured nextcloud-occ
    program. nextcloud-occ can then be used in other systemd services or
    added in environment.systemPackages.
    
    The nextcloud test shows how it can be add in
    environment.systemPackages.
    
    (cherry picked from commit 7d994ad)
    nlewo authored and Ma27 committed Jun 20, 2020

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    talyz Kim Lindberger
    Copy the full SHA
    6a99d5d View commit details
Showing with 22 additions and 3 deletions.
  1. +9 −1 nixos/modules/services/web-apps/nextcloud.nix
  2. +7 −1 nixos/tests/nextcloud/basic.nix
  3. +5 −0 pkgs/servers/nextcloud/default.nix
  4. +1 −1 pkgs/top-level/all-packages.nix
10 changes: 9 additions & 1 deletion nixos/modules/services/web-apps/nextcloud.nix
Original file line number Diff line number Diff line change
@@ -69,7 +69,7 @@ in {
package = mkOption {
type = types.package;
description = "Which package to use for the Nextcloud instance.";
relatedPackages = [ "nextcloud17" "nextcloud18" ];
relatedPackages = [ "nextcloud17" "nextcloud18" "nextcloud19" ];
};

maxUploadSize = mkOption {
@@ -303,6 +303,14 @@ in {
'';
};
};
occ = mkOption {
type = types.package;
default = occ;
internal = true;
description = ''
The nextcloud-occ program preconfigured to target this Nextcloud instance.
'';
};
};

config = mkIf cfg.enable (mkMerge [
8 changes: 7 additions & 1 deletion nixos/tests/nextcloud/basic.nix
Original file line number Diff line number Diff line change
@@ -11,7 +11,9 @@ in {
# The only thing the client needs to do is download a file.
client = { ... }: {};

nextcloud = { config, pkgs, ... }: {
nextcloud = { config, pkgs, ... }: let
cfg = config;
in {
networking.firewall.allowedTCPPorts = [ 80 ];

services.nextcloud = {
@@ -27,6 +29,8 @@ in {
startAt = "20:00";
};
};

environment.systemPackages = [ cfg.services.nextcloud.occ ];
};
};

@@ -52,6 +56,8 @@ in {
in ''
start_all()
nextcloud.wait_for_unit("multi-user.target")
# This is just to ensure the nextcloud-occ program is working
nextcloud.succeed("nextcloud-occ status")
nextcloud.succeed("curl -sSf http://nextcloud/login")
nextcloud.succeed(
"${withRcloneEnv} ${copySharedFile}"
5 changes: 5 additions & 0 deletions pkgs/servers/nextcloud/default.nix
Original file line number Diff line number Diff line change
@@ -34,4 +34,9 @@ in {
version = "18.0.6";
sha256 = "1chmkg31jc1nr53y8r886mmd2jzb78094mrx7ggcfpjfkkv8b89s";
};

nextcloud19 = generic {
version = "19.0.0";
sha256 = "1bhazqj5f02sclh5pmifzqfahhhfqypixbvkgrnlgqy5ayb44gfj";
};
}
2 changes: 1 addition & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
@@ -5282,7 +5282,7 @@ in
grocy = callPackage ../servers/grocy { };

inherit (callPackage ../servers/nextcloud {})
nextcloud17 nextcloud18;
nextcloud17 nextcloud18 nextcloud19;

nextcloud-client = libsForQt5.callPackage ../applications/networking/nextcloud-client { };