mirror of
https://github.com/phfroidmont/self-hosting.git
synced 2025-12-25 13:46:59 +01:00
Increase nextcloud's max upload size
This commit is contained in:
parent
762879e3ae
commit
f6e71ded17
1 changed files with 17 additions and 24 deletions
|
|
@ -6,12 +6,9 @@ let
|
||||||
gidFile = pkgs.writeText "gidfile" ''
|
gidFile = pkgs.writeText "gidfile" ''
|
||||||
nextcloud:991
|
nextcloud:991
|
||||||
'';
|
'';
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
sops.secrets = {
|
sops.secrets = {
|
||||||
sshfsKey = {
|
sshfsKey = { key = "sshfs_keys/private"; };
|
||||||
key = "sshfs_keys/private";
|
|
||||||
};
|
|
||||||
nextcloudDbPassword = {
|
nextcloudDbPassword = {
|
||||||
owner = config.users.users.nextcloud.name;
|
owner = config.users.users.nextcloud.name;
|
||||||
key = "nextcloud/db_password";
|
key = "nextcloud/db_password";
|
||||||
|
|
@ -24,9 +21,7 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [ sshfs ];
|
||||||
sshfs
|
|
||||||
];
|
|
||||||
|
|
||||||
systemd.services.nextcloud-data-sshfs = {
|
systemd.services.nextcloud-data-sshfs = {
|
||||||
wantedBy = [ "multi-user.target" "nextcloud-setup.service" ];
|
wantedBy = [ "multi-user.target" "nextcloud-setup.service" ];
|
||||||
|
|
@ -34,8 +29,7 @@ in
|
||||||
restartIfChanged = false;
|
restartIfChanged = false;
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStartPre = "${pkgs.coreutils}/bin/mkdir -p /var/lib/nextcloud/data";
|
ExecStartPre = "${pkgs.coreutils}/bin/mkdir -p /var/lib/nextcloud/data";
|
||||||
ExecStart =
|
ExecStart = let
|
||||||
let
|
|
||||||
options = builtins.concatStringsSep "," [
|
options = builtins.concatStringsSep "," [
|
||||||
"identityfile=${config.sops.secrets.sshfsKey.path}"
|
"identityfile=${config.sops.secrets.sshfsKey.path}"
|
||||||
"ServerAliveInterval=15"
|
"ServerAliveInterval=15"
|
||||||
|
|
@ -46,8 +40,7 @@ in
|
||||||
"default_permissions"
|
"default_permissions"
|
||||||
"nomap=ignore"
|
"nomap=ignore"
|
||||||
];
|
];
|
||||||
in
|
in "${pkgs.sshfs}/bin/mount.fuse.sshfs www-data@10.0.2.3:/nix/var/data/nextcloud/data "
|
||||||
"${pkgs.sshfs}/bin/mount.fuse.sshfs www-data@10.0.2.3:/nix/var/data/nextcloud/data "
|
|
||||||
+ "/var/lib/nextcloud/data -o ${options}";
|
+ "/var/lib/nextcloud/data -o ${options}";
|
||||||
ExecStopPost = "-${pkgs.fuse}/bin/fusermount -u /var/lib/nextcloud/data";
|
ExecStopPost = "-${pkgs.fuse}/bin/fusermount -u /var/lib/nextcloud/data";
|
||||||
KillMode = "process";
|
KillMode = "process";
|
||||||
|
|
@ -59,13 +52,13 @@ in
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
services.nextcloud = {
|
services.nextcloud = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.nextcloud25;
|
package = pkgs.nextcloud25;
|
||||||
hostName = "cloud.${config.networking.domain}";
|
hostName = "cloud.${config.networking.domain}";
|
||||||
https = true;
|
https = true;
|
||||||
enableBrokenCiphersForSSE = false;
|
enableBrokenCiphersForSSE = false;
|
||||||
|
maxUploadSize = "1G";
|
||||||
config = {
|
config = {
|
||||||
dbtype = "pgsql";
|
dbtype = "pgsql";
|
||||||
dbuser = "nextcloud";
|
dbuser = "nextcloud";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue