Compare commits
No commits in common. "fd50d5d088bd1d5953c5dc1c0891c8706ece9aba" and "0645add505ef20fda1956c3a21229567c00aa72f" have entirely different histories.
fd50d5d088
...
0645add505
3 changed files with 2 additions and 38 deletions
|
|
@ -1,15 +0,0 @@
|
||||||
{ config, ... }: {
|
|
||||||
services.caddy = {
|
|
||||||
enable = true;
|
|
||||||
logFormat = "level INFO";
|
|
||||||
};
|
|
||||||
|
|
||||||
services.crowdsec = {
|
|
||||||
localConfig.acquisitions = [{
|
|
||||||
filenames = [ "${config.services.caddy.logDir}/*.log" ];
|
|
||||||
labels.type = "caddy";
|
|
||||||
}];
|
|
||||||
|
|
||||||
hub.parsers = [ "crowdsecurity/caddy-logs" ];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -36,28 +36,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
services.caddy.virtualHosts."vault.millironx.com".extraConfig = ''
|
services.caddy.virtualHosts."vault.millironx.com".extraConfig = ''
|
||||||
# See <https://github.com/dani-garcia/vaultwarden/wiki/Proxy-examples>
|
reverse_proxy http://127.0.0.1:${port}
|
||||||
encode zstd gzip
|
|
||||||
header / {
|
|
||||||
Strict-Transport-Security "max-age=31536000;"
|
|
||||||
X-XSS-Protection "0"
|
|
||||||
X-Frame-Options "DENY"
|
|
||||||
X-Robots-Tag "noindex, nofollow"
|
|
||||||
X-Content-Type-Options "nosniff"
|
|
||||||
-Server
|
|
||||||
-X-Powered-By
|
|
||||||
-Last-Modified
|
|
||||||
}
|
|
||||||
|
|
||||||
@admin {
|
|
||||||
path /admin*
|
|
||||||
not remote_ip private_ranges 100.64.0.0/10
|
|
||||||
}
|
|
||||||
respond @admin "Access denied to remote clients. Use localhost or VPN." 403
|
|
||||||
|
|
||||||
reverse_proxy http://127.0.0.1:${port} {
|
|
||||||
header_up X-Real-IP {remote_host}
|
|
||||||
}
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
users.users."${user}" = {
|
users.users."${user}" = {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
./hardware-configuration/mcentire.nix
|
./hardware-configuration/mcentire.nix
|
||||||
./../../modules/podman-secrets.nix
|
./../../modules/podman-secrets.nix
|
||||||
./../../services/borgmatic.nix
|
./../../services/borgmatic.nix
|
||||||
./../../services/caddy.nix
|
|
||||||
./../../services/crowdsec.nix
|
./../../services/crowdsec.nix
|
||||||
./../../services/authentik.nix
|
./../../services/authentik.nix
|
||||||
./../../services/audiobookshelf.nix
|
./../../services/audiobookshelf.nix
|
||||||
|
|
@ -68,6 +67,7 @@
|
||||||
services = {
|
services = {
|
||||||
openssh.enable = true;
|
openssh.enable = true;
|
||||||
tailscale.enable = true;
|
tailscale.enable = true;
|
||||||
|
caddy.enable = true;
|
||||||
|
|
||||||
# Do not "enable" database services, but include the package configuration
|
# Do not "enable" database services, but include the package configuration
|
||||||
# so that borgmatic does not freak out about unset variables
|
# so that borgmatic does not freak out about unset variables
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue