diff --git a/m/hut/configuration.nix b/m/hut/configuration.nix index c7ec747..aa438c0 100644 --- a/m/hut/configuration.nix +++ b/m/hut/configuration.nix @@ -15,6 +15,7 @@ ./public-inbox.nix ./gitea.nix ./msmtp.nix + ./postgresql.nix #./pxe.nix ]; diff --git a/m/hut/postgresql.nix b/m/hut/postgresql.nix new file mode 100644 index 0000000..fc86d7a --- /dev/null +++ b/m/hut/postgresql.nix @@ -0,0 +1,19 @@ +{ lib, ... }: + +{ + services.postgresql = { + enable = true; + ensureDatabases = [ "perftestsdb" ]; + ensureUsers = [ + { name = "anavarro"; ensureClauses.superuser = true; } + { name = "rarias"; ensureClauses.superuser = true; } + { name = "grafana"; } + ]; + authentication = '' + #type database DBuser auth-method + local perftestsdb rarias trust + local perftestsdb anavarro trust + local perftestsdb grafana trust + ''; + }; +}