Compare commits

..

No commits in common. "793eec3ec42179da5618d7637e29ed0e5081baf2" and "25cb4f70ece4f41bb41b97587f8f9f2c0bc3f045" have entirely different histories.

5 changed files with 24 additions and 12 deletions

View file

@ -34,6 +34,7 @@ in
networking = { networking = {
networkmanager.enable = true; networkmanager.enable = true;
resolvconf.enable = false; # prevent default nameservers
nameservers = [ "1.1.1.1" "1.0.0.1" ]; nameservers = [ "1.1.1.1" "1.0.0.1" ];
}; };
@ -56,10 +57,13 @@ in
# To prevent `Unit dconf.service not found.` after theming GTK in HM # To prevent `Unit dconf.service not found.` after theming GTK in HM
programs.dconf.enable = true; programs.dconf.enable = true;
networking.hosts = { networking.extraHosts = ''
"192.168.0.26" = [ "elnuhub.local" ]; 192.168.0.26 elnuhub
"24.199.72.8" = [ "elnudrop.local" ]; 192.168.0.26 elnuhub.local
}; 24.199.72.8 elnudrop
24.199.72.8 elnudrop.local
${tailscale.hosts}
'';
#sound.enable = true; #sound.enable = true;
#hardware.pulseaudio.enable = true; #hardware.pulseaudio.enable = true;

View file

@ -1,3 +1,4 @@
with import ../../../../modules/tailscale/default.nix;
let host = "jichan.org"; in { let host = "jichan.org"; in {
services.nginx.virtualHosts."www.${host}" = { services.nginx.virtualHosts."www.${host}" = {
forceSSL = true; forceSSL = true;
@ -11,7 +12,7 @@ let host = "jichan.org"; in {
error_page 502 /502.html; error_page 502 /502.html;
''; '';
locations = { locations = {
"/".proxyPass = "http://elnuhub:3334"; "/".proxyPass = "http://${elnuhub}:3334";
"/502.html".root = "${./502}"; "/502.html".root = "${./502}";
"/logo.svg".root = "${./502}"; "/logo.svg".root = "${./502}";
"/missing.min.css".root = "${../shared/502}"; "/missing.min.css".root = "${../shared/502}";
@ -19,7 +20,7 @@ let host = "jichan.org"; in {
# Formerly tatoeba.elnu.com # Formerly tatoeba.elnu.com
# https://git.elnu.com/ElnuDev/tatoeba-api # https://git.elnu.com/ElnuDev/tatoeba-api
"/api/tatoeba/" = { "/api/tatoeba/" = {
proxyPass = "http://elnuhub:3001"; proxyPass = "http://${elnuhub}:3001";
extraConfig = '' extraConfig = ''
rewrite ^/api/tatoeba/(.*) /$1 break; rewrite ^/api/tatoeba/(.*) /$1 break;
''; '';
@ -28,7 +29,7 @@ let host = "jichan.org"; in {
# Formerly images.elnu.com # Formerly images.elnu.com
# https://git.elnu.com/ElnuDev/image-api # https://git.elnu.com/ElnuDev/image-api
"/api/images/" = { "/api/images/" = {
proxyPass = "http://elnuhub:3002"; proxyPass = "http://${elnuhub}:3002";
extraConfig = '' extraConfig = ''
rewrite ^/api/images/(.*) /$1 break; rewrite ^/api/images/(.*) /$1 break;
''; '';

View file

@ -12,7 +12,7 @@ let host = "tegakituesday.com"; in {
error_page 502 /502.html; error_page 502 /502.html;
''; '';
locations = { locations = {
"/".proxyPass = "http://elnuhub:3335"; "/".proxyPass = "http://${elnuhub}:3335";
"/502.html".root = "${./502}"; "/502.html".root = "${./502}";
"/mascot.png".root = "${./502}"; "/mascot.png".root = "${./502}";
"/missing.min.css".root = "${../shared/502}"; "/missing.min.css".root = "${../shared/502}";

View file

@ -10,10 +10,7 @@ in {
port = 8080; port = 8080;
settings = { settings = {
server_url = "https://${domain}"; server_url = "https://${domain}";
dns_config = { dns_config.base_domain = baseDomain;
base_domain = baseDomain;
domains = [ baseDomain ];
};
}; };
}; };
environment.systemPackages = [ config.services.headscale.package ]; environment.systemPackages = [ config.services.headscale.package ];

View file

@ -0,0 +1,10 @@
rec {
elnu = "100.64.0.1";
elnudrop = "100.64.0.2";
elnuhub = "100.64.0.3";
hosts = ''
${elnu} elnu.elnu.com
${elnudrop} elnudrop.elnu.com
${elnuhub} elnuhub.elnu.com
'';
}