From 7cbab15cc94d46c417b5c513ae579057b784351c Mon Sep 17 00:00:00 2001 From: Martin Berg Alstad Date: Tue, 14 Oct 2025 18:09:43 +0000 Subject: [PATCH] [nidaros] Add Postgres config --- hosts/nidaros/default.nix | 8 ++------ hosts/nidaros/postgres.nix | 13 +++++++++++++ 2 files changed, 15 insertions(+), 6 deletions(-) create mode 100644 hosts/nidaros/postgres.nix diff --git a/hosts/nidaros/default.nix b/hosts/nidaros/default.nix index 053df10..cd48322 100644 --- a/hosts/nidaros/default.nix +++ b/hosts/nidaros/default.nix @@ -1,15 +1,11 @@ -{ lib, systemConfig, ... }: +{ lib, ... }: { imports = with lib.custom; [ (relativeToBase "modules") ./boot.nix ./hardware.nix + ./postgres.nix ./security ]; - - # Temp fix to not override password until sops have been implemented - users.mutableUsers = lib.mkForce true; - users.users.${systemConfig.username}.hashedPasswordFile = lib.mkForce null; - } diff --git a/hosts/nidaros/postgres.nix b/hosts/nidaros/postgres.nix new file mode 100644 index 0000000..6daec82 --- /dev/null +++ b/hosts/nidaros/postgres.nix @@ -0,0 +1,13 @@ +{ pkgs, ... }: + +{ + services.postgresql = { + enable = true; + authentication = pkgs.lib.mkOverride 10 '' + #type database DBuser url auth-method + local all all trust + # ipv4 + host all all 127.0.0.1/32 trust + ''; + }; +}