tailscale --> caddy lb --> proxmox nodes
add caddy to global environment packages caddy config and add Caddyfile to remove-tabs ignore update name proxymox
This commit is contained in:
parent
c5fd9f3892
commit
f30f5e0ad5
4 changed files with 37 additions and 7 deletions
|
@ -25,7 +25,7 @@ repos:
|
||||||
hooks:
|
hooks:
|
||||||
- id: remove-crlf
|
- id: remove-crlf
|
||||||
- id: remove-tabs
|
- id: remove-tabs
|
||||||
exclude: (Makefile)
|
exclude: (Makefile|Caddyfile)
|
||||||
- repo: https://github.com/zricethezav/gitleaks
|
- repo: https://github.com/zricethezav/gitleaks
|
||||||
rev: v8.22.0
|
rev: v8.22.0
|
||||||
hooks:
|
hooks:
|
||||||
|
|
13
nixos/hosts/telperion/config/Caddyfile
Normal file
13
nixos/hosts/telperion/config/Caddyfile
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
telperion.meerkat-dab.ts.net {
|
||||||
|
log {
|
||||||
|
output file /var/log/caddy/telperion.meerkat-dab.ts.net.log
|
||||||
|
}
|
||||||
|
reverse_proxy {
|
||||||
|
transport http {
|
||||||
|
tls_insecure_skip_verify
|
||||||
|
}
|
||||||
|
lb_policy client_ip_hash
|
||||||
|
to https://10.1.1.66:8006
|
||||||
|
to https://10.1.1.67:8006
|
||||||
|
}
|
||||||
|
}
|
|
@ -5,6 +5,7 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
modulesPath,
|
modulesPath,
|
||||||
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
@ -75,11 +76,26 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
networking.firewall.allowedTCPPorts = [
|
||||||
|
80
|
||||||
|
443
|
||||||
|
2019
|
||||||
|
];
|
||||||
|
services = {
|
||||||
|
# Caddy
|
||||||
|
caddy = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.unstable.caddy;
|
||||||
|
extraConfig = builtins.readFile ./config/Caddyfile;
|
||||||
|
logFormat = lib.mkForce "level INFO";
|
||||||
|
};
|
||||||
|
|
||||||
# Tailscale
|
# Tailscale
|
||||||
services.tailscale = {
|
tailscale = {
|
||||||
enable = true;
|
enable = true;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
|
permitCertUid = builtins.toString config.users.users.caddy.uid;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# System settings and services.
|
# System settings and services.
|
||||||
|
|
|
@ -32,12 +32,13 @@ with lib;
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
curl
|
curl
|
||||||
wget
|
|
||||||
dnsutils
|
dnsutils
|
||||||
jq
|
jq
|
||||||
yq-go
|
|
||||||
nvme-cli
|
nvme-cli
|
||||||
smartmontools
|
smartmontools
|
||||||
|
unstable.caddy
|
||||||
|
wget
|
||||||
|
yq-go
|
||||||
];
|
];
|
||||||
|
|
||||||
networking.domain = config.mySystem.domain;
|
networking.domain = config.mySystem.domain;
|
||||||
|
|
Loading…
Reference in a new issue