Created
April 23, 2024 20:58
-
-
Save colonelpanic8/64edc80fa7c100d506f37960644305d8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services.postgresql = { | |
enable = true; | |
package = pkgs.postgresql_15; | |
ensureDatabases = [ "railbird" "public" ]; | |
authentication = pkgs.lib.mkOverride 10 '' | |
#type database DBuser CIDR-ADDRESS auth-method | |
local all all trust | |
host all all 0.0.0.0/0 trust | |
host all all ::1/128 trust | |
''; | |
ensureUsers = map (username: { | |
name = username; | |
ensureClauses = { | |
superuser = true; | |
createrole = true; | |
createdb = true; | |
}; | |
}) ["nixos"]; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment