From 84646ba41595e3410fdd38b9d27312b33d4474f7 Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 22 Aug 2017 10:59:49 +0200 Subject: newsbot-js module: add package option this will be used for the wiki-irc-bot to override the patchPhase --- krebs/3modules/newsbot-js.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'krebs/3modules') diff --git a/krebs/3modules/newsbot-js.nix b/krebs/3modules/newsbot-js.nix index 2ff9a5ebb..dd3e5647a 100644 --- a/krebs/3modules/newsbot-js.nix +++ b/krebs/3modules/newsbot-js.nix @@ -13,6 +13,11 @@ let api = { enable = mkEnableOption "Enable krebs newsbot"; + package = mkOption { + type = types.package; + default = pkgs.newsbot-js; + description = "newsbot package to use"; + }; ircServer = mkOption { type = types.str; default = "echelon.retiolum"; @@ -79,7 +84,7 @@ let serviceConfig = { User = "newsbot-js"; Restart = "always"; - ExecStart = "${pkgs.newsbot-js}/bin/newsbot"; + ExecStart = "${cfg.package}/bin/newsbot"; }; }; }; -- cgit v1.2.3 From 04fbb9148fdde1e36d66dcb603d4e8b360b0e08a Mon Sep 17 00:00:00 2001 From: nin Date: Tue, 5 Sep 2017 22:55:24 +0200 Subject: nin hosts: enable ci --- krebs/3modules/nin/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'krebs/3modules') diff --git a/krebs/3modules/nin/default.nix b/krebs/3modules/nin/default.nix index d5d13cd1a..aab568352 100644 --- a/krebs/3modules/nin/default.nix +++ b/krebs/3modules/nin/default.nix @@ -3,7 +3,10 @@ with import ; { - hosts = mapAttrs (_: setAttr "owner" config.krebs.users.nin) { + hosts = mapAttrs (_: recursiveUpdate { + owner = config.krebs.users.nin; + ci = true; + }) { hiawatha = { cores = 2; nets = { -- cgit v1.2.3 From 6218a259a9880368c71ecacddcf1e7c641bd5278 Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 6 Sep 2017 09:50:39 +0200 Subject: rtorrent: track nginx changes --- krebs/3modules/rtorrent.nix | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'krebs/3modules') diff --git a/krebs/3modules/rtorrent.nix b/krebs/3modules/rtorrent.nix index d85518993..472accef9 100644 --- a/krebs/3modules/rtorrent.nix +++ b/krebs/3modules/rtorrent.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ config, lib, pkgs, options, ... }: with import ; let @@ -73,6 +73,15 @@ let # authentication also applies to rtorrent.rutorrent enable = mkEnableOption "rtorrent nginx web RPC"; + addr = mkOption { + type = types.addr4; + default = "0.0.0.0"; + description = '' + the address to listen on + default is 0.0.0.0 + ''; + }; + port = mkOption { type = types.nullOr types.int; description ='' @@ -290,7 +299,7 @@ let services.nginx.enable = mkDefault true; services.nginx.virtualHosts.rtorrent = { default = mkDefault true; - inherit (webcfg) basicAuth port; + inherit (webcfg) basicAuth; root = optionalString rucfg.enable webdir; locations = { @@ -310,7 +319,15 @@ let include ${pkgs.nginx}/conf/fastcgi.conf; ''; } ); - }; + # workaround because upstream nginx api changed + # TODO remove when nobody uses 17.03 anymore + } // (if hasAttr "port" (head options.services.nginx.virtualHosts.type.getSubModules).submodule.options then { + port = webcfg.port; + } else { + listen = [ + { inherit (webcfg) addr port; } + ]; + }); }; rutorrent-imp = { -- cgit v1.2.3