mirror of
https://github.com/Gerg-L/nixos.git
synced 2025-12-10 00:43:56 -05:00
moved all services out of nixos containers
fixed a lot as well
This commit is contained in:
parent
4fd4b0ad74
commit
66ee1bb541
10 changed files with 247 additions and 266 deletions
24
hosts/gerg-desktop/services/postgresql.nix
Normal file
24
hosts/gerg-desktop/services/postgresql.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
_: {
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
services.postgresql = {
|
||||
enable = true;
|
||||
package = pkgs.postgresql_13;
|
||||
dataDir = "/persist/services/postgresql";
|
||||
ensureDatabases = [config.services.nextcloud.config.dbname];
|
||||
ensureUsers = [
|
||||
{
|
||||
name = config.services.nextcloud.config.dbuser;
|
||||
ensurePermissions."DATABASE ${config.services.nextcloud.config.dbname}" = "ALL PRIVILEGES";
|
||||
}
|
||||
{
|
||||
name = config.services.gitea.database.user;
|
||||
|
||||
ensurePermissions."DATABASE ${config.services.gitea.database.name}" = "ALL PRIVILEGES";
|
||||
}
|
||||
];
|
||||
};
|
||||
_file = ./postgresql.nix;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue