mirror of
https://github.com/donovanglover/nix-config.git
synced 2025-07-07 09:50:22 +02:00
This is just a proof of concept that I plan to integrate into NixOS containers running specific users. The ensureDBOwnership part would no longer be needed since each database would receive its own container and consequently user.
26 lines
327 B
Nix
26 lines
327 B
Nix
{ pkgs, ... }:
|
|
|
|
{
|
|
services.postgresql = {
|
|
enable = true;
|
|
|
|
ensureUsers = [
|
|
{
|
|
name = "user";
|
|
}
|
|
{
|
|
name = "cooldbname";
|
|
ensureDBOwnership = true;
|
|
}
|
|
];
|
|
|
|
ensureDatabases = [
|
|
"cooldbname"
|
|
];
|
|
};
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
pgcli
|
|
];
|
|
}
|