-{ lib, pkgs, config, myconfig, ... }:
+{ lib, pkgs, config, ... }:
+let
+ cfg = config.myServices.irc;
+in
{
- options = {
- services.irc.enable = lib.mkOption {
+ options.myServices = {
+ ircCerts = lib.mkOption {
+ description = "Default ircconfigurations for certificates as accepted by acme";
+ };
+ irc.enable = lib.mkOption {
type = lib.types.bool;
default = false;
description = ''
};
};
- config = lib.mkIf config.services.irc.enable {
- security.acme.certs."irc" = config.services.myCertificates.certConfig // {
+ config = lib.mkIf cfg.enable {
+ security.acme.certs."irc" = config.myServices.ircCerts // {
domain = "irc.immae.eu";
postRun = ''
systemctl restart stunnel.service
};
networking.firewall.allowedTCPPorts = [ 6697 ];
- services.bitlbee = {
+ services.bitlbee = with pkgs; {
enable = true;
authMode = "Registered";
libpurple_plugins = [
- pkgs.purple-hangouts
- pkgs.purple-matrix
+ purple-hangouts
+ purple-matrix
];
plugins = [
- pkgs.bitlbee-mastodon
- pkgs.bitlbee-facebook
- pkgs.bitlbee-discord
- pkgs.bitlbee-steam
+ bitlbee-mastodon
+ bitlbee-facebook
+ bitlbee-discord
+ bitlbee-steam
];
};
./modules/ftp.nix
./modules/pub
./modules/task
- ./modules/irc.nix
./modules/buildbot
./modules/dns.nix
] ++ (builtins.attrValues (import ../modules));
myServices.databases.enable = true;
+ myServices.irc.enable = true;
services.myGitolite.enable = true;
services.pure-ftpd.enable = true;
- services.irc.enable = true;
services.pub.enable = true;
services.myTasks.enable = true;
services.buildbot.enable = true;
config = {
services.websitesCerts = config.services.myCertificates.certConfig;
myServices.databasesCerts = config.services.myCertificates.certConfig;
+ myServices.ircCerts = config.services.myCertificates.certConfig;
security.acme.preliminarySelfsigned = true;