Merge pull request #179236 from winterqt/nextcloud-improvements
nixos/nextcloud: some small improvements
This commit is contained in:
commit
ec5b885d95
|
@ -89,7 +89,8 @@ in {
|
||||||
};
|
};
|
||||||
datadir = mkOption {
|
datadir = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
defaultText = "config.services.nextcloud.home";
|
default = config.services.nextcloud.home;
|
||||||
|
defaultText = literalExpression "config.services.nextcloud.home";
|
||||||
description = ''
|
description = ''
|
||||||
Data storage path of nextcloud. Will be <xref linkend="opt-services.nextcloud.home" /> by default.
|
Data storage path of nextcloud. Will be <xref linkend="opt-services.nextcloud.home" /> by default.
|
||||||
This folder will be populated with a config.php and data folder which contains the state of the instance (excl the database).";
|
This folder will be populated with a config.php and data folder which contains the state of the instance (excl the database).";
|
||||||
|
@ -629,8 +630,6 @@ in {
|
||||||
else nextcloud24
|
else nextcloud24
|
||||||
);
|
);
|
||||||
|
|
||||||
services.nextcloud.datadir = mkOptionDefault config.services.nextcloud.home;
|
|
||||||
|
|
||||||
services.nextcloud.phpPackage =
|
services.nextcloud.phpPackage =
|
||||||
if versionOlder cfg.package.version "24" then pkgs.php80
|
if versionOlder cfg.package.version "24" then pkgs.php80
|
||||||
# FIXME: Use PHP 8.1 with Nextcloud 24 and higher, once issues like this one are fixed:
|
# FIXME: Use PHP 8.1 with Nextcloud 24 and higher, once issues like this one are fixed:
|
||||||
|
@ -650,6 +649,7 @@ in {
|
||||||
|
|
||||||
{ systemd.timers.nextcloud-cron = {
|
{ systemd.timers.nextcloud-cron = {
|
||||||
wantedBy = [ "timers.target" ];
|
wantedBy = [ "timers.target" ];
|
||||||
|
after = [ "nextcloud-setup.service" ];
|
||||||
timerConfig.OnBootSec = "5m";
|
timerConfig.OnBootSec = "5m";
|
||||||
timerConfig.OnUnitActiveSec = "5m";
|
timerConfig.OnUnitActiveSec = "5m";
|
||||||
timerConfig.Unit = "nextcloud-cron.service";
|
timerConfig.Unit = "nextcloud-cron.service";
|
||||||
|
@ -840,12 +840,14 @@ in {
|
||||||
serviceConfig.User = "nextcloud";
|
serviceConfig.User = "nextcloud";
|
||||||
};
|
};
|
||||||
nextcloud-cron = {
|
nextcloud-cron = {
|
||||||
|
after = [ "nextcloud-setup.service" ];
|
||||||
environment.NEXTCLOUD_CONFIG_DIR = "${datadir}/config";
|
environment.NEXTCLOUD_CONFIG_DIR = "${datadir}/config";
|
||||||
serviceConfig.Type = "oneshot";
|
serviceConfig.Type = "oneshot";
|
||||||
serviceConfig.User = "nextcloud";
|
serviceConfig.User = "nextcloud";
|
||||||
serviceConfig.ExecStart = "${phpPackage}/bin/php -f ${cfg.package}/cron.php";
|
serviceConfig.ExecStart = "${phpPackage}/bin/php -f ${cfg.package}/cron.php";
|
||||||
};
|
};
|
||||||
nextcloud-update-plugins = mkIf cfg.autoUpdateApps.enable {
|
nextcloud-update-plugins = mkIf cfg.autoUpdateApps.enable {
|
||||||
|
after = [ "nextcloud-setup.service" ];
|
||||||
serviceConfig.Type = "oneshot";
|
serviceConfig.Type = "oneshot";
|
||||||
serviceConfig.ExecStart = "${occ}/bin/nextcloud-occ app:update --all";
|
serviceConfig.ExecStart = "${occ}/bin/nextcloud-occ app:update --all";
|
||||||
serviceConfig.User = "nextcloud";
|
serviceConfig.User = "nextcloud";
|
||||||
|
@ -914,7 +916,6 @@ in {
|
||||||
priority = 100;
|
priority = 100;
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
allow all;
|
allow all;
|
||||||
log_not_found off;
|
|
||||||
access_log off;
|
access_log off;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue