summaryrefslogtreecommitdiffstats
path: root/makefu/2configs
diff options
context:
space:
mode:
Diffstat (limited to 'makefu/2configs')
-rw-r--r--makefu/2configs/deployment/newsbot.nix18
-rw-r--r--makefu/2configs/deployment/wiki-irc.nix49
-rw-r--r--makefu/2configs/hw/stk1160.nix15
-rw-r--r--makefu/2configs/torrent.nix4
4 files changed, 84 insertions, 2 deletions
diff --git a/makefu/2configs/deployment/newsbot.nix b/makefu/2configs/deployment/newsbot.nix
new file mode 100644
index 000000000..748803447
--- /dev/null
+++ b/makefu/2configs/deployment/newsbot.nix
@@ -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";
+ };
+}
diff --git a/makefu/2configs/deployment/wiki-irc.nix b/makefu/2configs/deployment/wiki-irc.nix
new file mode 100644
index 000000000..73b85d821
--- /dev/null
+++ b/makefu/2configs/deployment/wiki-irc.nix
@@ -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;
+ };
+ };
+}
diff --git a/makefu/2configs/hw/stk1160.nix b/makefu/2configs/hw/stk1160.nix
new file mode 100644
index 000000000..b4d033d76
--- /dev/null
+++ b/makefu/2configs/hw/stk1160.nix
@@ -0,0 +1,15 @@
+{ pkgs, ... }:
+{
+ # TODO: un-pin linuxPackages somehow
+ boot.kernelPackages = builtins.trace "Warning: overriding kernel Packages with 4.9" pkgs.linuxPackages_4_9;
+ nixpkgs.config.packageOverrides = pkgs: {
+ linux_4_9 = pkgs.linux_4_9.override {
+ extraConfig = ''
+ MEDIA_ANALOG_TV_SUPPORT y
+ VIDEO_STK1160_COMMON m
+ VIDEO_STK1160_AC97 y
+ VIDEO_STK1160 m
+ '';
+ };
+ };
+}
diff --git a/makefu/2configs/torrent.nix b/makefu/2configs/torrent.nix
index 69d40094f..85d2e6c67 100644
--- a/makefu/2configs/torrent.nix
+++ b/makefu/2configs/torrent.nix
@@ -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"