nixos/systems/nextcloud/default.nix

43 lines
1.1 KiB
Nix
Raw Normal View History

2022-11-04 19:35:57 +01:00
{ custom, hostname }: { pkgs, ... }:
2022-11-05 14:35:26 +01:00
let
domain = "nextcloud.2li.ch";
in
2022-02-28 22:10:19 +01:00
{
imports = [
2022-11-08 21:26:00 +01:00
(import "${custom.inputs.self}/systems/raspi4" {
2022-02-28 22:10:19 +01:00
ip = "10.7.89.103";
2022-11-04 19:35:57 +01:00
inherit custom hostname;
2022-02-28 22:10:19 +01:00
})
(import "${custom.inputs.self}/modules/restic-server-mysqlutf8-client" {
2022-11-04 16:49:46 +01:00
path = "/home/andreas";
2022-11-10 00:25:15 +01:00
time = "01:30"; inherit custom;
2022-02-28 22:10:19 +01:00
})
2022-11-04 19:35:57 +01:00
(import "${custom.inputs.self}/modules/docker" { inherit custom; })
"${custom.inputs.self}/modules/mariadb"
2022-11-05 14:35:26 +01:00
(import "${custom.inputs.self}/modules/nextcloud" {
inherit custom domain;
})
2022-11-04 19:35:57 +01:00
"${custom.inputs.self}/modules/nginx-acme-base"
2022-02-28 22:10:19 +01:00
];
2022-05-18 21:33:06 +02:00
services.nginx = {
appendHttpConfig = ''
2022-05-18 21:33:06 +02:00
# Allow embedding from same domain
add_header X-Frame-Options SAMEORIGIN;
'';
clientMaxBodySize = "20G";
2022-11-05 14:35:26 +01:00
virtualHosts."${domain}" = {
2022-05-18 21:33:06 +02:00
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://127.0.0.1:8080";
proxyWebsockets = true; # needed if you need to use WebSocket
};
extraConfig = ''
# Required for large downloads
proxy_buffering off;
'';
2022-05-18 21:33:06 +02:00
};
2022-05-19 08:05:22 +02:00
};
}