mirror of
https://github.com/starr-dusT/dotfiles.git
synced 2025-06-02 09:46:06 -07:00
switch to nextcloud in docker and edit nginx
This commit is contained in:
parent
72b6c537c5
commit
3f42dca62b
@ -6,7 +6,6 @@
|
|||||||
./rss.nix
|
./rss.nix
|
||||||
./home-assistant
|
./home-assistant
|
||||||
./gitea.nix
|
./gitea.nix
|
||||||
./nextcloud.nix
|
|
||||||
./backup.nix
|
./backup.nix
|
||||||
./jellyfin.nix
|
./jellyfin.nix
|
||||||
];
|
];
|
||||||
@ -73,17 +72,28 @@
|
|||||||
client_max_body_size 3000m;
|
client_max_body_size 3000m;
|
||||||
'';
|
'';
|
||||||
});
|
});
|
||||||
|
"cloud.tstarr.us" = (SSL // {
|
||||||
|
locations."/".proxyPass = "http://localhost:8080/";
|
||||||
|
extraConfig = ''
|
||||||
|
client_max_body_size 3000m;
|
||||||
|
'';
|
||||||
|
});
|
||||||
"lc.tstarr.us" = (SSL // {
|
"lc.tstarr.us" = (SSL // {
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://localhost:8065/";
|
proxyPass = "http://localhost:8065/";
|
||||||
proxyWebsockets = true;
|
proxyWebsockets = true;
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
"code.tstarr.us" = (SSL // {
|
"codeA.tstarr.us" = (SSL // {
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://localhost:8443/";
|
proxyPass = "http://localhost:3000/";
|
||||||
|
proxyWebsockets = true;
|
||||||
|
};
|
||||||
|
});
|
||||||
|
"codeB.tstarr.us" = (SSL // {
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://localhost:3002/";
|
||||||
proxyWebsockets = true;
|
proxyWebsockets = true;
|
||||||
|
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -1,68 +0,0 @@
|
|||||||
{ config, lib, pkgs, user, ... }:
|
|
||||||
let
|
|
||||||
dumpFolder = "/engi/backup/dumps/nextcloud";
|
|
||||||
domain = "cloud.tstarr.us";
|
|
||||||
in {
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
cron
|
|
||||||
zip
|
|
||||||
rsync
|
|
||||||
(pkgs.writeScriptBin "dump-nextcloud" ''
|
|
||||||
#!/bin/sh
|
|
||||||
cd ${dumpFolder}
|
|
||||||
[ -e nextcloud-sql ] && rm nextcloud-sql
|
|
||||||
nextcloud-occ maintenance:mode --on
|
|
||||||
mysqldump --single-transaction nextcloud > ${dumpFolder}/nextcloud-sql
|
|
||||||
nextcloud-occ maintenance:mode --off
|
|
||||||
'')
|
|
||||||
];
|
|
||||||
|
|
||||||
systemd.tmpfiles.rules = [
|
|
||||||
"d ${dumpFolder} 0775 nextcloud nextcloud -"
|
|
||||||
];
|
|
||||||
|
|
||||||
# nextcloud secrets
|
|
||||||
age.secrets."nextcloud/password" = {
|
|
||||||
file = ../../secrets/nextcloud/password.age;
|
|
||||||
owner = "nextcloud";
|
|
||||||
group = "nextcloud";
|
|
||||||
};
|
|
||||||
|
|
||||||
services = {
|
|
||||||
nginx.virtualHosts = {
|
|
||||||
"${domain}" = {
|
|
||||||
forceSSL = true;
|
|
||||||
enableACME = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
nextcloud = {
|
|
||||||
enable = true;
|
|
||||||
hostName = "${domain}";
|
|
||||||
|
|
||||||
# Need to manually increment with every major upgrade.
|
|
||||||
package = pkgs.nextcloud30;
|
|
||||||
|
|
||||||
# Let NixOS install and configure the database automatically.
|
|
||||||
database.createLocally = true;
|
|
||||||
|
|
||||||
# Let NixOS install and configure Redis caching automatically.
|
|
||||||
configureRedis = true;
|
|
||||||
|
|
||||||
# Increase the maximum file upload size to avoid problems uploading videos.
|
|
||||||
maxUploadSize = "16G";
|
|
||||||
https = true;
|
|
||||||
autoUpdateApps.enable = true;
|
|
||||||
settings = {
|
|
||||||
overwriteprotocol = "https";
|
|
||||||
default_phone_region = "US";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = {
|
|
||||||
dbtype = "mysql";
|
|
||||||
adminuser = "admin";
|
|
||||||
adminpassFile = "/run/agenix/nextcloud/password";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user