Compare commits

..

No commits in common. "87bb177072e175f23455afc83adc0e7f02833436" and "33f5a07af15ee0db93c754fa909b4bfd87b78f60" have entirely different histories.

4 changed files with 49 additions and 74 deletions

View file

@ -1,43 +0,0 @@
{ pkgs, ... }:
let
blog-domain-socket = "/run/nginx/blog.sock";
anubis-domain-socket = "/run/anubis/anubis-main/anubis.sock";
anubis-metrics-socket = "/run/anubis/anubis-main/anubis-metrics.sock";
in
{
systemd.services = {
nginx.serviceConfig.SupplementaryGroups = [ "anubis" ];
anubis-main.serviceConfig.SupplementaryGroups = [ "nginx" ];
};
services = {
nginx.virtualHosts = {
"zerforschen.plus" = {
addSSL = true;
enableACME = true;
locations = {
"/_metrics".proxyPass = "http://unix:" + anubis-metrics-socket + ":/metrics";
"/".proxyPass = "http://unix:" + anubis-domain-socket;
};
};
"blog-in-anubis" = {
root = pkgs.zerforschen-plus-content;
listen = [
{
addr = "unix:" + blog-domain-socket;
}
];
};
};
anubis.instances.main = {
enable = true;
settings = {
BIND = anubis-domain-socket;
TARGET = "unix://" + blog-domain-socket;
METRICS_BIND = anubis-metrics-socket;
};
};
};
}

View file

@ -2,8 +2,6 @@
imports = [ imports = [
./hardware.nix ./hardware.nix
./nginx.nix ./nginx.nix
./headscale.nix
./blog.nix
]; ];
config = { config = {

View file

@ -1,23 +0,0 @@
let
headscale-port = 8668;
in
{
services = {
headscale = {
enable = true;
address = "localhost";
port = headscale-port;
settings = {
dns.base_domain = "high-gravity.space";
server_url = "https://headscale.zerforschen.plus";
};
};
nginx.virtualHosts."uplink.darkest.space" = {
addSSL = true;
enableACME = true;
locations = {
"/".proxyPass = "http://localhost:" + headscale-port;
};
};
};
}

View file

@ -1,19 +1,62 @@
{ pkgs, ... }:
let
blog-domain-socket = "/run/nginx/blog.sock";
anubis-domain-socket = "/run/anubis/anubis-main/anubis.sock";
anubis-metrics-socket = "/run/anubis/anubis-main/anubis-metrics.sock";
in
{ {
security.acme = { security.acme = {
acceptTerms = true; acceptTerms = true;
defaults.email = "acme@zerforschen.plus"; defaults.email = "acme@zerforschen.plus";
}; };
services.nginx = { systemd.services = {
enable = true; nginx.serviceConfig.SupplementaryGroups = [ "anubis" ];
recommendedProxySettings = true; anubis-main.serviceConfig.SupplementaryGroups = [ "nginx" ];
recommendedTlsSettings = true; };
recommendedGzipSettings = true;
recommendedOptimisation = true; services = {
nginx = {
enable = true;
recommendedProxySettings = true;
recommendedTlsSettings = true;
recommendedGzipSettings = true;
recommendedOptimisation = true;
virtualHosts = {
"zerforschen.plus" = {
addSSL = true;
enableACME = true;
locations = {
"/_metrics".proxyPass = "http://unix:" + anubis-metrics-socket + ":/metrics";
"/".proxyPass = "http://unix:" + anubis-domain-socket;
};
};
"blog-in-anubis" = {
root = pkgs.zerforschen-plus-content;
listen = [
{
addr = "unix:" + blog-domain-socket;
}
];
};
};
};
anubis.instances.main = {
enable = true;
settings = {
BIND = anubis-domain-socket;
TARGET = "unix://" + blog-domain-socket;
METRICS_BIND = anubis-metrics-socket;
};
};
}; };
networking.firewall.allowedTCPPorts = [ networking.firewall.allowedTCPPorts = [
80 80
443 443
5201
]; ];
} }