Merge remote-tracking branch 'gum/master'
This commit is contained in:
commit
379ae78ba9
@ -173,7 +173,7 @@ with import <stockholm/lib>;
|
||||
};
|
||||
};
|
||||
x = {
|
||||
cores = 2;
|
||||
cores = 4;
|
||||
nets = {
|
||||
retiolum = {
|
||||
ip4.addr = "10.243.0.91";
|
||||
|
@ -27,6 +27,7 @@ in {
|
||||
|
||||
## Web
|
||||
../2configs/deployment/owncloud.nix
|
||||
../2configs/deployment/newsbot.nix
|
||||
../2configs/nginx/share-download.nix
|
||||
../2configs/nginx/euer.test.nix
|
||||
../2configs/nginx/euer.wiki.nix
|
||||
|
18
makefu/2configs/deployment/newsbot.nix
Normal file
18
makefu/2configs/deployment/newsbot.nix
Normal file
@ -0,0 +1,18 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
newsfile = pkgs.writeText "feeds" ''
|
||||
nixoswiki-bot|https://github.com/Mic92/nixos-wiki/wiki.atom|#krebs
|
||||
'';
|
||||
in {
|
||||
environment.systemPackages = [
|
||||
pkgs.newsbot-js
|
||||
];
|
||||
krebs.newsbot-js = {
|
||||
enable = true;
|
||||
ircServer = "chat.freenode.net";
|
||||
feeds = newsfile;
|
||||
urlShortenerHost = "go";
|
||||
urlShortenerPort = "80";
|
||||
};
|
||||
}
|
49
makefu/2configs/deployment/wiki-irc.nix
Normal file
49
makefu/2configs/deployment/wiki-irc.nix
Normal file
@ -0,0 +1,49 @@
|
||||
{ pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
port = 18872;
|
||||
in {
|
||||
services.logstash = {
|
||||
enable = true;
|
||||
inputConfig = ''
|
||||
http {
|
||||
port => ${toString port}
|
||||
host => "127.0.0.1"
|
||||
}
|
||||
'';
|
||||
filterConfig = ''
|
||||
if ([pages]) {
|
||||
ruby {
|
||||
code => '
|
||||
o = ""
|
||||
event["pages"].each { |p| o = o + "\"" + p["title"] + "\" " + p["action"] +" by "+ event["sender"]["login"]+" " +p["html_url"] + "/_compare/" + p["sha"] + "\n" }
|
||||
event["output"] = o
|
||||
'
|
||||
}
|
||||
}
|
||||
'';
|
||||
outputConfig = ''
|
||||
file { path => "/tmp/logs.json" codec => "json_lines" }
|
||||
if [output] {
|
||||
irc {
|
||||
channels => [ "#krebs" ]
|
||||
host => "irc.freenode.net"
|
||||
nick => "nixos-wiki"
|
||||
format => "%{output}"
|
||||
}
|
||||
}
|
||||
'';
|
||||
plugins = [ ];
|
||||
};
|
||||
|
||||
services.nginx = {
|
||||
enable = lib.mkDefault true;
|
||||
virtualHosts."ghook.krebsco.de" = {
|
||||
locations."/".proxyPass = "http://localhost:${toString port}/";
|
||||
enableSSL = true;
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
};
|
||||
};
|
||||
}
|
@ -20,7 +20,7 @@ in {
|
||||
download = {
|
||||
name = "download";
|
||||
home = dl-dir;
|
||||
uid = genid "download";
|
||||
uid = mkDefault (genid "download");
|
||||
createHome = true;
|
||||
useDefaultShell = true;
|
||||
group = "download";
|
||||
@ -39,7 +39,7 @@ in {
|
||||
|
||||
users.extraGroups = {
|
||||
download = {
|
||||
gid = genid "download";
|
||||
gid = lib.mkDefault (genid "download");
|
||||
members = [
|
||||
config.krebs.build.user.name
|
||||
"download"
|
||||
|
Loading…
Reference in New Issue
Block a user