nixos/nextcloud: Add options services.nextcloud.autoUpdateApps

nixos/nextcloud: Add documentation for nextcloud app installation and updates

nixos/nextcloud: Enable autoUpdateApps in nextcloud test

nixos/nextcloud: Fix typo in nixos/modules/services/web-apps/nextcloud.xml

Co-Authored-By: Florian Klink <flokli@flokli.de>

nixos/nextcloud: Escape html in option description

nixos/nextcloud: Fix autoUpdateApps URL in documentation.

Co-Authored-By: Florian Klink <flokli@flokli.de>
wip/yesman
Malte Brandy 5 years ago
parent 2a3bb2f8ac
commit 49f05a1760
No known key found for this signature in database
GPG Key ID: 226A2D41EF5378C9
  1. 22
      nixos/modules/services/web-apps/nextcloud.nix
  2. 6
      nixos/modules/services/web-apps/nextcloud.xml
  3. 4
      nixos/tests/nextcloud/basic.nix

@ -257,6 +257,23 @@ in {
'';
};
};
autoUpdateApps = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Run a auto update of all installed apps from the nextcloud repository.
'';
};
startAt = mkOption {
type = with types; either str (listOf str);
default = "05:00:00";
example = "Sun 14:00:00";
description = ''
When to run the update. See `systemd.services.&lt;name&gt;.startAt`.
'';
};
};
};
config = mkIf cfg.enable (mkMerge [
@ -362,6 +379,11 @@ in {
serviceConfig.User = "nextcloud";
serviceConfig.ExecStart = "${phpPackage}/bin/php -f ${pkgs.nextcloud}/cron.php";
};
"nextcloud-update-plugins" = mkIf cfg.autoUpdateApps.enable {
serviceConfig.Type = "oneshot";
serviceConfig.ExecStart = "${occ}/bin/nextcloud-occ app:update --all";
startAt = cfg.autoUpdateApps.startAt;
};
};
services.phpfpm = {

@ -111,5 +111,11 @@
<link xlink:href="https://github.com/NixOS/nixpkgs/issues/49783">#49783</link>,
for now it's unfortunately necessary to manually work around these issues.
</para>
<para>
Right now app installation and configuration is done imperatively in the nextcloud web ui or via the <literal>nextcloud-occ</literal> command line utility.
You can activate auto updates for your apps via
<literal><link linkend="opt-services.nextcloud.autoUpdateApps.enable">services.nextcloud.autoUpdateApps</link></literal>.
</para>
</section>
</chapter>

@ -22,6 +22,10 @@ in {
# Don't inherit adminuser since "root" is supposed to be the default
inherit adminpass;
};
autoUpdateApps = {
enable = true;
startAt = "20:00";
};
};
};
};

Loading…
Cancel
Save