diff --git a/hosts/server/default.nix b/hosts/server/default.nix index 93c9bae..925df7a 100644 --- a/hosts/server/default.nix +++ b/hosts/server/default.nix @@ -23,6 +23,7 @@ imports = # For now, if applying to other system, swap files [(import ./hardware-configuration.nix)] ++ # Current system hardware config @ /etc/nixos/hardware-configuration.nix [(import ../../modules/desktop/virtualisation/docker.nix)] ++ # Docker + (import ../../modules/services/server) ++ # Server Services (import ../../modules/hardware); # Hardware devices boot = { # Boot options diff --git a/modules/services/server/default.nix b/modules/services/server/default.nix index ddc021c..029b71b 100644 --- a/modules/services/server/default.nix +++ b/modules/services/server/default.nix @@ -11,7 +11,7 @@ # [ - #./postgresql.nix + ./postgresql.nix #./gitea.nix #./nextcloud.nix #./matrix.nix diff --git a/modules/services/server/jitsi.nix b/modules/services/server/jitsi.nix index ad85b31..af4104e 100644 --- a/modules/services/server/jitsi.nix +++ b/modules/services/server/jitsi.nix @@ -3,7 +3,7 @@ { services.jitsi-meet = { enable = true; - hostName = "jitsi.kabtop.de"; + hostName = "meet.kabtop.de"; config = { enableWelcomePage = false; prejoinPageEnabled = true; @@ -16,6 +16,6 @@ }; services.jitsi-videobridge.openFirewall = true; - security.acme.email = "webmaster@kabtop.de"; + security.acme.defaults.email = "webmaster@kabtop.de"; security.acme.acceptTerms = true; } diff --git a/modules/services/server/postgresql.nix b/modules/services/server/postgresql.nix index 1428f6a..1fe5e77 100644 --- a/modules/services/server/postgresql.nix +++ b/modules/services/server/postgresql.nix @@ -10,16 +10,15 @@ package = pkgs.postgresql_14; settings = { max_connections = 200; - listen_addresses = 'localhost'; - password_encryption = scram-sha-256; - shared_buffers = 512MB; - work_mem = 8MB; + listen_addresses = "localhost"; + password_encryption = "scram-sha-256"; + shared_buffers = "512MB"; + work_mem = "8MB"; autovacuum_work_mem = -1; - min_wal_size = 1GB; - max_wal_size = 4GB; - log_timezone = 'Europe/Berlin'; - timezone = 'Europe/Berlin'; - datestyle = 'iso, dmy'; + min_wal_size = "1GB"; + max_wal_size = "4GB"; + log_timezone = "Europe/Berlin"; + timezone = "Europe/Berlin"; }; authentication = pkgs.lib.mkOverride 14 '' local all postgres peer @@ -33,7 +32,7 @@ #host xmppdb ejabberd samehost scram-sha-256 #host prosodydb prosody samehost scram-sha-256 host keycloakdb keycloak samehost scram-sha-256 - '' + ''; ensureDatabases = [ "giteadb" "nextclouddb" @@ -49,46 +48,46 @@ ensurePermissions = { "DATABASE giteadb" = "ALL PRIVILEGES"; }; - }; + } { name = "nextcloud"; ensurePermissions = { "DATABASE nextclouddb" = "ALL PRIVILEGES"; }; - }; + } { name = "synapse"; ensurePermissions = { "DATABASE synapsedb" = "ALL PRIVILEGES"; }; - }; + } { name = "mautrixwa"; ensurePermissions = { "DATABASE whatsappdb" = "ALL PRIVILEGES"; }; - }; + } { name = "mautrixtele"; ensurePermissions = { "DATABASE telegramdb" = "ALL PRIVILEGES"; }; - }; + } { name = "mautrixsignal"; ensurePermissions = { "DATABASE signaldb" = "ALL PRIVILEGES"; }; - }; + } { name = "keycloak"; ensurePermissions = { "DATABASE keycloakdb" = "ALL PRIVILEGES"; }; - }; + } ]; }; - services.postgreqlBackup.enable = true; + services.postgresqlBackup.enable = true; }