From 22cc1d33f73627df90a4f563fdba66d5c161b9a6 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Thu, 30 May 2024 13:35:58 +0200 Subject: [PATCH] Add PostgreSQL DB for performance test results The database will hold the performance results of the execution of the benchmarks. We follow the same setup on knights3 for now. Reviewed-by: Aleix Roca Nonell --- m/hut/configuration.nix | 1 + m/hut/postgresql.nix | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 m/hut/postgresql.nix 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 + ''; + }; +}