This commit is contained in:
parent
ebc446116c
commit
7f52ad42cd
14 changed files with 290 additions and 2 deletions
30
modules/grafana/default.nix
Normal file
30
modules/grafana/default.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{config, ...}: let
|
||||
cfg = config.services.grafana;
|
||||
in {
|
||||
services.grafana = {
|
||||
enable = true;
|
||||
settings = {
|
||||
server = {
|
||||
domain = "status.aciceri.dev";
|
||||
http_addr = "127.0.0.1";
|
||||
http_port = 2342;
|
||||
root_url = "https://${config.services.grafana.settings.server.domain}:443/";
|
||||
};
|
||||
security = {
|
||||
admin_user = "andrea";
|
||||
admin_password = "$__file{${config.age.secrets.grafana-password.path}}";
|
||||
};
|
||||
};
|
||||
};
|
||||
environment.persistence."/persist".directories = [
|
||||
cfg.dataDir
|
||||
];
|
||||
|
||||
services.nginx.virtualHosts = {
|
||||
"status.aciceri.dev" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/".proxyPass = "http://127.0.0.1:${builtins.toString cfg.settings.server.http_port}";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue