mirror of
https://github.com/nmasur/dotfiles
synced 2025-07-06 19:00:14 +00:00
initial refactoring
This commit is contained in:
@ -0,0 +1,38 @@
|
||||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.nmasur.presets.services.thelounge;
|
||||
in
|
||||
{
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
services.thelounge = {
|
||||
public = false;
|
||||
port = 9000;
|
||||
extraConfig = {
|
||||
reverseProxy = true;
|
||||
maxHistory = 10000;
|
||||
};
|
||||
};
|
||||
|
||||
# Adding new users:
|
||||
# nix shell nixpkgs#thelounge
|
||||
# sudo su - thelounge -s /bin/sh -c "thelounge add myuser"
|
||||
|
||||
# Allow web traffic to Caddy
|
||||
caddy.routes = [
|
||||
{
|
||||
match = [ { host = [ config.hostnames.irc ]; } ];
|
||||
handle = [
|
||||
{
|
||||
handler = "reverse_proxy";
|
||||
upstreams = [ { dial = "localhost:${builtins.toString config.services.thelounge.port}"; } ];
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
|
||||
# Configure Cloudflare DNS to point to this machine
|
||||
services.cloudflare-dyndns.domains = [ config.hostnames.irc ];
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user