mirror of
https://github.com/JulienMalka/snowfield.git
synced 2025-04-01 17:50:51 +02:00
Added an irc service
This commit is contained in:
parent
35f2efc973
commit
2162967af4
1 changed files with 31 additions and 0 deletions
31
modules/irc/default.nix
Normal file
31
modules/irc/default.nix
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
{ lib, pkgs, config, ... }:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = config.luj.irc;
|
||||||
|
port = 9117;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
|
||||||
|
options.luj.irc = {
|
||||||
|
enable = mkEnableOption "activate weechat service";
|
||||||
|
nginx.enable = mkEnableOption "activate nginx";
|
||||||
|
nginx.subdomain = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable (
|
||||||
|
mkMerge [{
|
||||||
|
services.weechat.enable = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
(mkIf cfg.nginx.enable (mkPrivateSubdomain cfg.nginx.subdomain port))
|
||||||
|
|
||||||
|
|
||||||
|
(mkIf cfg.nginx.enable (mkVPNSubdomain cfg.nginx.subdomain port))]);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue