From 7bed1761bdbfc3fc7e2df56dcf069511eec2a97d Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 26 Dec 2015 11:41:41 +0100 Subject: m 3 Reaktor: now supports plugin infra see m/1/pornocauster --- krebs/3modules/Reaktor.nix | 5 ++++- krebs/5pkgs/Reaktor/plugins.nix | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'krebs') diff --git a/krebs/3modules/Reaktor.nix b/krebs/3modules/Reaktor.nix index 59058bff..607eb7ca 100644 --- a/krebs/3modules/Reaktor.nix +++ b/krebs/3modules/Reaktor.nix @@ -9,6 +9,7 @@ let ${cfg.overrideConfig} '' else ""} ## Extra Config + ${concatStringsSep "\n" (map (plug: plug.config) cfg.plugins)} ${cfg.extraConfig} ''; cfg = config.krebs.Reaktor; @@ -35,7 +36,6 @@ let ''; }; - overrideConfig = mkOption { default = null; type = types.nullOr types.str; @@ -44,6 +44,9 @@ let Reaktor default cfg can be retrieved via `reaktor get-config` ''; }; + plugins = mkOption { + default = [pkgs.ReaktorPlugins.nixos-version]; + }; extraConfig = mkOption { default = ""; type = types.string; diff --git a/krebs/5pkgs/Reaktor/plugins.nix b/krebs/5pkgs/Reaktor/plugins.nix index b1a61d3f..5c7b89f5 100644 --- a/krebs/5pkgs/Reaktor/plugins.nix +++ b/krebs/5pkgs/Reaktor/plugins.nix @@ -32,7 +32,7 @@ rec { ''indirect_pattern.format("${name}")'' else ''"${pattern}"'' }, 'argv' : ["${src_file}"], - 'env' : ${builtins.toJSON (path_env // env)})}) + 'env' : ${builtins.toJSON (path_env // env)} }) ''; config_file = pkgs.writeText "plugin.py" config; in buildBaseReaktorPlugin (attrs // rec { @@ -81,7 +81,7 @@ rec { stockholm-issue = buildSimpleReaktorPlugin "stockholm-issue" { script = ./scripts/random-issue.sh; path = with pkgs; [ git gnused lentil ]; - env = { "origin"= "http://cgit.gum/stockholm"; }; + env = { "origin" = "http://cgit.gum/stockholm"; }; }; titlebot = -- cgit v1.2.3