mirror of
https://git.feal.no/felixalb/nixos-config.git
synced 2024-12-22 04:07:28 +01:00
burnham: add thelounge and nginx
This commit is contained in:
parent
f791ea1856
commit
8eaf7ab934
@ -10,6 +10,9 @@
|
||||
# Infrastructure
|
||||
./services/wireguard.nix
|
||||
|
||||
# Other
|
||||
./services/thelounge.nix
|
||||
./services/nginx.nix
|
||||
];
|
||||
|
||||
boot.loader.systemd-boot.enable = lib.mkForce false;
|
||||
|
19
hosts/burnham/services/nginx.nix
Normal file
19
hosts/burnham/services/nginx.nix
Normal file
@ -0,0 +1,19 @@
|
||||
{ config, values, ... }:
|
||||
{
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
enableReload = true;
|
||||
|
||||
recommendedProxySettings = true;
|
||||
recommendedTlsSettings = true;
|
||||
recommendedGzipSettings = true;
|
||||
recommendedOptimisation = true;
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||
|
||||
security.acme = {
|
||||
acceptTerms = true;
|
||||
defaults.email = "felix@albrigtsen.it";
|
||||
};
|
||||
}
|
21
hosts/burnham/services/thelounge.nix
Normal file
21
hosts/burnham/services/thelounge.nix
Normal file
@ -0,0 +1,21 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
cfg = config.services.thelounge.extraConfig;
|
||||
domain = "irc.home.feal.no";
|
||||
in {
|
||||
services.thelounge = {
|
||||
enable = true;
|
||||
|
||||
extraConfig = {
|
||||
public = false;
|
||||
host = "127.0.1.2";
|
||||
port = 9000;
|
||||
reverseProxy = true;
|
||||
};
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts.${domain} = {
|
||||
locations."/".proxyPass = "http://${cfg.host}:${toString cfg.port}";
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user