This commit is contained in:
mjallen18
2025-11-16 19:10:06 -06:00
parent 0e93ea159f
commit 2a77d233f9
7 changed files with 83 additions and 102 deletions

View File

@@ -119,13 +119,6 @@ let
};
};
bindMounts = {
"/var/lib/matrix-synapse" = {
hostPath = cfg.dataDir;
isReadOnly = false;
};
};
# Create reverse proxy configuration using mkReverseProxy
reverseProxyConfig = lib.${namespace}.mkReverseProxy {
name = "matrix";
@@ -134,16 +127,6 @@ let
middlewares = cfg.reverseProxy.middlewares;
};
matrixContainer =
(lib.${namespace}.mkContainer {
name = "matrix-synapse";
localAddress = cfg.localAddress;
ports = [ cfg.port ];
bindMounts = bindMounts;
config = matrixConfig;
})
{ inherit lib; };
fullConfig = {
${namespace}.services.traefik = lib.mkIf cfg.reverseProxy.enable {
reverseProxies = [ reverseProxyConfig ];

View File

@@ -81,7 +81,12 @@ in
${hostAddress} host.containers protonmail-bridge
'';
services.nginx.virtualHosts."cloud.mjallen.dev".listen = [ { addr = "0.0.0.0"; port = 8080; } ];
services.nginx.virtualHosts."cloud.mjallen.dev".listen = [
{
addr = "0.0.0.0";
port = 8080;
}
];
services = {
nextcloud = {

View File

@@ -12,22 +12,21 @@ let
adminpass = config.sops.secrets."jallen-nas/nextcloud/adminpassword".path;
secretsFile = config.sops.secrets."jallen-nas/nextcloud/smtp_settings".path;
jwtSecretFile = config.sops.secrets."jallen-nas/onlyoffice-key".path;
nextcloudUserId = config.users.users.nix-apps.uid;
nextcloudGroupId = config.users.groups.jallen-nas.gid;
hostAddress = "10.0.1.3";
nextcloudPortExtHttp = 9988;
nextcloudPortExtHttps = 9943;
onlyofficePortExt = 9943;
nextcloudPhotos = pkgs.${namespace}.nextcloud-app-photos;
nextcloudPdfViewer = pkgs.${namespace}.nextcloud-app-pdfviewer;
nextcloudAssist = pkgs.${namespace}.nextcloud-app-assistant;
in
{
imports = [ ./options.nix ];
config = mkIf cfg.enable {
services.nginx.virtualHosts."cloud.mjallen.dev".listen = [ { addr = "0.0.0.0"; port = nextcloudPortExtHttp; } ];
services.nginx.virtualHosts."cloud.mjallen.dev".listen = [
{
addr = "0.0.0.0";
port = nextcloudPortExtHttp;
}
];
# Create required users and groups
users.users.nextcloud = {
@@ -92,7 +91,7 @@ in
# nextcloudPhotos
# nextcloudPdfViewer
# nextcloudAssist
# ;
# ;
};
config = {
@@ -153,4 +152,4 @@ in
};
};
};
}
}

View File

@@ -353,7 +353,7 @@ in
url = "http://10.0.1.3:3333";
}
];
matrix.loadBalancer.servers = [
{
url = "http://10.1.0.3:8448";
@@ -453,16 +453,16 @@ in
];
tls.certResolver = "letsencrypt";
};
matrix = {
entryPoints = [ "websecure" ];
rule = "Host(`matrix.${domain}`)";
service = "matrix";
middlewares = [
"crowdsec"
"whitelist-geoblock"
];
tls.certResolver = "letsencrypt";
rule = "Host(`matrix.${domain}`)";
service = "matrix";
middlewares = [
"crowdsec"
"whitelist-geoblock"
];
tls.certResolver = "letsencrypt";
};
authentik = {