nix-config/hosts/buzzrelay/default.nix

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

49 lines
1.1 KiB
Nix
Raw Normal View History

2023-01-06 23:56:02 +01:00
{ config, pkgs, ... }:
2022-12-19 20:57:43 +01:00
{
2023-01-06 23:24:02 +01:00
c3d2 = {
deployment.server = "server10";
hq.statistics.enable = true;
};
microvm = {
2023-01-06 23:24:02 +01:00
mem = 1024;
2022-12-19 20:57:43 +01:00
vcpu = 8;
};
2023-01-06 23:24:02 +01:00
networking.hostName = "buzzrelay";
2022-12-19 20:57:43 +01:00
2023-01-06 23:24:02 +01:00
sops = {
defaultSopsFile = ./secrets.yaml;
secrets = {
"buzzrelay/privKey".owner = config.services.buzzrelay.user;
"buzzrelay/pubKey".owner = config.services.buzzrelay.user;
};
};
2023-01-06 23:24:02 +01:00
services = {
buzzrelay = {
enable = true;
hostName = "relay.fedi.buzz";
privKeyFile = config.sops.secrets."buzzrelay/privKey".path;
pubKeyFile = config.sops.secrets."buzzrelay/pubKey".path;
};
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
};
2023-01-06 23:24:02 +01:00
2023-01-06 23:56:02 +01:00
postgresql = {
package = pkgs.postgresql_15;
settings.log_min_duration_statement = 50;
upgrade.stopServices = [ "buzzrelay" ];
};
2022-12-19 22:28:04 +01:00
};
2023-01-06 23:24:02 +01:00
system.stateVersion = "22.11";
2022-12-19 20:57:43 +01:00
}