From c962e8549e968fd15d4f15b4d184e86e1cd7ed04 Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 30 Dec 2015 11:29:28 +0100 Subject: k 3 Reaktor: add channels Option --- krebs/3modules/Reaktor.nix | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'krebs/3modules') diff --git a/krebs/3modules/Reaktor.nix b/krebs/3modules/Reaktor.nix index 607eb7cac..92400139c 100644 --- a/krebs/3modules/Reaktor.nix +++ b/krebs/3modules/Reaktor.nix @@ -70,12 +70,17 @@ let REAKTOR_HOST REAKTOR_PORT REAKTOR_STATEDIR - REAKTOR_CHANNELS debug and nickname can be set separately via the Reaktor api ''; }; - + channels = mkOption { + default = [ "#krebs" ]; + type = types.listOf types.str; + description = '' + Channels the Reaktor should connect to at startup. + ''; + }; debug = mkOption { default = false; description = '' @@ -112,7 +117,9 @@ let GIT_SSL_CAINFO = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"; REAKTOR_NICKNAME = cfg.nickname; REAKTOR_DEBUG = (if cfg.debug then "True" else "False"); + REAKTOR_CHANNELS = lib.concatStringsSep "," cfg.channels; state_dir = cfg.workdir; + } // cfg.extraEnviron; serviceConfig= { ExecStartPre = pkgs.writeScript "Reaktor-init" '' -- cgit v1.2.3 From b9c4a5e4a0800dbfb6f4cb1d20bbfd2c1d228d11 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 30 Dec 2015 14:54:04 +0100 Subject: exim-retiolum: move assert to proper location --- krebs/3modules/exim-retiolum.nix | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'krebs/3modules') diff --git a/krebs/3modules/exim-retiolum.nix b/krebs/3modules/exim-retiolum.nix index e1315d8c8..ea012c38c 100644 --- a/krebs/3modules/exim-retiolum.nix +++ b/krebs/3modules/exim-retiolum.nix @@ -1,14 +1,12 @@ { config, pkgs, lib, ... }: -with builtins; with lib; let cfg = config.krebs.exim-retiolum; out = { options.krebs.exim-retiolum = api; - config = - mkIf cfg.enable imp; + config = mkIf cfg.enable imp; }; api = { @@ -16,13 +14,13 @@ let }; imp = { - services.exim = - # This configuration makes only sense for retiolum-enabled hosts. - # TODO modular configuration - assert config.krebs.retiolum.enable; - { - enable = true; - config = '' + services.exim = { + enable = true; + config = + # This configuration makes only sense for retiolum-enabled hosts. + # TODO modular configuration + assert config.krebs.retiolum.enable; + '' primary_hostname = ${retiolumHostname} domainlist local_domains = @ : localhost domainlist relay_to_domains = *.retiolum @@ -134,7 +132,7 @@ let begin authenticators ''; - }; + }; }; # TODO get the hostname from somewhere else. -- cgit v1.2.3