mirror of
https://github.com/srid/nixos-config.git
synced 2025-12-26 15:04:59 +08:00
cleanup
This commit is contained in:
parent
eff3333e3d
commit
d425868d12
7 changed files with 73 additions and 41 deletions
30
webapps/proxy.nix
Normal file
30
webapps/proxy.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
# Configuration for the VPS running nginx reverse proxy
|
||||
{ flake, pkgs, lib, webapps, ... }:
|
||||
|
||||
let
|
||||
host = "pureintent"; # See host.nix
|
||||
webapps = import ./. { inherit flake; system = pkgs.system; };
|
||||
in
|
||||
{
|
||||
services.tailscale.enable = true;
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
recommendedProxySettings = true;
|
||||
recommendedTlsSettings = true;
|
||||
|
||||
virtualHosts = lib.mapAttrs'
|
||||
(name: v: lib.nameValuePair v.domain {
|
||||
locations."/".proxyPass = "http://${host}:${builtins.toString v.port}";
|
||||
enableACME = true;
|
||||
addSSL = true;
|
||||
})
|
||||
webapps;
|
||||
};
|
||||
|
||||
security.acme = {
|
||||
acceptTerms = true;
|
||||
defaults.email = "srid@srid.ca";
|
||||
};
|
||||
networking.firewall.allowedTCPPorts = [ 80 443 22 ];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue