hosts/plover: add and configure Wezterm mux server

Not yet fully configured though so we'll have to update the Wezterm
server configuration.
This commit is contained in:
Gabriel Arazas 2023-07-20 10:40:45 +08:00
parent 44ccbea7e1
commit b1072a437b
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC
3 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,7 @@
return {
tls_servers = {
pem_private_key = "@CERT_DIR@/key.pem",
pem_cert = "@CERT_DIR@/cert.pem",
pem_ca = "@CERT_DIR@/fullchain.pem",
}
}

View File

@ -40,6 +40,7 @@ in
./modules/services/portunus.nix
./modules/services/vaultwarden.nix
./modules/services/wireguard.nix
./modules/services/wezterm-mux-server.nix
];
# Automatic format and partitioning.

View File

@ -0,0 +1,23 @@
{ config, lib, pkgs, ... }:
# We're setting up Wezterm mux server with TLS domains.
let
weztermDomain = "mux.${config.networking.domain}";
configFile = pkgs.substituteAll {
src = ../../config/wezterm/config.lua;
CERT_DIR = config.security.acme.certs."${weztermDomain}".directory;
};
in
{
services.wezterm-mux-server = {
inherit configFile;
enable = true;
};
security.acme.certs."${weztermDomain}" = {
group = "wezterm";
postRun = ''
systemctl restart wezterm-mux-server.service
'';
};
}