feat(surgat): add soju bouncer
Some checks are pending
Continuous Integration / Checks (push) Waiting to run
Some checks are pending
Continuous Integration / Checks (push) Waiting to run
This commit is contained in:
parent
cef93c482b
commit
a901e37b73
9 changed files with 54 additions and 19 deletions
|
@ -119,7 +119,7 @@ in
|
||||||
'';
|
'';
|
||||||
|
|
||||||
home.file.".jjconfig.toml".source = ./jjconfig.toml;
|
home.file.".jjconfig.toml".source = ./jjconfig.toml;
|
||||||
home.file.".config/halloy/config.toml".source = ./halloy.toml;
|
#home.file.".config/halloy/config.toml".source = ./halloy.toml;
|
||||||
|
|
||||||
systemd.user.timers."backup-keepassxc" = {
|
systemd.user.timers."backup-keepassxc" = {
|
||||||
Unit.Description = "Backup password DB";
|
Unit.Description = "Backup password DB";
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
# Halloy config.
|
|
||||||
#
|
|
||||||
# For a complete list of available options,
|
|
||||||
# please visit https://halloy.squidowl.org/configuration/index.html
|
|
||||||
|
|
||||||
[servers.liberachat]
|
|
||||||
nickname = "dadada"
|
|
||||||
server = "irc.libera.chat"
|
|
||||||
channels = ["#stratum0"]
|
|
||||||
sasl.external.cert = "/home/dadada/.config/halloy/libera.pem"
|
|
|
@ -13,7 +13,7 @@ in
|
||||||
};
|
};
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
services.nginx.virtualHosts."element.${config.networking.domain}" = {
|
services.nginx.virtualHosts."element.${config.networking.domain}" = {
|
||||||
enableACME = true;
|
useACMEHost = "dadada.li";
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
serverAliases = [
|
serverAliases = [
|
||||||
"element.${config.networking.domain}"
|
"element.${config.networking.domain}"
|
||||||
|
|
|
@ -82,7 +82,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
services.nginx.virtualHosts."git.${config.networking.domain}" = {
|
services.nginx.virtualHosts."git.${config.networking.domain}" = {
|
||||||
enableACME = true;
|
useACMEHost = "dadada.li";
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
|
|
||||||
locations."/".extraConfig = ''
|
locations."/".extraConfig = ''
|
||||||
|
|
|
@ -19,7 +19,7 @@ with lib;
|
||||||
services.nginx.enable = true;
|
services.nginx.enable = true;
|
||||||
|
|
||||||
services.nginx.virtualHosts."dadada.li" = {
|
services.nginx.virtualHosts."dadada.li" = {
|
||||||
enableACME = true;
|
useACMEHost = "dadada.li";
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
root = "${cfg.package}";
|
root = "${cfg.package}";
|
||||||
};
|
};
|
||||||
|
|
|
@ -21,7 +21,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
services.nginx.virtualHosts.${domain} = {
|
services.nginx.virtualHosts.${domain} = {
|
||||||
enableACME = true;
|
useACMEHost = "dadada.li";
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
|
|
||||||
locations."/".extraConfig = ''
|
locations."/".extraConfig = ''
|
||||||
|
|
|
@ -16,7 +16,7 @@ in
|
||||||
services.nginx.enable = true;
|
services.nginx.enable = true;
|
||||||
|
|
||||||
services.nginx.virtualHosts."share.dadada.li" = {
|
services.nginx.virtualHosts."share.dadada.li" = {
|
||||||
enableACME = true;
|
useACMEHost = "dadada.li";
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
|
|
||||||
root = "/var/lib/share";
|
root = "/var/lib/share";
|
||||||
|
|
|
@ -21,7 +21,7 @@ in
|
||||||
services.nginx.enable = true;
|
services.nginx.enable = true;
|
||||||
|
|
||||||
services.nginx.virtualHosts."webchat.dadada.li" = {
|
services.nginx.virtualHosts."webchat.dadada.li" = {
|
||||||
enableACME = true;
|
useACMEHost = "dadada.li";
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
|
|
||||||
root = pkgs.glowing-bear;
|
root = pkgs.glowing-bear;
|
||||||
|
@ -36,7 +36,7 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
services.nginx.virtualHosts."weechat.dadada.li" = {
|
services.nginx.virtualHosts."weechat.dadada.li" = {
|
||||||
enableACME = true;
|
useACMEHost = "dadada.li";
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
|
|
||||||
root = "${pkgs.nginx}/html";
|
root = "${pkgs.nginx}/html";
|
||||||
|
|
|
@ -27,7 +27,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
services.nginx.virtualHosts."hydra.${config.networking.domain}" = {
|
services.nginx.virtualHosts."hydra.${config.networking.domain}" = {
|
||||||
enableACME = true;
|
useACMEHost = "dadada.li";
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
|
|
||||||
root = "${pkgs.nginx}/html";
|
root = "${pkgs.nginx}/html";
|
||||||
|
@ -135,6 +135,7 @@ in
|
||||||
22 # SSH
|
22 # SSH
|
||||||
80
|
80
|
||||||
443 # HTTPS
|
443 # HTTPS
|
||||||
|
1667
|
||||||
];
|
];
|
||||||
allowedUDPPorts = [
|
allowedUDPPorts = [
|
||||||
51234 # Wireguard
|
51234 # Wireguard
|
||||||
|
@ -173,5 +174,49 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.soju = {
|
||||||
|
enable = true;
|
||||||
|
listen = [ "unix:///run/soju/irc.sock" ];
|
||||||
|
acceptProxyIP = [ "localhost" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
# For owning the socket the right group
|
||||||
|
systemd.services.soju.serviceConfig.Group = "nginx";
|
||||||
|
|
||||||
|
services.nginx.streamConfig = ''
|
||||||
|
server {
|
||||||
|
listen 1667 ssl;
|
||||||
|
proxy_pass unix:/run/soju/irc.sock;
|
||||||
|
proxy_protocol on;
|
||||||
|
proxy_connect_timeout 1s;
|
||||||
|
ssl_certificate /var/lib/acme/dadada.li/fullchain.pem;
|
||||||
|
ssl_certificate_key /var/lib/acme/dadada.li/key.pem;
|
||||||
|
ssl_trusted_certificate /var/lib/acme/dadada.li/chain.pem;
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
|
||||||
|
services.nginx.virtualHosts."soju.dadada.li" = {
|
||||||
|
useACMEHost = "dadada.li";
|
||||||
|
forceSSL = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
users.groups.acme.members = [
|
||||||
|
"nginx"
|
||||||
|
];
|
||||||
|
|
||||||
|
security.acme.certs = {
|
||||||
|
"dadada.li" = {
|
||||||
|
webroot = "/var/lib/acme/acme-challenge";
|
||||||
|
extraDomainNames = [
|
||||||
|
"element.dadada.li"
|
||||||
|
"hydra.dadada.li"
|
||||||
|
"git.dadada.li"
|
||||||
|
"miniflux.dadada.li"
|
||||||
|
"share.dadada.li"
|
||||||
|
"soju.dadada.li"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
system.stateVersion = "23.05";
|
system.stateVersion = "23.05";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue