feat(services): add dedicated PostgreSQL module
Introduce a dedicated PostgreSQL configuration module to the system. Adjust Nextcloud and Forgejo configurations to utilize this new module.
This commit is contained in:
parent
6d2951155c
commit
af5c62eb4b
|
@ -1,19 +1,20 @@
|
|||
{ pkgs, lib, ... }:
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./rspamd.nix
|
||||
# ./goaccess.nix
|
||||
./nextcloud.nix
|
||||
./acme.nix
|
||||
./backup.nix
|
||||
./users.nix
|
||||
./coturn.nix
|
||||
./forgejo.nix
|
||||
./hardware-configuration.nix
|
||||
./kicker.nix
|
||||
./mailserver.nix
|
||||
./acme.nix
|
||||
./forgejo.nix
|
||||
./nginx.nix
|
||||
./network.nix
|
||||
./coturn.nix
|
||||
./nextcloud.nix
|
||||
./nginx.nix
|
||||
./postgresql.nix
|
||||
./rspamd.nix
|
||||
./users.nix
|
||||
];
|
||||
|
||||
metacfg = {
|
||||
|
|
|
@ -34,24 +34,6 @@
|
|||
|
||||
users.groups.gitea = { };
|
||||
|
||||
services.postgresql = {
|
||||
package = pkgs.postgresql_14;
|
||||
ensureDatabases = [
|
||||
config.services.forgejo.database.name
|
||||
"nextcloud"
|
||||
];
|
||||
ensureUsers = [
|
||||
{
|
||||
name = config.services.forgejo.database.user;
|
||||
ensureDBOwnership = true;
|
||||
}
|
||||
{
|
||||
name = "nextcloud";
|
||||
ensureDBOwnership = true;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
sops.secrets."forgejo-runner-token" = {
|
||||
sopsFile = ../../../.secrets/hetzner/forgejo-runner-token.yaml; # bring your own password file
|
||||
};
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
environment.systemPackages = with pkgs; [ ffmpeg ];
|
||||
|
||||
environment.etc."nextcloud-admin-pass".text = "test123";
|
||||
|
||||
services.nextcloud = {
|
||||
enable = true;
|
||||
package = pkgs.nextcloud30;
|
||||
|
@ -44,4 +45,16 @@
|
|||
"OC\\Preview\\XBitmap"
|
||||
];
|
||||
};
|
||||
|
||||
services.postgresql = {
|
||||
ensureDatabases = [
|
||||
"nextcloud"
|
||||
];
|
||||
ensureUsers = [
|
||||
{
|
||||
name = "nextcloud";
|
||||
ensureDBOwnership = true;
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
6
systems/x86_64-linux/mx/postgresql.nix
Normal file
6
systems/x86_64-linux/mx/postgresql.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
{
|
||||
services.postgresql = {
|
||||
package = pkgs.postgresql_14;
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue