freun.dev: add weechat
This commit is contained in:
31
modules/services/weechat.nix
Normal file
31
modules/services/weechat.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.services.weechat;
|
||||
fqdn = cfg.subdomain + "." + config.networking.domain;
|
||||
in
|
||||
{
|
||||
options.services.weechat = {
|
||||
subdomain = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "The subdomain for the weechat service";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services = {
|
||||
weechat = {
|
||||
# binary = lib.mkDefault "${pkgs.weechat}/bin/weechat-headless";
|
||||
};
|
||||
|
||||
webserver = {
|
||||
enable = lib.mkDefault true;
|
||||
vHosts.${fqdn}.locations."/".root = pkgs.glowing-bear;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user