Document Nextcloud upgrade process if it breaks again.
This commit is contained in:
parent
bc7d30c1b9
commit
c23fb20676
1 changed files with 26 additions and 10 deletions
|
@ -28,7 +28,7 @@
|
||||||
nextcloud = {
|
nextcloud = {
|
||||||
enable = true;
|
enable = true;
|
||||||
hostName = "nextcloud.thewordnerd.info";
|
hostName = "nextcloud.thewordnerd.info";
|
||||||
package = pkgs.nextcloud30;
|
package = pkgs.nextcloud31;
|
||||||
configureRedis = true;
|
configureRedis = true;
|
||||||
maxUploadSize = "16G";
|
maxUploadSize = "16G";
|
||||||
# autoUpdateApps.enable = true;
|
# autoUpdateApps.enable = true;
|
||||||
|
@ -54,27 +54,43 @@
|
||||||
};
|
};
|
||||||
resolved.enable = true;
|
resolved.enable = true;
|
||||||
};
|
};
|
||||||
|
# IMPORTANT: Nextcloud container startup workaround
|
||||||
|
# The nextcloud-setup service blocks container startup when it needs to perform upgrades,
|
||||||
|
# creating a circular dependency: the network can't be configured until the container is ready,
|
||||||
|
# but the container can't be ready without network access for the upgrade.
|
||||||
|
#
|
||||||
|
# To upgrade Nextcloud when changing major versions:
|
||||||
|
# 1. Uncomment the lines below to disable nextcloud-setup
|
||||||
|
# 2. Run: nixos-rebuild switch
|
||||||
|
# 3. Run: nixos-container run nextcloud -- nextcloud-occ upgrade
|
||||||
|
# 4. Run: nixos-container run nextcloud -- nextcloud-occ maintenance:mode --off
|
||||||
|
# 5. Comment out the lines below again
|
||||||
|
# 6. Run: nixos-rebuild switch
|
||||||
|
#
|
||||||
|
# systemd.services.nextcloud-setup = {
|
||||||
|
# enable = false;
|
||||||
|
# };
|
||||||
programs.nix-ld.enable = true;
|
programs.nix-ld.enable = true;
|
||||||
networking = {
|
networking = {
|
||||||
firewall.allowedTCPPorts = [ 80 ];
|
firewall.allowedTCPPorts = [ 80 ];
|
||||||
useHostResolvConf = lib.mkForce false;
|
useHostResolvConf = lib.mkForce false;
|
||||||
};
|
};
|
||||||
virtualisation.docker.enable = true;
|
# virtualisation.docker.enable = true;
|
||||||
users.users.nextcloud.extraGroups = [ "docker" ];
|
# users.users.nextcloud.extraGroups = [ "docker" ];
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
poppler_utils
|
poppler_utils
|
||||||
(pkgs.writeScriptBin "occ" ''
|
# (pkgs.writeScriptBin "occ" ''
|
||||||
#!${pkgs.bash}/bin/bash
|
# #!${pkgs.bash}/bin/bash
|
||||||
exec nextcloud-occ "$@"
|
# exec nextcloud-occ "$@"
|
||||||
'')
|
# '')
|
||||||
];
|
];
|
||||||
programs.java.binfmt = true;
|
programs.java.binfmt = true;
|
||||||
system.stateVersion = "24.11";
|
system.stateVersion = "24.11";
|
||||||
};
|
};
|
||||||
# https://discourse.nixos.org/t/podman-docker-in-nixos-container-ideally-in-unprivileged-one/22909/12
|
# https://discourse.nixos.org/t/podman-docker-in-nixos-container-ideally-in-unprivileged-one/22909/12
|
||||||
additionalCapabilities = [
|
# additionalCapabilities = [
|
||||||
''all" --system-call-filter="add_key keyctl bpf" --capability="all''
|
# ''all" --system-call-filter="add_key keyctl bpf" --capability="all''
|
||||||
];
|
# ];
|
||||||
bindMounts = {
|
bindMounts = {
|
||||||
"/run/postgresql" = {
|
"/run/postgresql" = {
|
||||||
hostPath = "/run/postgresql";
|
hostPath = "/run/postgresql";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue