Skip to content

Commit

Permalink
Setup postgresql in duna
Browse files Browse the repository at this point in the history
  • Loading branch information
dwarfmaster committed Oct 15, 2023
1 parent e4948d3 commit 2f1c2bd
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions hosts/duna.nix
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,13 @@
"/var/lib/systemd/coredump"
# Network manager connections
"/etc/NetworkManager/system-connections"
# Postgresql
{
directory = "/data/postgresql";
user = "postgres";
group = "postgres";
mode = "0700";
}
];
files = [
# Systemd specific
Expand Down Expand Up @@ -125,4 +132,17 @@
};
};
swapDevices = [];

# Enable postgresql for playing as user
services.postgresql = {
enable = true;
dataDir = "/data/postgresql/${config.services.postgresql.package.psqlSchema}";
ensureDatabases = ["korrvigs"];
ensureUsers = [
{
name = "luc";
ensurePermissions."DATABASE korrvigs" = "ALL PRIVILEGES";
}
];
};
}

0 comments on commit 2f1c2bd

Please sign in to comment.