nix-config/hosts/buzzrelay/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

35 lines
935 B
Nix
Raw Normal View History

{ config, ... }:
2022-12-19 20:57:43 +01:00
{
deployment = {
mem = 2 * 1024;
vcpu = 8;
needForSpeed = true;
};
system.stateVersion = "22.11";
networking = {
hostName = "buzzrelay";
firewall.allowedTCPPorts = [ 80 443 ];
};
sops.defaultSopsFile = ./secrets.yaml;
sops.secrets = {
"buzzrelay/privKey".owner = config.services.buzzrelay.user;
"buzzrelay/pubKey".owner = config.services.buzzrelay.user;
};
services.buzzrelay = {
enable = true;
hostName = "relay.fedi.buzz";
privKeyFile = config.sops.secrets."buzzrelay/privKey".path;
pubKeyFile = config.sops.secrets."buzzrelay/pubKey".path;
};
services.postgresql.settings.log_min_duration_statement = 50;
2022-12-19 22:28:04 +01:00
services.nginx = {
enable = true;
virtualHosts."relay.fedi.buzz" = {
forceSSL = true;
enableACME = true;
locations."/".proxyPass = "http://127.0.0.1:${toString config.services.buzzrelay.listenPort}/";
2022-12-19 22:28:04 +01:00
};
};
2022-12-19 20:57:43 +01:00
}