dotfiles/modules/nixos/services/irc.nix

36 lines
831 B
Nix
Raw Permalink Normal View History

2024-04-20 13:42:06 +00:00
{ config, lib, ... }:
{
2024-02-25 18:50:00 +00:00
config = lib.mkIf config.services.thelounge.enable {
2024-02-25 18:50:00 +00:00
services.thelounge = {
public = false;
port = 9000;
extraConfig = {
reverseProxy = true;
maxHistory = 10000;
};
};
2024-02-25 19:03:58 +00:00
# Adding new users:
# nix shell nixpkgs#thelounge
# sudo su - thelounge -s /bin/sh -c "thelounge add myuser"
2024-02-25 18:50:00 +00:00
# Allow web traffic to Caddy
2024-04-20 13:42:06 +00:00
caddy.routes = [
{
match = [ { host = [ config.hostnames.irc ]; } ];
handle = [
{
handler = "reverse_proxy";
upstreams = [ { dial = "localhost:${builtins.toString config.services.thelounge.port}"; } ];
}
];
}
];
2024-02-25 18:50:00 +00:00
# Configure Cloudflare DNS to point to this machine
services.cloudflare-dyndns.domains = [ config.hostnames.irc ];
2024-02-25 18:50:00 +00:00
};
}