Skip to content

Commit

Permalink
fix: fix attic & revert sazed as Nebula lighthouse
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelsgirao committed Jun 14, 2024
1 parent a3cd38e commit 7255254
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion hosts/sazed/machine.nix
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ in

rg = {
ip = "192.168.10.5";
isLighthouse = true;
isLighthouse = false; #Local firewall doesn't allow world access to 4242.
machineId = "4307a85c4d5e403fbd89fc34f27527e1";
machineType = "amd";
class = "workstation";
Expand Down
6 changes: 3 additions & 3 deletions modules/attic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
let
port = toString 33763;
dbUser = config.services.atticd.user;
host = "https://cache.${config.rg.domain}";
host = "cache.${config.rg.domain}";

in
{
Expand Down Expand Up @@ -79,15 +79,15 @@ in
# but since we're using the shorthand, it doesn't.
systemd.services.atticd.after = [ "postgresql.service" "nss-lookup.target" ];

services.caddy.virtualHosts."cache.${config.networking.fqdn}" = {
services.caddy.virtualHosts."${host}" = {
useACMEHost = "rafael.ovh";
extraConfig = ''
encode zstd gzip
header {
Strict-Transport-Security "max-age=2592000; includeSubDomains"
}
reverse_proxy http://127.0.0.1:${port}
reverse_proxy http://${config.rg.ip}:${port}
'';
};
Expand Down
4 changes: 1 addition & 3 deletions modules/core/nebula.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ in
key = config.age.secrets.RGNet-key.path;
tun.device = "nebula0";
ca = config.age.secrets.RGNet-CA.path;
lighthouses = lib.optionals (!isLighthouse) [ "192.168.10.5" "192.168.10.9" ];
lighthouses = lib.optionals (!isLighthouse) [ "192.168.10.9" ];
settings = {
cipher = "aes";
pki = {
Expand All @@ -55,8 +55,6 @@ in
staticHostMap = {
"192.168.10.9" =
[ "128.140.110.89:4242" "[2a01:4f8:1c1e:aead::1]:4242" ];
"192.168.10.5" =
[ "193.136.164.205:4242" "[2001:690:2100:82::205]:4242" ];
};
firewall.outbound = [{
host = "any";
Expand Down

0 comments on commit 7255254

Please sign in to comment.