Move vim packages to pkgs
Add system config Split up modules into home and system sets Update Cleanup Move home config Add module attrs Fix empty LUKS device UUID Import local secrets
This commit is contained in:
parent
4724f264dd
commit
e1c562191b
67 changed files with 1055 additions and 202 deletions
58
modules/weechat.nix
Normal file
58
modules/weechat.nix
Normal file
|
@ -0,0 +1,58 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.dadada.weechat;
|
||||
in {
|
||||
options.dadada.weechat = {
|
||||
enable = mkEnableOption "Enable weechat relay";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
services.weechat = {
|
||||
enable = true;
|
||||
sessionName = "weechat-dadada";
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."webchat.dadada.li" = {
|
||||
useACMEHost = "webchat.dadada.li";
|
||||
forceSSL = true;
|
||||
serverAliases = [ "webchat.${config.networking.domain}" ];
|
||||
|
||||
root = pkgs.glowing-bear;
|
||||
|
||||
locations = {
|
||||
"/robots.txt" = {
|
||||
extraConfig = ''
|
||||
add_header Content-Type text/plain;
|
||||
return 200 "User-agent: *\nDisallow: /\n";
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
services.nginx.virtualHosts."weechat.dadada.li" = {
|
||||
useACMEHost = "weechat.dadada.li";
|
||||
forceSSL = true;
|
||||
serverAliases = [ "weechat.${config.networking.domain}" ];
|
||||
|
||||
root = "${pkgs.nginx}/html";
|
||||
locations = {
|
||||
"/weechat" = {
|
||||
extraConfig = ''
|
||||
proxy_pass http://localhost:9001;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_read_timeout 8h;
|
||||
'';
|
||||
};
|
||||
"/robots.txt" = {
|
||||
extraConfig = ''
|
||||
add_header Content-Type text/plain;
|
||||
return 200 "User-agent: *\nDisallow: /\n";
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue