mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 20:39:18 -08:00
hosts/athame: PostgreSQL moved to service definitions
This commit is contained in:
parent
4058860ec6
commit
fbef9f2cd8
3 changed files with 14 additions and 22 deletions
|
|
@ -1,15 +1,17 @@
|
|||
{ config, lib, pkgs, profiles, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
imports = [
|
||||
./hw.nix
|
||||
# profiles
|
||||
profiles.kat
|
||||
# host-specific services
|
||||
./postgres.nix
|
||||
./virtualhosts.nix
|
||||
./fail2ban.nix
|
||||
# services
|
||||
# services
|
||||
../../../services/fail2ban.nix
|
||||
../../../services/postgres.nix
|
||||
../../../services/nginx.nix
|
||||
../../../services/mail.nix
|
||||
../../../services/asterisk.nix
|
||||
|
|
|
|||
|
|
@ -1,17 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.postgresql.enable = true;
|
||||
services.postgresql.initialScript = pkgs.writeText "synapse-init.sql" ''
|
||||
CREATE ROLE "matrix-synapse" WITH LOGIN PASSWORD 'synapse';
|
||||
CREATE DATABASE "matrix-synapse" WITH OWNER "matrix-synapse"
|
||||
TEMPLATE template0
|
||||
LC_COLLATE = "C"
|
||||
LC_CTYPE = "C";
|
||||
'';
|
||||
services.postgresql.ensureDatabases = [ "nextcloud" ];
|
||||
services.postgresql.ensureUsers = [{
|
||||
name = "nextcloud";
|
||||
ensurePermissions."DATABASE nextcloud" = "ALL PRIVILEGES";
|
||||
}];
|
||||
}
|
||||
|
|
@ -1,8 +1,15 @@
|
|||
{ config, pkgs, witch, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages =
|
||||
[ pkgs.arc.pkgs.mx-puppet-discord pkgs.mautrix-whatsapp ];
|
||||
environment.systemPackages = [ pkgs.mx-puppet-discord pkgs.mautrix-whatsapp ];
|
||||
|
||||
services.postgresql.initialScript = pkgs.writeText "synapse-init.sql" ''
|
||||
CREATE ROLE "matrix-synapse" WITH LOGIN PASSWORD 'synapse';
|
||||
CREATE DATABASE "matrix-synapse" WITH OWNER "matrix-synapse"
|
||||
TEMPLATE template0
|
||||
LC_COLLATE = "C"
|
||||
LC_CTYPE = "C";
|
||||
'';
|
||||
|
||||
services.matrix-synapse = {
|
||||
enable = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue