Let's configure the db for gotosocial?
This commit is contained in:
parent
c2d0ff412e
commit
7fa997ec94
|
@ -16,6 +16,7 @@
|
||||||
# You can also split up your configuration and import pieces of it here:
|
# You can also split up your configuration and import pieces of it here:
|
||||||
# ./nvim.nix
|
# ./nvim.nix
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
./postgres.nix
|
||||||
./nextcloud.nix
|
./nextcloud.nix
|
||||||
./mail-server.nix
|
./mail-server.nix
|
||||||
./gotosocial.nix
|
./gotosocial.nix
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
|
|
||||||
services.gotosocial = {
|
services.gotosocial = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
package = pkgs.gotosocial;
|
||||||
setupPostgresqlDB = true;
|
setupPostgresqlDB = true;
|
||||||
settings = {
|
settings = {
|
||||||
application-name = "gotosocial";
|
application-name = "gotosocial";
|
||||||
|
@ -41,4 +42,9 @@
|
||||||
smtp-from = "no-reply@social.gladtherescake.eu";
|
smtp-from = "no-reply@social.gladtherescake.eu";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
systemd.services."gotosocial" = {
|
||||||
|
requires = ["postgresql.service"];
|
||||||
|
after = ["postgresql.service"];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -105,28 +105,6 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Enable PostgreSQL
|
|
||||||
services.postgresql = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
# Ensure the database, user, and permissions always exist
|
|
||||||
ensureDatabases = ["nextcloud" "onlyoffice" "akkoma"];
|
|
||||||
ensureUsers = [
|
|
||||||
{
|
|
||||||
name = "nextcloud";
|
|
||||||
ensurePermissions."DATABASE nextcloud" = "ALL PRIVILEGES";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "onlyoffice";
|
|
||||||
ensurePermissions."DATABASE onlyoffice" = "ALL PRIVILEGES";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "akkoma";
|
|
||||||
ensurePermissions."DATABASE akkoma" = "ALL PRIVILEGES";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
services.aria2 = {
|
services.aria2 = {
|
||||||
enable = true;
|
enable = true;
|
||||||
rpcListenPort = 6969;
|
rpcListenPort = 6969;
|
||||||
|
|
30
nixos/queen/postgres.nix
Normal file
30
nixos/queen/postgres.nix
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
services.postgresql = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
# Ensure the database, user, and permissions always exist
|
||||||
|
ensureDatabases = ["nextcloud" "onlyoffice" "akkoma"];
|
||||||
|
ensureUsers = [
|
||||||
|
{
|
||||||
|
name = "nextcloud";
|
||||||
|
ensurePermissions."DATABASE nextcloud" = "ALL PRIVILEGES";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "onlyoffice";
|
||||||
|
ensurePermissions."DATABASE onlyoffice" = "ALL PRIVILEGES";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "akkoma";
|
||||||
|
ensurePermissions."DATABASE akkoma" = "ALL PRIVILEGES";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "gotosocial";
|
||||||
|
ensurePermissions."DATABASE gotosocial" = "ALL PRIVILEGES";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue