diff --git a/hosts/swan/default.nix b/hosts/swan/default.nix index 8b16a30..f058fe9 100644 --- a/hosts/swan/default.nix +++ b/hosts/swan/default.nix @@ -82,6 +82,7 @@ inputs.nixpkgs.lib.nixosSystem { services.vmagent.enable = true; services.samba.enable = true; services.paperless.enable = true; + services.postgresql.enable = true; # Allows private remote access over the internet cloudflareTunnel = { diff --git a/modules/nixos/services/default.nix b/modules/nixos/services/default.nix index 02543c4..fa22ac8 100644 --- a/modules/nixos/services/default.nix +++ b/modules/nixos/services/default.nix @@ -24,6 +24,7 @@ ./netdata.nix ./nextcloud.nix ./paperless.nix + ./postgresql.nix ./prometheus.nix ./samba.nix ./secrets.nix diff --git a/modules/nixos/services/postgresql.nix b/modules/nixos/services/postgresql.nix new file mode 100644 index 0000000..f05fe78 --- /dev/null +++ b/modules/nixos/services/postgresql.nix @@ -0,0 +1,16 @@ +{ config, ... }: { + + services.postgresql = { + settings = { }; + identMap = ""; + ensureUsers = [{ + name = config.user; + ensureClauses = { + createdb = true; + createrole = true; + login = true; + }; + }]; + }; + +}