diff options
-rw-r--r-- | nixos/hosts/tente/default.nix | 9 | ||||
-rw-r--r-- | nixos/shared/postgresql.nix | 13 |
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 + ''; + }; + }; +} |