update: system update & refactor
# Breaking Changes - sops location movod to "system/dev/<dev-name>/sops/sops-conf.nix" - flake devices declaration changes - whole flake update
This commit is contained in:
parent
321f740af0
commit
6a71b601f5
116 changed files with 2576 additions and 3634 deletions
|
|
@ -4,12 +4,23 @@
|
|||
smtpDomain,
|
||||
domain,
|
||||
extraSettings ? { },
|
||||
extraConf ? { },
|
||||
}:
|
||||
{ config, ... }:
|
||||
let
|
||||
email = "grafana@${smtpDomain}";
|
||||
in
|
||||
{
|
||||
services.postgresql = {
|
||||
ensureDatabases = [ "grafana" ];
|
||||
ensureUsers = [
|
||||
{
|
||||
name = "grafana";
|
||||
ensureDBOwnership = true;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
services.grafana = {
|
||||
enable = true;
|
||||
settings = (
|
||||
|
|
@ -31,11 +42,20 @@ in
|
|||
security = {
|
||||
admin_email = email;
|
||||
admin_password = "$__file{${passFile}}";
|
||||
secret_key = "$__file{${passFile}}";
|
||||
};
|
||||
database = {
|
||||
type = "postgres";
|
||||
user = "grafana";
|
||||
name = "grafana";
|
||||
host = "/var/run/postgresql";
|
||||
};
|
||||
}
|
||||
// extraSettings
|
||||
);
|
||||
};
|
||||
|
||||
}
|
||||
// extraConf;
|
||||
|
||||
services.nginx.virtualHosts."${domain}" = {
|
||||
enableACME = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue