colin
d13bcc49ab
longer-term, i want hosts/by-name to define host-specific data that's accessible via the other hosts (things like pubkeys). also the secrets management needs some rethinking. there's really not much point in me specifiying where *exactly* a secret comes from at its use site. i should really be specifying secret store manifests; i.e. "servo.yaml contains secrets X Y and Z", and leaving the rest up to auto-computing.
22 lines
646 B
Nix
22 lines
646 B
Nix
{ config, ... }:
|
|
|
|
{
|
|
services.nginx.virtualHosts."nixcache.uninsane.org" = {
|
|
addSSL = true;
|
|
enableACME = true;
|
|
# inherit kTLS;
|
|
# serverAliases = [ "nixcache" ];
|
|
locations."/".extraConfig = ''
|
|
proxy_pass http://localhost:${toString config.services.nix-serve.port};
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
'';
|
|
};
|
|
|
|
sane.services.trust-dns.zones."uninsane.org".inet.CNAME."nixcache" = "native";
|
|
|
|
sane.services.nixserve.enable = true;
|
|
sane.services.nixserve.sopsFile = ../../../../secrets/servo.yaml;
|
|
}
|