Use aciceri.dev domains for VPNs too
Some checks failed
EVAL aarch64-linux.sisko
BUILD aarch64-linux.sisko
UPLOAD aarch64-linux.sisko
DOWNLOAD aarch64-linux.sisko
CACHIX aarch64-linux.sisko
ATTIC aarch64-linux.sisko
/ test (push) Successful in 2m9s

This commit is contained in:
Andrea Ciceri 2025-03-14 15:56:29 +01:00
parent a8b1fed384
commit 9677a6ca77
Signed by: aciceri
SSH key fingerprint: SHA256:/AagBweyV4Hlfg9u092n8hbHwD5fcB6A3qhDiDA65Rg
11 changed files with 62 additions and 71 deletions

View file

@ -11,13 +11,10 @@
"wireguard-server" "wireguard-server"
"mediatomb" "mediatomb"
"transmission" "transmission"
# "hercules-ci"
"home-assistant" "home-assistant"
"adguard-home" "adguard-home"
"cloudflare-dyndns" "cloudflare-dyndns"
"sisko-proxy" "sisko-proxy"
"invidious"
"searx"
"sisko-share" "sisko-share"
"forgejo" "forgejo"
"prometheus" "prometheus"
@ -32,7 +29,6 @@
"syncthing" "syncthing"
"atticd" "atticd"
"jellyfin" "jellyfin"
"firefly"
"matrix" "matrix"
"radarr" "radarr"
"zerotier" "zerotier"

View file

@ -1,3 +1,4 @@
{ config, ... }:
{ {
services.adguardhome = { services.adguardhome = {
enable = true; enable = true;
@ -15,4 +16,13 @@
environment.persistence."/persist".directories = [ environment.persistence."/persist".directories = [
"/var/lib/AdGuardHome" "/var/lib/AdGuardHome"
]; ];
services.nginx.virtualHosts."adguard.sisko.wg.aciceri.dev" = {
forceSSL = true;
useACMEHost = "aciceri.dev";
locations."/" = {
proxyPass = "http://localhost:${builtins.toString config.services.adguardhome.port}";
};
serverAliases = [ "adguard.sisko.zt.aciceri.dev" ];
};
} }

View file

@ -8,15 +8,8 @@
"aciceri.dev" "aciceri.dev"
"git.aciceri.dev" "git.aciceri.dev"
"home.aciceri.dev" "home.aciceri.dev"
"torrent.aciceri.dev"
"search.aciceri.dev"
"invidious.aciceri.dev"
"vpn.aciceri.dev"
"photos.aciceri.dev" "photos.aciceri.dev"
"status.aciceri.dev"
"jelly.aciceri.dev" "jelly.aciceri.dev"
"firefly.aciceri.dev"
"import.firefly.aciceri.dev"
"matrix.aciceri.dev" "matrix.aciceri.dev"
]; ];
apiTokenFile = config.age.secrets.cloudflare-dyndns-api-token.path; apiTokenFile = config.age.secrets.cloudflare-dyndns-api-token.path;

View file

@ -7,7 +7,7 @@ in
enable = true; enable = true;
settings = { settings = {
server = { server = {
domain = "status.aciceri.dev"; domain = "status.sisko.aciceri.dev";
http_addr = "127.0.0.1"; http_addr = "127.0.0.1";
http_port = 2342; http_port = 2342;
root_url = "https://${config.services.grafana.settings.server.domain}:443/"; root_url = "https://${config.services.grafana.settings.server.domain}:443/";
@ -30,10 +30,11 @@ in
]; ];
services.nginx.virtualHosts = { services.nginx.virtualHosts = {
"status.aciceri.dev" = { "status.sisko.wg.aciceri.dev" = {
enableACME = true; useACMEHost = "aciceri.dev";
forceSSL = true; forceSSL = true;
locations."/".proxyPass = "http://127.0.0.1:${builtins.toString cfg.settings.server.http_port}"; locations."/".proxyPass = "http://127.0.0.1:${builtins.toString cfg.settings.server.http_port}";
serverAliases = [ "status.sisko.zt.aciceri.dev" ];
}; };
}; };
} }

View file

@ -15,7 +15,7 @@
"jelly.aciceri.dev" = { "jelly.aciceri.dev" = {
enableACME = true; enableACME = true;
forceSSL = true; forceSSL = true;
locations."/".proxyPass = "http://127.0.0.1:8096"; locations."/".proxyPass = "http://127.0.0.1:8096"; # FIXME hardcoded port
}; };
}; };
} }

View file

@ -7,7 +7,6 @@
let let
clientConfig = { clientConfig = {
"m.homeserver".base_url = "https://matrix.aciceri.dev"; "m.homeserver".base_url = "https://matrix.aciceri.dev";
# "org.matrix.msc3575.proxy".url = "https://syncv3.matrix.aciceri.dev";
}; };
serverConfig."m.server" = "matrix.aciceri.dev:443"; serverConfig."m.server" = "matrix.aciceri.dev:443";
mkWellKnown = data: '' mkWellKnown = data: ''
@ -21,7 +20,7 @@ in
services.nginx.virtualHosts = { services.nginx.virtualHosts = {
"aciceri.dev" = { "aciceri.dev" = {
enableACME = true; useACMEHost = "aciceri.dev";
forceSSL = true; forceSSL = true;
locations."= /.well-known/matrix/server".extraConfig = mkWellKnown serverConfig; locations."= /.well-known/matrix/server".extraConfig = mkWellKnown serverConfig;
locations."= /.well-known/matrix/client".extraConfig = mkWellKnown clientConfig; locations."= /.well-known/matrix/client".extraConfig = mkWellKnown clientConfig;
@ -36,17 +35,6 @@ in
}; };
}; };
services.postgresql = {
enable = true;
# initialScript = pkgs.writeText "synapse-init.sql" ''
# CREATE ROLE "matrix-synapse" WITH LOGIN PASSWORD 'synapse';
# CREATE DATABASE "matrix-synapse" WITH OWNER "matrix-synapse"
# TEMPLATE template0
# LC_COLLATE = "C"
# LC_CTYPE = "C";
# '';
};
systemd.tmpfiles.rules = [ systemd.tmpfiles.rules = [
"d ${config.services.matrix-synapse.dataDir} 770 matrix-synapse matrix-synapse" "d ${config.services.matrix-synapse.dataDir} 770 matrix-synapse matrix-synapse"
]; ];
@ -79,28 +67,4 @@ in
}; };
extraConfigFiles = [ config.age.secrets.matrix-registration-shared-secret.path ]; extraConfigFiles = [ config.age.secrets.matrix-registration-shared-secret.path ];
}; };
# backup.paths = [
# config.services.matrix-synapse.dataDir
# "/var/backup/postgresql/matrix-synapse.sql.gz"
# ];
# services.postgresqlBackup = {
# enable = true;
# databases = [ "matrix-synapse" ];
# };
# services.matrix-sliding-sync = {
# enable = true;
# environmentFile = config.age.secrets.matrix-sliding-sync-secret.path;
# settings = {
# SYNCV3_SERVER = "http://localhost:8008";
# };
# };
# services.nginx.virtualHosts."syncv3.matrix.aciceri.dev" = {
# enableACME = true;
# forceSSL = true;
# locations."/".proxyPass = config.services.matrix-sliding-sync.settings.SYNCV3_SERVER;
# };
} }

View file

@ -1,7 +1,23 @@
{ config, ... }:
{ {
security.acme = { security.acme = {
acceptTerms = true; acceptTerms = true;
defaults.email = "andrea.ciceri@autistici.org"; defaults.email = "andrea.ciceri@autistici.org";
certs = {
"aciceri.dev" = {
reloadServices = [ "nginx.service" ];
domain = "aciceri.dev";
extraDomainNames = [
"*.sisko.zt.aciceri.dev"
"*.sisko.wg.aciceri.dev"
];
dnsProvider = "cloudflare";
# dnsResolver = "1.1.1.1:53";
dnsPropagationCheck = true;
group = config.services.nginx.group;
environmentFile = config.age.secrets.cloudflare-dyndns-api-token.path;
};
};
}; };
networking.firewall.allowedTCPPorts = [ networking.firewall.allowedTCPPorts = [
@ -11,6 +27,7 @@
services.nginx = { services.nginx = {
enable = true; enable = true;
statusPage = true;
recommendedGzipSettings = true; recommendedGzipSettings = true;
recommendedOptimisation = true; recommendedOptimisation = true;
recommendedProxySettings = true; recommendedProxySettings = true;

View file

@ -25,14 +25,15 @@
imports = [ ../nginx-base ]; imports = [ ../nginx-base ];
services.nginx.virtualHosts."paper.aciceri.dev" = { services.nginx.virtualHosts."paper.sisko.wg.aciceri.dev" = {
forceSSL = true; forceSSL = true;
enableACME = true; useACMEHost = "aciceri.dev";
locations."/" = { locations."/" = {
proxyPass = "http://localhost:${builtins.toString config.services.paperless.port}"; proxyPass = "http://localhost:${builtins.toString config.services.paperless.port}";
}; };
extraConfig = '' extraConfig = ''
client_max_body_size 50000M; client_max_body_size 50000M;
''; '';
serverAliases = [ "paper.sisko.zt.aciceri.dev" ];
}; };
} }

View file

@ -2,4 +2,13 @@
services.radarr = { services.radarr = {
enable = true; enable = true;
}; };
services.nginx.virtualHosts."radarr.sisko.wg.aciceri.dev" = {
forceSSL = true;
useACMEHost = "aciceri.dev";
locations."/" = {
proxyPass = "http://localhost:7878"; # FIXME hardcoded port
};
serverAliases = [ "radarr.sisko.zt.aciceri.dev" ];
};
} }

View file

@ -15,26 +15,17 @@
proxy_set_header Connection $connection_upgrade; proxy_set_header Connection $connection_upgrade;
''; '';
}; };
"torrent.aciceri.dev" = { "home.sisko.aciceri.dev" = {
forceSSL = true; forceSSL = true;
enableACME = true; useACMEHost = "aciceri.dev";
locations."/" = { locations."/" = {
proxyPass = "http://localhost:${builtins.toString config.services.transmission.settings.rpc-port}"; proxyPass = "http://localhost:${builtins.toString config.services.home-assistant.config.http.server_port}";
}; proxyWebsockets = true;
};
"search.aciceri.dev" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://localhost:8888";
};
};
"invidious.aciceri.dev" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://localhost:${builtins.toString config.services.invidious.port}";
}; };
extraConfig = ''
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
'';
}; };
"photos.aciceri.dev" = { "photos.aciceri.dev" = {
extraConfig = '' extraConfig = ''

View file

@ -48,4 +48,13 @@
environment.persistence."/persist".directories = [ environment.persistence."/persist".directories = [
config.services.transmission.home config.services.transmission.home
]; ];
services.nginx.virtualHosts."torrent.sisko.wg.aciceri.dev" = {
forceSSL = true;
useACMEHost = "aciceri.dev";
locations."/" = {
proxyPass = "http://localhost:${builtins.toString config.services.transmission.settings.rpc-port}";
};
serverAliases = [ "torrent.sisko.zt.aciceri.dev" ];
};
} }