From 91b44d92e414394d56110901f32c9eeec07ff1e9 Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Sun, 8 Jan 2023 05:44:13 +0000 Subject: [PATCH] howl: add redis and postgresql, but don't start them by default --- ops/nixos/howl/default.nix | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/ops/nixos/howl/default.nix b/ops/nixos/howl/default.nix index c8beb0a267..4977c46a8f 100644 --- a/ops/nixos/howl/default.nix +++ b/ops/nixos/howl/default.nix @@ -184,6 +184,24 @@ in { my.scrapeJournal.enable = false; # Laptop, don't pull too much. + services.redis.servers."".enable = true; + systemd.services.redis.wantedBy = lib.mkForce []; + services.postgresql.enable = true; + systemd.services.postgresql.wantedBy = lib.mkForce []; + services.postgresql.ensureDatabases = [ "lukegb" ]; + services.postgresql.ensureUsers = [{ + name = "lukegb"; + ensurePermissions = { + "ALL TABLES IN SCHEMA public" = "ALL PRIVILEGES"; + "DATABASE lukegb" = "ALL PRIVILEGES"; + }; + }]; + services.postgresql.authentication = '' + local all all trust + host all all 127.0.0.1/32 trust + host all all ::1/128 trust + ''; + # This value determines the NixOS release with which your system is to be # compatible, in order to avoid breaking some software such as database # servers. You should change this only after NixOS release notes say you