summaryrefslogtreecommitdiffstats
path: root/krebs/3modules
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2017-09-07 22:51:48 +0200
committertv <tv@krebsco.de>2017-09-07 22:51:48 +0200
commite4969bf3e77a5d3bc39625ad784227438640d126 (patch)
treef6fbc14e2b675a512ec698cbdae33fa3fd8d25ca /krebs/3modules
parent66738262eeb30e29f2743d0e0424d10722f5e2af (diff)
parent46a3f4c24315836c1d82711d98f4d69be67d883d (diff)
Merge remote-tracking branch 'prism/master'
Diffstat (limited to 'krebs/3modules')
-rw-r--r--krebs/3modules/newsbot-js.nix7
-rw-r--r--krebs/3modules/nin/default.nix5
-rw-r--r--krebs/3modules/rtorrent.nix23
3 files changed, 30 insertions, 5 deletions
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";
};
};
};
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 <stockholm/lib>;
{
- hosts = mapAttrs (_: setAttr "owner" config.krebs.users.nin) {
+ hosts = mapAttrs (_: recursiveUpdate {
+ owner = config.krebs.users.nin;
+ ci = true;
+ }) {
hiawatha = {
cores = 2;
nets = {
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 <stockholm/lib>;
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 = {