Compare commits
2 Commits
3517e394c6
...
6603fac1c4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6603fac1c4 | ||
|
|
cb1776d670 |
@@ -38,7 +38,7 @@ let
|
|||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.my.servers = {
|
options.my.servers = {
|
||||||
nextcloud = setup.mkOptions "nextcloud" "cloud" 80;
|
nextcloud = setup.mkOptions "nextcloud" "cloud" 8081;
|
||||||
collabora = setup.mkOptions "collabora" "collabora" 9980;
|
collabora = setup.mkOptions "collabora" "collabora" 9980;
|
||||||
go-vod.enable = lib.mkEnableOption "Go-VOD video transcoding service";
|
go-vod.enable = lib.mkEnableOption "Go-VOD video transcoding service";
|
||||||
};
|
};
|
||||||
@@ -52,8 +52,9 @@ in
|
|||||||
"nodejs-14.21.3"
|
"nodejs-14.21.3"
|
||||||
"openssl-1.1.1v"
|
"openssl-1.1.1v"
|
||||||
];
|
];
|
||||||
users.groups.nextcloud = { inherit gid; };
|
users = {
|
||||||
users.users.nextcloud = {
|
groups.nextcloud = { inherit gid; };
|
||||||
|
users.nextcloud = {
|
||||||
inherit uid;
|
inherit uid;
|
||||||
isSystemUser = true;
|
isSystemUser = true;
|
||||||
group = "nextcloud";
|
group = "nextcloud";
|
||||||
@@ -68,6 +69,7 @@ in
|
|||||||
;
|
;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
services = {
|
services = {
|
||||||
nextcloud = {
|
nextcloud = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -167,6 +169,10 @@ in
|
|||||||
forceSSL = false;
|
forceSSL = false;
|
||||||
enableACME = false;
|
enableACME = false;
|
||||||
http2 = false;
|
http2 = false;
|
||||||
|
serverAliases = [
|
||||||
|
"cloud.servidos.lat"
|
||||||
|
"cloud.rotehaare.art"
|
||||||
|
];
|
||||||
listen = [
|
listen = [
|
||||||
{
|
{
|
||||||
addr = config.my.ips.wg-server;
|
addr = config.my.ips.wg-server;
|
||||||
@@ -250,7 +256,7 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
(lib.mkIf (cfg.enableProxy && config.my.enableProxy) {
|
(lib.mkIf (cfg.enableProxy && config.my.enableProxy && config.networking.hostName == "vps") {
|
||||||
my.servers.nextcloud.useDefaultProxy = false;
|
my.servers.nextcloud.useDefaultProxy = false;
|
||||||
services.nginx.virtualHosts = {
|
services.nginx.virtualHosts = {
|
||||||
"${cfg.host}" = {
|
"${cfg.host}" = {
|
||||||
@@ -266,27 +272,17 @@ in
|
|||||||
add_header X-Frame-Options "SAMEORIGIN" always;
|
add_header X-Frame-Options "SAMEORIGIN" always;
|
||||||
add_header Referrer-Policy "no-referrer-when-downgrade" always;
|
add_header Referrer-Policy "no-referrer-when-downgrade" always;
|
||||||
add_header X-Permitted-Cross-Domain-Policies "none" always;
|
add_header X-Permitted-Cross-Domain-Policies "none" always;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
proxy_set_header X-Forwarded-Host $host;
|
||||||
'';
|
'';
|
||||||
locations = {
|
locations = {
|
||||||
"/".proxyWebsockets = true;
|
"/" = {
|
||||||
"~ ^/nextcloud/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|oc[ms]-provider/.+|.+/richdocumentscode/proxy).php(?:$|/)" =
|
proxyPass = cfg.local;
|
||||||
{ };
|
proxyWebsockets = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
|
||||||
// lib.optionalAttrs cfg.enable {
|
|
||||||
forceSSL = false;
|
|
||||||
enableACME = false;
|
|
||||||
http2 = false;
|
|
||||||
listen = [
|
|
||||||
{
|
|
||||||
addr = config.my.ips.wg-server;
|
|
||||||
port = 8081;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
addr = config.my.localhost;
|
|
||||||
port = 8081;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
"${cfgC.host}" = lib.mkIf cfgC.enableProxy {
|
"${cfgC.host}" = lib.mkIf cfgC.enableProxy {
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user