summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--krebs/3modules/hidden-ssh.nix3
-rw-r--r--krebs/3modules/makefu/default.nix2
-rw-r--r--krebs/5pkgs/realwallpaper/default.nix4
-rw-r--r--krebs/5pkgs/untilport/default.nix (renamed from lass/5pkgs/untilport/default.nix)0
-rw-r--r--krebs/5pkgs/weechat/default.nix80
-rw-r--r--lass/2configs/default.nix1
-rw-r--r--lass/2configs/nixpkgs.nix2
-rw-r--r--lass/2configs/repo-sync.nix1
-rw-r--r--lass/2configs/vim.nix2
-rw-r--r--lass/2configs/websites/domsen.nix27
-rw-r--r--lass/2configs/websites/util.nix9
-rw-r--r--lass/5pkgs/default.nix1
-rw-r--r--lass/5pkgs/xmonad-lass.nix2
-rw-r--r--makefu/1systems/gum.nix1
-rw-r--r--makefu/1systems/x.nix1
-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
19 files changed, 181 insertions, 41 deletions
diff --git a/krebs/3modules/hidden-ssh.nix b/krebs/3modules/hidden-ssh.nix
index 3930dbf42..304049b4e 100644
--- a/krebs/3modules/hidden-ssh.nix
+++ b/krebs/3modules/hidden-ssh.nix
@@ -38,7 +38,8 @@ let
echo "still waiting for ${hiddenServiceDir}/hostname"
sleep 1
done
- ${pkgs.irc-announce}/bin/irc-announce \
+ ${pkgs.untilport}/bin/untilport irc.freenode.org 6667 && \
+ ${pkgs.irc-announce}/bin/irc-announce \
irc.freenode.org 6667 ${config.krebs.build.host.name}-ssh \
\#krebs-announce \
"SSH Hidden Service at $(cat ${hiddenServiceDir}/hostname)"
diff --git a/krebs/3modules/makefu/default.nix b/krebs/3modules/makefu/default.nix
index cef6a4fd6..6b32fc38a 100644
--- a/krebs/3modules/makefu/default.nix
+++ b/krebs/3modules/makefu/default.nix
@@ -173,7 +173,7 @@ with import <stockholm/lib>;
};
};
x = {
- cores = 2;
+ cores = 4;
nets = {
retiolum = {
ip4.addr = "10.243.0.91";
diff --git a/krebs/5pkgs/realwallpaper/default.nix b/krebs/5pkgs/realwallpaper/default.nix
index dec2dada4..15cc277a5 100644
--- a/krebs/5pkgs/realwallpaper/default.nix
+++ b/krebs/5pkgs/realwallpaper/default.nix
@@ -5,8 +5,8 @@ stdenv.mkDerivation {
src = fetchgit {
url = https://github.com/Lassulus/realwallpaper;
- rev = "b8408cfb295b6ce5b965309b30358ca6c6409efd";
- sha256 = "0yyl8hhqshw9bx04xs8glvir3c0qzvfrwzmbvyg318mnz5xalcl0";
+ rev = "e0563289c2ab592b669ce4549fc40130246e9d79";
+ sha256 = "1zgk8ips2d686216h203w62wrw7zy9z0lrndx9f8z6f1vpvjcmqc";
};
phases = [
diff --git a/lass/5pkgs/untilport/default.nix b/krebs/5pkgs/untilport/default.nix
index 61bcc2b89..61bcc2b89 100644
--- a/lass/5pkgs/untilport/default.nix
+++ b/krebs/5pkgs/untilport/default.nix
diff --git a/krebs/5pkgs/weechat/default.nix b/krebs/5pkgs/weechat/default.nix
new file mode 100644
index 000000000..f5dc6a8d4
--- /dev/null
+++ b/krebs/5pkgs/weechat/default.nix
@@ -0,0 +1,80 @@
+{ stdenv, fetchurl, ncurses, openssl, aspell, gnutls
+, zlib, curl , pkgconfig, libgcrypt
+, cmake, makeWrapper, libiconv
+, asciidoctor # manpages
+, guileSupport ? true, guile
+, luaSupport ? true, lua5
+, perlSupport ? true, perl
+, pythonPackages
+, rubySupport ? true, ruby
+, tclSupport ? true, tcl
+, extraBuildInputs ? [] }:
+
+assert guileSupport -> guile != null;
+assert luaSupport -> lua5 != null;
+assert perlSupport -> perl != null;
+assert rubySupport -> ruby != null;
+assert tclSupport -> tcl != null;
+
+let
+ inherit (pythonPackages) python pycrypto pync;
+in
+
+stdenv.mkDerivation rec {
+ version = "1.7.1";
+ name = "weechat-${version}";
+
+ src = fetchurl {
+ url = "http://weechat.org/files/src/weechat-${version}.tar.bz2";
+ sha256 = "1020m1lsm8lg9n0dlxgp2wbn9b0r11g8r0namnzi2x6gvxn7iyf0";
+ };
+
+ outputs = [ "out" "doc" ];
+
+ enableParallelBuilding = true;
+ cmakeFlags = with stdenv.lib; [
+ "-DENABLE_MAN=ON"
+ "-DENABLE_DOC=ON"
+ ]
+ ++ optionals stdenv.isDarwin ["-DICONV_LIBRARY=${libiconv}/lib/libiconv.dylib" "-DCMAKE_FIND_FRAMEWORK=LAST"]
+ ++ optional (!guileSupport) "-DENABLE_GUILE=OFF"
+ ++ optional (!luaSupport) "-DENABLE_LUA=OFF"
+ ++ optional (!perlSupport) "-DENABLE_PERL=OFF"
+ ++ optional (!rubySupport) "-DENABLE_RUBY=OFF"
+ ++ optional (!tclSupport) "-DENABLE_TCL=OFF"
+ ;
+
+ buildInputs = with stdenv.lib; [
+ ncurses python openssl aspell gnutls zlib curl pkgconfig
+ libgcrypt pycrypto makeWrapper
+ cmake
+ asciidoctor
+ ]
+ ++ optional guileSupport guile
+ ++ optional luaSupport lua5
+ ++ optional perlSupport perl
+ ++ optional rubySupport ruby
+ ++ optional tclSupport tcl
+ ++ extraBuildInputs;
+
+ NIX_CFLAGS_COMPILE = "-I${python}/include/${python.libPrefix}"
+ # Fix '_res_9_init: undefined symbol' error
+ + (stdenv.lib.optionalString stdenv.isDarwin "-DBIND_8_COMPAT=1 -lresolv");
+
+ postInstall = with stdenv.lib; ''
+ NIX_PYTHONPATH="$out/lib/${python.libPrefix}/site-packages"
+ wrapProgram "$out/bin/weechat" \
+ ${optionalString perlSupport "--prefix PATH : ${perl}/bin"} \
+ --prefix PATH : ${pythonPackages.python}/bin \
+ --prefix PYTHONPATH : "$PYTHONPATH" \
+ --prefix PYTHONPATH : "$NIX_PYTHONPATH"
+ '';
+
+ meta = {
+ homepage = http://www.weechat.org/;
+ description = "A fast, light and extensible chat client";
+ license = stdenv.lib.licenses.gpl3;
+ maintainers = with stdenv.lib.maintainers; [ lovek323 garbas the-kenny ];
+ platforms = stdenv.lib.platforms.unix;
+ };
+}
diff --git a/lass/2configs/default.nix b/lass/2configs/default.nix
index e964704c3..e33514ee0 100644
--- a/lass/2configs/default.nix
+++ b/lass/2configs/default.nix
@@ -149,6 +149,7 @@ with import <stockholm/lib>;
tmux
untilport
usbutils
+ logify
#unpack stuff
p7zip
diff --git a/lass/2configs/nixpkgs.nix b/lass/2configs/nixpkgs.nix
index 5f9800b0f..4f1347b82 100644
--- a/lass/2configs/nixpkgs.nix
+++ b/lass/2configs/nixpkgs.nix
@@ -3,6 +3,6 @@
{
krebs.build.source.nixpkgs.git = {
url = https://cgit.lassul.us/nixpkgs;
- ref = "c85f39e";
+ ref = "aa03833";
};
}
diff --git a/lass/2configs/repo-sync.nix b/lass/2configs/repo-sync.nix
index 775bd7665..0b6cd8231 100644
--- a/lass/2configs/repo-sync.nix
+++ b/lass/2configs/repo-sync.nix
@@ -106,6 +106,7 @@ in {
(sync-remote "lassulus-blog" "https://github.com/lassulus/lassulus-blog")
(sync-remote "painload" "https://github.com/krebscode/painload")
(sync-remote "Reaktor" "https://github.com/krebscode/Reaktor")
+ (sync-remote "nixos-wiki" "https://github.com/Mic92/nixos-wiki.wiki.git")
(sync-remote-silent "nixpkgs" "https://github.com/nixos/nixpkgs")
(sync-retiolum "go")
(sync-retiolum "much")
diff --git a/lass/2configs/vim.nix b/lass/2configs/vim.nix
index e6cf8d101..40f7eedde 100644
--- a/lass/2configs/vim.nix
+++ b/lass/2configs/vim.nix
@@ -4,7 +4,7 @@ with import <stockholm/lib>;
let
out = {
environment.systemPackages = [
- vim
+ (hiPrio vim)
pkgs.pythonPackages.flake8
];
diff --git a/lass/2configs/websites/domsen.nix b/lass/2configs/websites/domsen.nix
index a5c51735a..581b37d91 100644
--- a/lass/2configs/websites/domsen.nix
+++ b/lass/2configs/websites/domsen.nix
@@ -21,22 +21,6 @@ let
exec ${pkgs.msmtp}/bin/msmtp --read-envelope-from -C ${msmtprc} "$@"
'';
- restartPhpfpm_o.ubikmedia = pkgs.writeDash "restartPhpfpm_o.ubikmedia.org" ''
- ${pkgs.systemd}/bin/systemctl restart phpfpm-o.ubikmedia.de.service
- '';
-
- restartPhpfpm_o.ubikmedia_wrapper = pkgs.writeDashBin "restartPhpfpm_o.ubikmedia" ''
- /run/wrappers/bin/sudo ${restartPhpfpm_o.ubikmedia}
- '';
-
- restartPhpfpm_ubikmedia = pkgs.writeDash "restartPhpfpm_ubikmedia.org" ''
- ${pkgs.systemd}/bin/systemctl restart phpfpm-ubikmedia.de.service
- '';
-
- restartPhpfpm_ubikmedia_wrapper = pkgs.writeDashBin "restartPhpfpm_ubikmedia" ''
- /run/wrappers/bin/sudo ${restartPhpfpm_ubikmedia}
- '';
-
in {
imports = [
./sqlBackup.nix
@@ -180,16 +164,5 @@ in {
createHome = true;
};
- #sudo restart wrappers
- security.sudo.extraConfig = ''
- domsen ALL= (root) NOPASSWD: ${restartPhpfpm_o.ubikmedia}
- domsen ALL= (root) NOPASSWD: ${restartPhpfpm_ubikmedia}
- '';
-
- krebs.per-user.domsen.packages = [
- restartPhpfpm_ubikmedia_wrapper
- restartPhpfpm_o.ubikmedia_wrapper
- ];
-
}
diff --git a/lass/2configs/websites/util.nix b/lass/2configs/websites/util.nix
index 6d14de731..36ae1a904 100644
--- a/lass/2configs/websites/util.nix
+++ b/lass/2configs/websites/util.nix
@@ -168,6 +168,7 @@ rec {
'';
locations."~ \.php$".extraConfig = ''
fastcgi_pass unix:/srv/http/${domain}/phpfpm.pool;
+ fastcgi_read_timeout 120;
include ${pkgs.nginx}/conf/fastcgi.conf;
'';
#Directives to send expires headers and turn off 404 error logging.
@@ -182,10 +183,10 @@ rec {
user = nginx
group = nginx
pm = dynamic
- pm.max_children = 15
- pm.start_servers = 3
- pm.min_spare_servers = 1
- pm.max_spare_servers = 10
+ pm.max_children = 25
+ pm.start_servers = 5
+ pm.min_spare_servers = 3
+ pm.max_spare_servers = 20
listen.owner = nginx
listen.group = nginx
php_admin_value[error_log] = 'stderr'
diff --git a/lass/5pkgs/default.nix b/lass/5pkgs/default.nix
index e49a0442d..fd52325ae 100644
--- a/lass/5pkgs/default.nix
+++ b/lass/5pkgs/default.nix
@@ -18,7 +18,6 @@
pop = pkgs.callPackage ./pop/default.nix {};
q = pkgs.callPackage ./q {};
rs = pkgs.callPackage ./rs/default.nix {};
- untilport = pkgs.callPackage ./untilport/default.nix {};
urban = pkgs.callPackage ./urban/default.nix {};
xmonad-lass = import ./xmonad-lass.nix { inherit pkgs; };
yt-next = pkgs.callPackage ./yt-next/default.nix {};
diff --git a/lass/5pkgs/xmonad-lass.nix b/lass/5pkgs/xmonad-lass.nix
index 82f507138..22ec7efa9 100644
--- a/lass/5pkgs/xmonad-lass.nix
+++ b/lass/5pkgs/xmonad-lass.nix
@@ -95,7 +95,7 @@ displaySomeException = displayException
myKeyMap :: [([Char], X ())]
myKeyMap =
- [ ("M4-<F11>", spawn "${pkgs.i3lock}/bin/i3lock -i $HOME/wallpaper/wallpaper -f")
+ [ ("M4-<F11>", spawn "${pkgs.i3lock}/bin/i3lock -i /var/lib/wallpaper/wallpaper -f")
, ("M4-C-p", spawn "${pkgs.scrot}/bin/scrot ~/public_html/scrot.png")
, ("M4-p", spawn "${pkgs.pass}/bin/passmenu --type")
, ("<XF86AudioRaiseVolume>", spawn "${pkgs.pulseaudioLight.out}/bin/pactl -- set-sink-volume @DEFAULT_SINK@ +4%")
diff --git a/makefu/1systems/gum.nix b/makefu/1systems/gum.nix
index 3186f8887..4850aedc1 100644
--- a/makefu/1systems/gum.nix
+++ b/makefu/1systems/gum.nix
@@ -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
diff --git a/makefu/1systems/x.nix b/makefu/1systems/x.nix
index 866aac3bd..65df426e5 100644
--- a/makefu/1systems/x.nix
+++ b/makefu/1systems/x.nix
@@ -61,6 +61,7 @@ with import <stockholm/lib>;
# hardware specifics are in here
../2configs/hw/tp-x230.nix
../2configs/hw/rtl8812au.nix
+ ../2configs/hw/stk1160.nix
# mount points
../2configs/fs/sda-crypto-root-home.nix
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"