34 lines
637 B
Nix
34 lines
637 B
Nix
|
{ pkgs, config, ... }: {
|
||
|
|
||
|
# TODO fix
|
||
|
services.piped = {
|
||
|
enable = true;
|
||
|
|
||
|
domain = "piped.${config.networking.domain}";
|
||
|
backend = {
|
||
|
port = 5632;
|
||
|
database = {
|
||
|
# TODO fix
|
||
|
#TODO SECRET
|
||
|
host = "127.0.0.1";
|
||
|
username = "piped-backend";
|
||
|
passwordFile = ./piped;
|
||
|
database = "piped-backend";
|
||
|
|
||
|
createLocally = false;
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
services.postgresql = {
|
||
|
enable = true;
|
||
|
enableTCPIP = true;
|
||
|
ensureDatabases = [ "piped-backend" ];
|
||
|
ensureUsers = [
|
||
|
{
|
||
|
name = "piped-backend";
|
||
|
ensureDBOwnership = true;
|
||
|
}
|
||
|
];
|
||
|
};
|
||
|
}
|