From d2d37440b5742bf0b4878ba6de2de1ed4abfc18a Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Mon, 30 Dec 2024 08:27:28 +0100 Subject: refactor: move postgresql config under shared/ --- nixos/hosts/tente/default.nix | 9 +-------- nixos/shared/postgresql.nix | 13 +++++++++++++ 2 files changed, 14 insertions(+), 8 deletions(-) create mode 100644 nixos/shared/postgresql.nix diff --git a/nixos/hosts/tente/default.nix b/nixos/hosts/tente/default.nix index 110507c..30683e0 100644 --- a/nixos/hosts/tente/default.nix +++ b/nixos/hosts/tente/default.nix @@ -13,6 +13,7 @@ in imports = [ ./hardware-configuration.nix + ./web-personal.nix ./git.nix ./headscale.nix @@ -100,14 +101,6 @@ in enable = true; group = "www-data"; }; - - postgresql = { - enable = true; - authentication = pkgs.lib.mkOverride 10 '' - #type database DBuser auth-method - local sameuser all peer - ''; - }; }; security.acme = { diff --git a/nixos/shared/postgresql.nix b/nixos/shared/postgresql.nix new file mode 100644 index 0000000..6d9bb40 --- /dev/null +++ b/nixos/shared/postgresql.nix @@ -0,0 +1,13 @@ +{ config, lib, pkgs, ... }: + +{ + config = { + services.postgresql = { + enable = true; + authentication = pkgs.lib.mkOverride 10 '' + #type database DBuser auth-method + local sameuser all peer + ''; + }; + }; +} -- cgit v1.2.3