summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2024-12-30 08:27:28 +0100
committerMartin Fischer <martin@push-f.com>2024-12-30 08:28:28 +0100
commitd2d37440b5742bf0b4878ba6de2de1ed4abfc18a (patch)
tree0accad0cd6c40e473b954d3c294a72863294d7b5
parent20558ccfbc5041128834af04e3bf0c44c637ce99 (diff)
refactor: move postgresql config under shared/
-rw-r--r--nixos/hosts/tente/default.nix9
-rw-r--r--nixos/shared/postgresql.nix13
2 files changed, 14 insertions, 8 deletions
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
<top/profiles/server>
+ <top/shared/postgresql.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
+ '';
+ };
+ };
+}