feat: add packer env wars for work

This commit is contained in:
Swarsel 2024-10-18 21:34:09 +02:00
parent 82e6ec9d64
commit 8c58ff78fe
Signed by: swarsel
GPG key ID: 26A54C31F2A4FD84
5 changed files with 77 additions and 0 deletions

View file

@ -0,0 +1,43 @@
{ pkgs, lib, config, ... }:
{
config = lib.mkIf config.swarselsystems.server.monitoring {
sops.secrets = {
grafanaadminpass = {
owner = "grafana";
}
}
users.users.grafana = {
extraGroups = [ "users" ];
};
services.grafana = {
enable = true;
dataDir = "/Vault/data/grafana";
admin_password = "$__file{/run/secrets/grafanaadminpass}";
settings = {
http_port = 3000;
http_addr = "127.0.0.1";
};
};
services.nginx = {
virtualHosts = {
"status.swarsel.win" = {
enableACME = true;
forceSSL = true;
acmeRoot = null;
locations = {
"/" = {
proxyPass = "http://localhost:3000/";
extraConfig = ''
client_max_body_size 0;
'';
};
};
};
};
};
};
}