fix: nextcloud
This commit is contained in:
parent
11d08b6bf6
commit
dcc5594bc9
|
@ -1,19 +1,13 @@
|
||||||
{ self, config, lib, pkgs, ... }:
|
{ self, config, lib, pkgs, ... }:
|
||||||
let domain = "cloud.sondell.org";
|
let
|
||||||
|
domain = "cloud.sondell.org";
|
||||||
|
nextcloud = pkgs.nextcloud28;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# Based on https://carjorvaz.com/posts/the-holy-grail-nextcloud-setup-made-easy-by-nixos/
|
|
||||||
# security.acme = {
|
|
||||||
# acceptTerms = true;
|
|
||||||
# defaults = {
|
|
||||||
# email = "glennpub@proton.me";
|
|
||||||
# dnsProvider = "cloudflare";
|
|
||||||
# # # location of your CLOUDFLARE_DNS_API_TOKEN=[value]
|
|
||||||
# # # https://www.freedesktop.org/software/systemd/man/latest/systemd.exec.html#EnvironmentFile=
|
|
||||||
# environmentFile = "/REPLACE/WITH/YOUR/PATH";
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
|
|
||||||
|
environment.systemPackages = [
|
||||||
|
nextcloud
|
||||||
|
];
|
||||||
services = {
|
services = {
|
||||||
nginx.virtualHosts = {
|
nginx.virtualHosts = {
|
||||||
${domain} = {
|
${domain} = {
|
||||||
|
@ -29,24 +23,27 @@ in
|
||||||
enable = true;
|
enable = true;
|
||||||
hostName = domain;
|
hostName = domain;
|
||||||
# Need to manually increment with every major upgrade.
|
# Need to manually increment with every major upgrade.
|
||||||
package = pkgs.nextcloud28;
|
package = nextcloud;
|
||||||
# Let NixOS install and configure the database automatically.
|
# Let NixOS install and configure the database automatically.
|
||||||
database.createLocally = true;
|
database.createLocally = true;
|
||||||
# Let NixOS install and configure Redis caching automatically.
|
|
||||||
configureRedis = true;
|
|
||||||
# Increase the maximum file upload size.
|
# Increase the maximum file upload size.
|
||||||
maxUploadSize = "16G";
|
maxUploadSize = "16G";
|
||||||
https = true;
|
https = true;
|
||||||
autoUpdateApps.enable = true;
|
autoUpdateApps.enable = true;
|
||||||
extraAppsEnable = true;
|
extraAppsEnable = true;
|
||||||
|
# Let NixOS install and configure Redis caching automatically.
|
||||||
|
configureRedis = true;
|
||||||
|
settings = {
|
||||||
|
maintenance_window_start = 1;
|
||||||
|
};
|
||||||
extraOptions = {
|
extraOptions = {
|
||||||
redis = {
|
# redis = {
|
||||||
# host = "/run/redis/redis.sock";
|
# # host = "/run/redis/redis.sock";
|
||||||
port = 0;
|
# port = 0;
|
||||||
dbindex = 0;
|
# dbindex = 0;
|
||||||
password = "secret";
|
# password = "secret";
|
||||||
timeout = 1.5;
|
# timeout = 1.5;
|
||||||
};
|
# };
|
||||||
};
|
};
|
||||||
extraApps = with config.services.nextcloud.package.packages.apps; {
|
extraApps = with config.services.nextcloud.package.packages.apps; {
|
||||||
# List of apps we want to install and are already packaged in
|
# List of apps we want to install and are already packaged in
|
||||||
|
@ -55,7 +52,7 @@ in
|
||||||
};
|
};
|
||||||
config = {
|
config = {
|
||||||
overwriteProtocol = "https";
|
overwriteProtocol = "https";
|
||||||
# defaultPhoneRegion = "US";
|
defaultPhoneRegion = "SE";
|
||||||
dbtype = "pgsql";
|
dbtype = "pgsql";
|
||||||
adminuser = "admin";
|
adminuser = "admin";
|
||||||
adminpassFile = "/etc/nixos/.secrets/nextadminpw";
|
adminpassFile = "/etc/nixos/.secrets/nextadminpw";
|
||||||
|
@ -69,4 +66,14 @@ in
|
||||||
# startAt = "*-*-* 01:15:00";
|
# startAt = "*-*-* 01:15:00";
|
||||||
# };
|
# };
|
||||||
};
|
};
|
||||||
|
# services.onlyoffice = {
|
||||||
|
# enable = true;
|
||||||
|
# port = 8123;
|
||||||
|
# };
|
||||||
|
# services.nginx.virtualHosts."office.sondell.org" = {
|
||||||
|
# forceSSL = true;
|
||||||
|
# enableACME = true;
|
||||||
|
# locations."/".proxyPass = "http://localhost:8123";
|
||||||
|
|
||||||
|
# };
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue