From 407985695d91af4361799b2aeb5b0caf129d2c29 Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 26 Aug 2015 17:10:02 +0200 Subject: [PATCH 01/37] revert path from cacert to nss-cacert --- krebs/3modules/urlwatch.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/krebs/3modules/urlwatch.nix b/krebs/3modules/urlwatch.nix index 531e6c87b..80d9f5e93 100644 --- a/krebs/3modules/urlwatch.nix +++ b/krebs/3modules/urlwatch.nix @@ -78,7 +78,7 @@ let HOME = cfg.dataDir; LC_ALL = "en_US.UTF-8"; LOCALE_ARCHIVE = "${pkgs.glibcLocales}/lib/locale/locale-archive"; - SSL_CERT_FILE = "${pkgs.cacert}/etc/ca-bundle.crt"; + SSL_CERT_FILE = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"; }; serviceConfig = { User = user.name; From 8c5ca07413e983208ced2fc5b67dd84fb70482a4 Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 26 Aug 2015 17:11:05 +0200 Subject: [PATCH 02/37] add vaapi for tp-x220 this resolves the issue of vlc being slow after suspend --- makefu/2configs/tp-x220.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/makefu/2configs/tp-x220.nix b/makefu/2configs/tp-x220.nix index 787a0639e..94e51f726 100644 --- a/makefu/2configs/tp-x220.nix +++ b/makefu/2configs/tp-x220.nix @@ -8,13 +8,21 @@ with lib; boot.kernelModules = [ "kvm-intel" ]; #services.xserver.vaapiDrivers = [pkgs.vaapiIntel pkgs.vaapiVdpau ]; - services.xserver.vaapiDrivers = []; + + services.xserver = { + videoDriver = "intel"; + vaapiDrivers = [ pkgs.vaapiIntel ]; + deviceSection = '' + Option "AccelMethod" "sna" + BusID "PCI:0:2:0" + ''; + }; services.xserver.displayManager.sessionCommands ='' xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation" 8 1 xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Button" 8 2 - xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Timeout" 8 200 xinput set-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Axes" 6 7 4 5 + # xinput set-int-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Timeout" 8 200 ''; } From 015720ef89b81d3d17b3aa7dcaa1e1489c0f87a8 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 28 Aug 2015 20:09:54 +0200 Subject: [PATCH 03/37] {tv/4lib shell-escape,krebs/4lib/shell.nix escape} --- krebs/4lib/default.nix | 1 + krebs/4lib/shell.nix | 15 +++++++++++++++ tv/4lib/default.nix | 9 +-------- 3 files changed, 17 insertions(+), 8 deletions(-) create mode 100644 krebs/4lib/shell.nix diff --git a/krebs/4lib/default.nix b/krebs/4lib/default.nix index b67585335..8b587dfb2 100644 --- a/krebs/4lib/default.nix +++ b/krebs/4lib/default.nix @@ -14,5 +14,6 @@ builtins // lib // rec { dns = import ./dns.nix { inherit lib; }; listset = import ./listset.nix { inherit lib; }; + shell = import ./shell.nix { inherit lib; }; tree = import ./tree.nix { inherit lib; }; } diff --git a/krebs/4lib/shell.nix b/krebs/4lib/shell.nix new file mode 100644 index 000000000..48b220f87 --- /dev/null +++ b/krebs/4lib/shell.nix @@ -0,0 +1,15 @@ +{ lib, ... }: + +with builtins; +with lib; + +rec { + escape = + let + isSafeChar = c: match "[-./0-9_a-zA-Z]" c != null; + in + stringAsChars (c: + if isSafeChar c then c + else if c == "\n" then "'\n'" + else "\\${c}"); +} diff --git a/tv/4lib/default.nix b/tv/4lib/default.nix index 352689af4..106535ba2 100644 --- a/tv/4lib/default.nix +++ b/tv/4lib/default.nix @@ -16,12 +16,5 @@ krebs // rec { # "7.4.335" -> "74" majmin = with lib; x : concatStrings (take 2 (splitString "." x)); - shell-escape = - let - isSafeChar = c: match "[-./0-9_a-zA-Z]" c != null; - in - stringAsChars (c: - if isSafeChar c then c - else if c == "\n" then "'\n'" - else "\\${c}"); + shell-escape = krebs.shell.escape; } From f6997378c91be84432703183397f8675143030e9 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 28 Aug 2015 20:11:03 +0200 Subject: [PATCH 04/37] krebs shell: add cat --- krebs/4lib/shell.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/krebs/4lib/shell.nix b/krebs/4lib/shell.nix index 48b220f87..2a6da5c16 100644 --- a/krebs/4lib/shell.nix +++ b/krebs/4lib/shell.nix @@ -12,4 +12,11 @@ rec { if isSafeChar c then c else if c == "\n" then "'\n'" else "\\${c}"); + + # + # shell script generators + # + + # example: "${cat (toJSON { foo = "bar"; })} | jq -r .foo" + cat = s: "printf '%s' ${escape s}"; } From c1aaaca7f7febe0c587342ae74e7045bb9a67c5a Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 28 Aug 2015 21:31:59 +0200 Subject: [PATCH 05/37] krebs += pkgs.writeC lib.toC --- krebs/4lib/default.nix | 6 ++++++ krebs/5pkgs/default.nix | 13 ++++++++++++- tv/1systems/wu.nix | 2 +- tv/2configs/mail-client.nix | 4 ++-- tv/5pkgs/default.nix | 4 ++-- 5 files changed, 23 insertions(+), 6 deletions(-) diff --git a/krebs/4lib/default.nix b/krebs/4lib/default.nix index 8b587dfb2..ca7219c7e 100644 --- a/krebs/4lib/default.nix +++ b/krebs/4lib/default.nix @@ -16,4 +16,10 @@ builtins // lib // rec { listset = import ./listset.nix { inherit lib; }; shell = import ./shell.nix { inherit lib; }; tree = import ./tree.nix { inherit lib; }; + + toC = x: { + list = "{ ${concatStringsSep ", " (map toC x)} }"; + null = "NULL"; + string = toJSON x; # close enough + }.${typeOf x}; } diff --git a/krebs/5pkgs/default.nix b/krebs/5pkgs/default.nix index 2149b6f10..c8fb1d2d7 100644 --- a/krebs/5pkgs/default.nix +++ b/krebs/5pkgs/default.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ lib, pkgs, ... }: let inherit (pkgs) callPackage; @@ -14,4 +14,15 @@ pkgs // hashPassword = callPackage ./hashPassword.nix {}; nq = callPackage ./nq.nix {}; posix-array = callPackage ./posix-array.nix {}; + + writeC = name: {}: src: pkgs.runCommand name {} '' + PATH=${lib.makeSearchPath "bin" (with pkgs; [ + binutils + coreutils + gcc + ])} + in=${pkgs.writeText "${name}.c" src} + gcc -O -Wall -o $out $in + strip --strip-unneeded $out + ''; } diff --git a/tv/1systems/wu.nix b/tv/1systems/wu.nix index e48da90ad..6131897a7 100644 --- a/tv/1systems/wu.nix +++ b/tv/1systems/wu.nix @@ -3,7 +3,7 @@ with lib; let - tvpkgs = import ../5pkgs { inherit pkgs; }; + tvpkgs = import ../5pkgs { inherit lib pkgs; }; in { diff --git a/tv/2configs/mail-client.nix b/tv/2configs/mail-client.nix index a632cf7c4..1daacdb4c 100644 --- a/tv/2configs/mail-client.nix +++ b/tv/2configs/mail-client.nix @@ -1,6 +1,6 @@ -{ pkgs, ... }: +{ lib, pkgs, ... }: -with import ../5pkgs { inherit pkgs; }; +with import ../5pkgs { inherit lib pkgs; }; { environment.systemPackages = [ diff --git a/tv/5pkgs/default.nix b/tv/5pkgs/default.nix index 7b5d10a60..a0a22df9f 100644 --- a/tv/5pkgs/default.nix +++ b/tv/5pkgs/default.nix @@ -1,8 +1,8 @@ -{ pkgs, ... }: +{ lib, pkgs, ... }: let inherit (pkgs) callPackage; - kpkgs = import ../../krebs/5pkgs { inherit pkgs; }; + kpkgs = import ../../krebs/5pkgs { inherit lib pkgs; }; in kpkgs // { From 8827469a35852a0623d8353c22b481a15328254a Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 28 Aug 2015 21:43:16 +0200 Subject: [PATCH 06/37] krebs pkgs += execve --- krebs/5pkgs/default.nix | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/krebs/5pkgs/default.nix b/krebs/5pkgs/default.nix index c8fb1d2d7..406bd15eb 100644 --- a/krebs/5pkgs/default.nix +++ b/krebs/5pkgs/default.nix @@ -1,11 +1,13 @@ { lib, pkgs, ... }: +with import ../4lib { inherit lib; }; + let inherit (pkgs) callPackage; in pkgs // -{ +rec { cac = callPackage ./cac.nix {}; dic = callPackage ./dic.nix {}; genid = callPackage ./genid.nix {}; @@ -15,6 +17,20 @@ pkgs // nq = callPackage ./nq.nix {}; posix-array = callPackage ./posix-array.nix {}; + execve = name: { filename, argv, envp }: + writeC name {} '' + #include + int main () { + const char *filename = ${toC filename}; + char *const argv[] = ${toC (argv ++ [null])}; + char *const envp[] = ${toC ( + mapAttrsToList (k: v: "${k}=${v}") envp ++ [null] + )}; + execve(filename, argv, envp); + return -1; + } + ''; + writeC = name: {}: src: pkgs.runCommand name {} '' PATH=${lib.makeSearchPath "bin" (with pkgs; [ binutils From 62865ae6ae46e006cea7ee80b931fc5be27d3449 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 28 Aug 2015 21:48:29 +0200 Subject: [PATCH 07/37] tv configs test: init --- tv/1systems/wu.nix | 1 + tv/2configs/test.nix | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 tv/2configs/test.nix diff --git a/tv/1systems/wu.nix b/tv/1systems/wu.nix index 6131897a7..34ba5651e 100644 --- a/tv/1systems/wu.nix +++ b/tv/1systems/wu.nix @@ -33,6 +33,7 @@ in ../2configs/mail-client.nix ../2configs/xserver.nix ../2configs/synaptics.nix # TODO w110er if xserver is enabled + ../2configs/test.nix ../2configs/urlwatch.nix { environment.systemPackages = with pkgs; [ diff --git a/tv/2configs/test.nix b/tv/2configs/test.nix new file mode 100644 index 000000000..f96b9e98e --- /dev/null +++ b/tv/2configs/test.nix @@ -0,0 +1,25 @@ +{ config, lib, pkgs, ... }: + +with import ../4lib { inherit lib pkgs; }; + +let + tvpkgs = import ../5pkgs { inherit lib pkgs; }; + + out = { + security.sudo.extraConfig = '' + tv ALL=(test) NOPASSWD: ALL + ''; + users.extraUsers.test = { + shell = "${test-shell}"; + }; + }; + + test-shell = tvpkgs.execve "test-shell" rec { + filename = "${pkgs.bash}/bin/bash"; + argv = ["sh" "--noprofile" "-l"]; + envp.ENV = pkgs.writeText "test-env" '' + ${shell.cat "Hello, `$(j0w\nd0g!)`!\\o/\n"} >&2 + ''; + }; + +in out From 642c761bd015f5766a75cf5688b50d42efdb96c3 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 28 Aug 2015 22:13:17 +0200 Subject: [PATCH 08/37] krebs pkgs += execveBin --- krebs/5pkgs/default.nix | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/krebs/5pkgs/default.nix b/krebs/5pkgs/default.nix index 3658c43e0..54604382f 100644 --- a/krebs/5pkgs/default.nix +++ b/krebs/5pkgs/default.nix @@ -18,8 +18,8 @@ rec { posix-array = callPackage ./posix-array.nix {}; youtube-tools = callPackage ./youtube-tools.nix {}; - execve = name: { filename, argv, envp }: - writeC name {} '' + execve = name: { filename, argv, envp ? {}, destination ? "" }: + writeC name { inherit destination; } '' #include int main () { const char *filename = ${toC filename}; @@ -32,14 +32,18 @@ rec { } ''; - writeC = name: {}: src: pkgs.runCommand name {} '' + execveBin = name: cfg: execve name (cfg // { destination = "/bin/${name}"; }); + + writeC = name: { destination ? "" }: src: pkgs.runCommand name {} '' PATH=${lib.makeSearchPath "bin" (with pkgs; [ binutils coreutils gcc ])} - in=${pkgs.writeText "${name}.c" src} - gcc -O -Wall -o $out $in - strip --strip-unneeded $out + src=${pkgs.writeText "${name}.c" src} + exe=$out${destination} + mkdir -p "$(dirname "$exe")" + gcc -O -Wall -o "$exe" $src + strip --strip-unneeded "$exe" ''; } From 8e5137481852df6fb5488296a7081b5180e6954f Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 28 Aug 2015 22:14:34 +0200 Subject: [PATCH 09/37] tv configs test: systemPackages += su-test --- tv/2configs/test.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tv/2configs/test.nix b/tv/2configs/test.nix index f96b9e98e..fa556ec78 100644 --- a/tv/2configs/test.nix +++ b/tv/2configs/test.nix @@ -6,6 +6,9 @@ let tvpkgs = import ../5pkgs { inherit lib pkgs; }; out = { + environment.systemPackages = [ + su-test + ]; security.sudo.extraConfig = '' tv ALL=(test) NOPASSWD: ALL ''; @@ -14,6 +17,11 @@ let }; }; + su-test = tvpkgs.execveBin "su-test" rec { + filename = "/var/setuid-wrappers/sudo"; + argv = ["sudo" "-u" "test" "-i"]; + }; + test-shell = tvpkgs.execve "test-shell" rec { filename = "${pkgs.bash}/bin/bash"; argv = ["sh" "--noprofile" "-l"]; From 144fcda288eb050153620c386511c7722e031029 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 28 Aug 2015 22:27:23 +0200 Subject: [PATCH 10/37] {tv,krebs}: import krebs pkgs with lib --- krebs/3modules/github-hosts-sync.nix | 2 +- tv/1systems/cd.nix | 2 +- tv/2configs/charybdis.nix | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/krebs/3modules/github-hosts-sync.nix b/krebs/3modules/github-hosts-sync.nix index 0274b9d15..207b937de 100644 --- a/krebs/3modules/github-hosts-sync.nix +++ b/krebs/3modules/github-hosts-sync.nix @@ -78,6 +78,6 @@ let uid = 3220554646; # genid github-hosts-sync }; - kpkgs = import ../../krebs/5pkgs { inherit pkgs; }; + kpkgs = import ../../krebs/5pkgs { inherit lib pkgs; }; in out diff --git a/tv/1systems/cd.nix b/tv/1systems/cd.nix index 9f412d9b8..8d6ac957a 100644 --- a/tv/1systems/cd.nix +++ b/tv/1systems/cd.nix @@ -3,7 +3,7 @@ with lib; let - tvpkgs = import ../5pkgs { inherit pkgs; }; + tvpkgs = import ../5pkgs { inherit lib pkgs; }; in { diff --git a/tv/2configs/charybdis.nix b/tv/2configs/charybdis.nix index a2952219d..6be6c02c6 100644 --- a/tv/2configs/charybdis.nix +++ b/tv/2configs/charybdis.nix @@ -1,7 +1,7 @@ { config, lib, pkgs, ... }: let - tvpkgs = import ../5pkgs { inherit pkgs; }; + tvpkgs = import ../5pkgs { inherit lib pkgs; }; in with builtins; From 81eaf7a9e7b083c169828590d0d848cf933b32e0 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 29 Aug 2015 00:17:25 +0200 Subject: [PATCH 11/37] one pkgs to rule them all --- default.nix | 6 ++++++ krebs/3modules/github-hosts-sync.nix | 6 ++---- krebs/5pkgs/default.nix | 1 - 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/default.nix b/default.nix index 59a76f81b..875f0d5b4 100644 --- a/default.nix +++ b/default.nix @@ -8,6 +8,12 @@ let "${user-name}/1systems/${system-name}.nix" "${user-name}/3modules" "krebs/3modules" + ] ++ [ + ({ lib, pkgs, ... }: { + _module.args.pkgs = + (import ./krebs/5pkgs { inherit lib pkgs; }) // + (import (./. + "/${user-name}/5pkgs") { inherit lib pkgs; }); + }) ]; }; diff --git a/krebs/3modules/github-hosts-sync.nix b/krebs/3modules/github-hosts-sync.nix index 207b937de..dbc0cc1de 100644 --- a/krebs/3modules/github-hosts-sync.nix +++ b/krebs/3modules/github-hosts-sync.nix @@ -61,9 +61,9 @@ let ${cfg.ssh-identity-file} \ "$ssh_identity_file_target" - ln -snf ${kpkgs.github-known_hosts} ${cfg.dataDir}/.ssh/known_hosts + ln -snf ${pkgs.github-known_hosts} ${cfg.dataDir}/.ssh/known_hosts ''; - ExecStart = "${kpkgs.github-hosts-sync}/bin/github-hosts-sync"; + ExecStart = "${pkgs.github-hosts-sync}/bin/github-hosts-sync"; }; }; @@ -77,7 +77,5 @@ let name = "github-hosts-sync"; uid = 3220554646; # genid github-hosts-sync }; - - kpkgs = import ../../krebs/5pkgs { inherit lib pkgs; }; in out diff --git a/krebs/5pkgs/default.nix b/krebs/5pkgs/default.nix index 54604382f..2f7a24ed2 100644 --- a/krebs/5pkgs/default.nix +++ b/krebs/5pkgs/default.nix @@ -6,7 +6,6 @@ let inherit (pkgs) callPackage; in -pkgs // rec { cac = callPackage ./cac.nix {}; dic = callPackage ./dic.nix {}; From 09257f97823e9a57cda749c2d5a69b18ef484cec Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 29 Aug 2015 00:19:52 +0200 Subject: [PATCH 12/37] tv: use only pkgs --- tv/1systems/cd.nix | 6 +----- tv/1systems/wu.nix | 16 ++++++---------- tv/2configs/charybdis.nix | 6 +----- tv/2configs/mail-client.nix | 5 ++--- tv/2configs/test.nix | 6 ++---- tv/5pkgs/default.nix | 5 ++--- 6 files changed, 14 insertions(+), 30 deletions(-) diff --git a/tv/1systems/cd.nix b/tv/1systems/cd.nix index 8d6ac957a..0049387be 100644 --- a/tv/1systems/cd.nix +++ b/tv/1systems/cd.nix @@ -2,10 +2,6 @@ with lib; -let - tvpkgs = import ../5pkgs { inherit lib pkgs; }; -in - { krebs.build.host = config.krebs.hosts.cd; krebs.build.user = config.krebs.users.tv; @@ -136,7 +132,7 @@ in server-names = singleton "viljetic.de"; # TODO directly set root (instead via location) locations = singleton (nameValuePair "/" '' - root ${tvpkgs.viljetic-pages}; + root ${pkgs.viljetic-pages}; ''); }; } diff --git a/tv/1systems/wu.nix b/tv/1systems/wu.nix index 34ba5651e..622fd721a 100644 --- a/tv/1systems/wu.nix +++ b/tv/1systems/wu.nix @@ -2,10 +2,6 @@ with lib; -let - tvpkgs = import ../5pkgs { inherit lib pkgs; }; -in - { krebs.build.host = config.krebs.hosts.wu; krebs.build.user = config.krebs.users.tv; @@ -39,12 +35,12 @@ in environment.systemPackages = with pkgs; [ # stockholm + genid git gnumake + hashPassword + lentil parallel - tvpkgs.genid - tvpkgs.hashPassword - tvpkgs.lentil (pkgs.writeScriptBin "ff" '' #! ${pkgs.bash}/bin/bash exec sudo -u ff -i < Date: Sat, 29 Aug 2015 00:36:50 +0200 Subject: [PATCH 13/37] krebs pkgs += charybdis lentil much While there, put everything into subdirectories. --- krebs/5pkgs/{cac.nix => cac/default.nix} | 0 {tv => krebs}/5pkgs/charybdis/default.nix | 0 .../5pkgs/charybdis/remove-setenv.patch | 0 krebs/5pkgs/default.nix | 21 +++++++++++-------- krebs/5pkgs/{dic.nix => dic/default.nix} | 0 krebs/5pkgs/{genid.nix => genid/default.nix} | 0 .../default.nix} | 0 .../default.nix} | 0 .../default.nix} | 0 {tv => krebs}/5pkgs/lentil/default.nix | 0 {tv => krebs}/5pkgs/lentil/syntaxes.patch | 0 .../much.nix => krebs/5pkgs/much/default.nix | 0 krebs/5pkgs/{nq.nix => nq/default.nix} | 0 .../default.nix} | 0 .../default.nix} | 0 tv/5pkgs/default.nix | 3 --- 16 files changed, 12 insertions(+), 12 deletions(-) rename krebs/5pkgs/{cac.nix => cac/default.nix} (100%) rename {tv => krebs}/5pkgs/charybdis/default.nix (100%) rename {tv => krebs}/5pkgs/charybdis/remove-setenv.patch (100%) rename krebs/5pkgs/{dic.nix => dic/default.nix} (100%) rename krebs/5pkgs/{genid.nix => genid/default.nix} (100%) rename krebs/5pkgs/{github-hosts-sync.nix => github-hosts-sync/default.nix} (100%) rename krebs/5pkgs/{github-known_hosts.nix => github-known_hosts/default.nix} (100%) rename krebs/5pkgs/{hashPassword.nix => hashPassword/default.nix} (100%) rename {tv => krebs}/5pkgs/lentil/default.nix (100%) rename {tv => krebs}/5pkgs/lentil/syntaxes.patch (100%) rename tv/5pkgs/much.nix => krebs/5pkgs/much/default.nix (100%) rename krebs/5pkgs/{nq.nix => nq/default.nix} (100%) rename krebs/5pkgs/{posix-array.nix => posix-array/default.nix} (100%) rename krebs/5pkgs/{youtube-tools.nix => youtube-tools/default.nix} (100%) diff --git a/krebs/5pkgs/cac.nix b/krebs/5pkgs/cac/default.nix similarity index 100% rename from krebs/5pkgs/cac.nix rename to krebs/5pkgs/cac/default.nix diff --git a/tv/5pkgs/charybdis/default.nix b/krebs/5pkgs/charybdis/default.nix similarity index 100% rename from tv/5pkgs/charybdis/default.nix rename to krebs/5pkgs/charybdis/default.nix diff --git a/tv/5pkgs/charybdis/remove-setenv.patch b/krebs/5pkgs/charybdis/remove-setenv.patch similarity index 100% rename from tv/5pkgs/charybdis/remove-setenv.patch rename to krebs/5pkgs/charybdis/remove-setenv.patch diff --git a/krebs/5pkgs/default.nix b/krebs/5pkgs/default.nix index 2f7a24ed2..71bee3fa2 100644 --- a/krebs/5pkgs/default.nix +++ b/krebs/5pkgs/default.nix @@ -7,15 +7,18 @@ let in rec { - cac = callPackage ./cac.nix {}; - dic = callPackage ./dic.nix {}; - genid = callPackage ./genid.nix {}; - github-hosts-sync = callPackage ./github-hosts-sync.nix {}; - github-known_hosts = callPackage ./github-known_hosts.nix {}; - hashPassword = callPackage ./hashPassword.nix {}; - nq = callPackage ./nq.nix {}; - posix-array = callPackage ./posix-array.nix {}; - youtube-tools = callPackage ./youtube-tools.nix {}; + cac = callPackage ./cac {}; + charybdis = callPackage ./charybdis {}; + dic = callPackage ./dic {}; + genid = callPackage ./genid {}; + github-hosts-sync = callPackage ./github-hosts-sync {}; + github-known_hosts = callPackage ./github-known_hosts {}; + hashPassword = callPackage ./hashPassword {}; + lentil = callPackage ./lentil {}; + much = callPackage ./much {}; + nq = callPackage ./nq {}; + posix-array = callPackage ./posix-array {}; + youtube-tools = callPackage ./youtube-tools {}; execve = name: { filename, argv, envp ? {}, destination ? "" }: writeC name { inherit destination; } '' diff --git a/krebs/5pkgs/dic.nix b/krebs/5pkgs/dic/default.nix similarity index 100% rename from krebs/5pkgs/dic.nix rename to krebs/5pkgs/dic/default.nix diff --git a/krebs/5pkgs/genid.nix b/krebs/5pkgs/genid/default.nix similarity index 100% rename from krebs/5pkgs/genid.nix rename to krebs/5pkgs/genid/default.nix diff --git a/krebs/5pkgs/github-hosts-sync.nix b/krebs/5pkgs/github-hosts-sync/default.nix similarity index 100% rename from krebs/5pkgs/github-hosts-sync.nix rename to krebs/5pkgs/github-hosts-sync/default.nix diff --git a/krebs/5pkgs/github-known_hosts.nix b/krebs/5pkgs/github-known_hosts/default.nix similarity index 100% rename from krebs/5pkgs/github-known_hosts.nix rename to krebs/5pkgs/github-known_hosts/default.nix diff --git a/krebs/5pkgs/hashPassword.nix b/krebs/5pkgs/hashPassword/default.nix similarity index 100% rename from krebs/5pkgs/hashPassword.nix rename to krebs/5pkgs/hashPassword/default.nix diff --git a/tv/5pkgs/lentil/default.nix b/krebs/5pkgs/lentil/default.nix similarity index 100% rename from tv/5pkgs/lentil/default.nix rename to krebs/5pkgs/lentil/default.nix diff --git a/tv/5pkgs/lentil/syntaxes.patch b/krebs/5pkgs/lentil/syntaxes.patch similarity index 100% rename from tv/5pkgs/lentil/syntaxes.patch rename to krebs/5pkgs/lentil/syntaxes.patch diff --git a/tv/5pkgs/much.nix b/krebs/5pkgs/much/default.nix similarity index 100% rename from tv/5pkgs/much.nix rename to krebs/5pkgs/much/default.nix diff --git a/krebs/5pkgs/nq.nix b/krebs/5pkgs/nq/default.nix similarity index 100% rename from krebs/5pkgs/nq.nix rename to krebs/5pkgs/nq/default.nix diff --git a/krebs/5pkgs/posix-array.nix b/krebs/5pkgs/posix-array/default.nix similarity index 100% rename from krebs/5pkgs/posix-array.nix rename to krebs/5pkgs/posix-array/default.nix diff --git a/krebs/5pkgs/youtube-tools.nix b/krebs/5pkgs/youtube-tools/default.nix similarity index 100% rename from krebs/5pkgs/youtube-tools.nix rename to krebs/5pkgs/youtube-tools/default.nix diff --git a/tv/5pkgs/default.nix b/tv/5pkgs/default.nix index ce137d961..4175292f2 100644 --- a/tv/5pkgs/default.nix +++ b/tv/5pkgs/default.nix @@ -5,8 +5,5 @@ let in { - charybdis = callPackage ./charybdis {}; - lentil = callPackage ./lentil {}; - much = callPackage ./much.nix {}; viljetic-pages = callPackage ./viljetic-pages {}; } From cb6bede2f65bdcaafe547fdffd8c99f671c54ee9 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 29 Aug 2015 00:48:37 +0200 Subject: [PATCH 14/37] Zpubkeys github -> krebs pkgs github-known_hosts --- krebs/5pkgs/github-known_hosts/default.nix | 2 +- {Zpubkeys => krebs/5pkgs/github-known_hosts}/github.ssh.pub | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename {Zpubkeys => krebs/5pkgs/github-known_hosts}/github.ssh.pub (100%) diff --git a/krebs/5pkgs/github-known_hosts/default.nix b/krebs/5pkgs/github-known_hosts/default.nix index 302fdd8d5..fe5efe413 100644 --- a/krebs/5pkgs/github-known_hosts/default.nix +++ b/krebs/5pkgs/github-known_hosts/default.nix @@ -4,7 +4,7 @@ with builtins; with lib; let - github-pubkey = removeSuffix "\n" (readFile ../../Zpubkeys/github.ssh.pub); + github-pubkey = removeSuffix "\n" (readFile ./github.ssh.pub); in toFile "github-known_hosts" diff --git a/Zpubkeys/github.ssh.pub b/krebs/5pkgs/github-known_hosts/github.ssh.pub similarity index 100% rename from Zpubkeys/github.ssh.pub rename to krebs/5pkgs/github-known_hosts/github.ssh.pub From 5591b1dd120dac7cc52098eaacb1476da7b9cb84 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 29 Aug 2015 00:58:41 +0200 Subject: [PATCH 15/37] Z* -> */Z* --- krebs/3modules/default.nix | 10 +++++----- krebs/3modules/retiolum.nix | 2 +- {Zhosts => krebs/Zhosts}/Styx | 0 {Zhosts => krebs/Zhosts}/ThinkArmageddon | 0 {Zhosts => krebs/Zhosts}/TriBot | 0 {Zhosts => krebs/Zhosts}/ach | 0 {Zhosts => krebs/Zhosts}/air | 0 {Zhosts => krebs/Zhosts}/alarmpi | 0 {Zhosts => krebs/Zhosts}/albi10 | 0 {Zhosts => krebs/Zhosts}/albi7 | 0 {Zhosts => krebs/Zhosts}/almoehi | 0 {Zhosts => krebs/Zhosts}/alphalabs | 0 {Zhosts => krebs/Zhosts}/apfull | 0 {Zhosts => krebs/Zhosts}/bitchctl | 0 {Zhosts => krebs/Zhosts}/bitchextend | 0 {Zhosts => krebs/Zhosts}/bitchtop | 0 {Zhosts => krebs/Zhosts}/box | 0 {Zhosts => krebs/Zhosts}/bridge | 0 {Zhosts => krebs/Zhosts}/c2ft | 0 {Zhosts => krebs/Zhosts}/c2fthome | 0 {Zhosts => krebs/Zhosts}/casino | 0 {Zhosts => krebs/Zhosts}/cat1 | 0 {Zhosts => krebs/Zhosts}/cband | 0 {Zhosts => krebs/Zhosts}/cd | 0 {Zhosts => krebs/Zhosts}/cloudkrebs | 0 {Zhosts => krebs/Zhosts}/darth | 0 {Zhosts => krebs/Zhosts}/dei | 0 {Zhosts => krebs/Zhosts}/destroy | 0 {Zhosts => krebs/Zhosts}/devstar | 0 {Zhosts => krebs/Zhosts}/eigenserv | 0 {Zhosts => krebs/Zhosts}/elvis | 0 {Zhosts => krebs/Zhosts}/eulerwalk | 0 {Zhosts => krebs/Zhosts}/exile | 0 {Zhosts => krebs/Zhosts}/exitium_mobilis | 0 {Zhosts => krebs/Zhosts}/falk | 0 {Zhosts => krebs/Zhosts}/fastpoke | 0 {Zhosts => krebs/Zhosts}/filebitch | 0 {Zhosts => krebs/Zhosts}/filepimp | 0 {Zhosts => krebs/Zhosts}/flap | 0 {Zhosts => krebs/Zhosts}/foobar | 0 {Zhosts => krebs/Zhosts}/fuerkrebs | 0 {Zhosts => krebs/Zhosts}/go | 0 {Zhosts => krebs/Zhosts}/gum | 0 {Zhosts => krebs/Zhosts}/heidi | 0 {Zhosts => krebs/Zhosts}/horisa | 0 {Zhosts => krebs/Zhosts}/horreum_magnus | 0 {Zhosts => krebs/Zhosts}/incept | 0 {Zhosts => krebs/Zhosts}/ire | 0 {Zhosts => krebs/Zhosts}/ire2 | 0 {Zhosts => krebs/Zhosts}/irkel | 0 {Zhosts => krebs/Zhosts}/juhulian | 0 {Zhosts => krebs/Zhosts}/k2 | 0 {Zhosts => krebs/Zhosts}/kabinett | 0 {Zhosts => krebs/Zhosts}/kaepsele | 0 {Zhosts => krebs/Zhosts}/kalle | 0 {Zhosts => krebs/Zhosts}/karthus | 0 {Zhosts => krebs/Zhosts}/khackplug | 0 {Zhosts => krebs/Zhosts}/kheurop | 0 {Zhosts => krebs/Zhosts}/kiosk | 0 {Zhosts => krebs/Zhosts}/krebsplug | 0 {Zhosts => krebs/Zhosts}/kvasir | 0 {Zhosts => krebs/Zhosts}/laqueus | 0 {Zhosts => krebs/Zhosts}/linuxatom | 0 {Zhosts => krebs/Zhosts}/luminos | 0 {Zhosts => krebs/Zhosts}/machine | 0 {Zhosts => krebs/Zhosts}/makalu | 0 {Zhosts => krebs/Zhosts}/mako | 0 {Zhosts => krebs/Zhosts}/miefda0 | 0 {Zhosts => krebs/Zhosts}/minikrebs | 0 {Zhosts => krebs/Zhosts}/mkdir | 0 {Zhosts => krebs/Zhosts}/monitor | 0 {Zhosts => krebs/Zhosts}/mors | 0 {Zhosts => krebs/Zhosts}/motor | 0 {Zhosts => krebs/Zhosts}/mu | 0 {Zhosts => krebs/Zhosts}/muhbaasu | 0 {Zhosts => krebs/Zhosts}/nomic | 0 {Zhosts => krebs/Zhosts}/nomic2 | 0 {Zhosts => krebs/Zhosts}/nukular | 0 {Zhosts => krebs/Zhosts}/omo | 0 {Zhosts => krebs/Zhosts}/pic | 0 {Zhosts => krebs/Zhosts}/pigstarter | 0 {Zhosts => krebs/Zhosts}/pike | 0 {Zhosts => krebs/Zhosts}/pnp | 0 {Zhosts => krebs/Zhosts}/pornocauster | 0 {Zhosts => krebs/Zhosts}/radiotuxmini | 0 {Zhosts => krebs/Zhosts}/random | 0 {Zhosts => krebs/Zhosts}/raspafari | 0 {Zhosts => krebs/Zhosts}/reimae | 0 {Zhosts => krebs/Zhosts}/rmdir | 0 {Zhosts => krebs/Zhosts}/robchina | 0 {Zhosts => krebs/Zhosts}/rockit | 0 {Zhosts => krebs/Zhosts}/rtjure_debian_oder_so | 0 {Zhosts => krebs/Zhosts}/rtjure_ras | 0 {Zhosts => krebs/Zhosts}/rtjure_rdrlab_linkstation | 0 {Zhosts => krebs/Zhosts}/rubus | 0 {Zhosts => krebs/Zhosts}/senderechner | 0 {Zhosts => krebs/Zhosts}/serenity | 0 {Zhosts => krebs/Zhosts}/seruundroid | 0 {Zhosts => krebs/Zhosts}/sir_krebs_a_lot | 0 {Zhosts => krebs/Zhosts}/skirfir | 0 {Zhosts => krebs/Zhosts}/sleipnir | 0 {Zhosts => krebs/Zhosts}/smove | 0 {Zhosts => krebs/Zhosts}/sokrates | 0 {Zhosts => krebs/Zhosts}/sokrateslaptop | 0 {Zhosts => krebs/Zhosts}/soundflower | 0 {Zhosts => krebs/Zhosts}/steve | 0 {Zhosts => krebs/Zhosts}/tahoe | 0 {Zhosts => krebs/Zhosts}/taschenkrebs | 0 {Zhosts => krebs/Zhosts}/terrapi | 0 {Zhosts => krebs/Zhosts}/thomasDOTde | 0 {Zhosts => krebs/Zhosts}/tincdroid | 0 {Zhosts => krebs/Zhosts}/tmpd | 0 {Zhosts => krebs/Zhosts}/tpsw | 0 {Zhosts => krebs/Zhosts}/tsp | 0 {Zhosts => krebs/Zhosts}/ufo | 0 {Zhosts => krebs/Zhosts}/uriel | 0 {Zhosts => krebs/Zhosts}/vault | 0 {Zhosts => krebs/Zhosts}/voyager | 0 {Zhosts => krebs/Zhosts}/wooktop | 0 {Zhosts => krebs/Zhosts}/wu | 0 {Zhosts => krebs/Zhosts}/ytart | 0 {Zhosts => krebs/Zhosts}/zombiecancer | 0 {Zpubkeys => krebs/Zpubkeys}/deploy_wu.ssh.pub | 0 {Zpubkeys => krebs/Zpubkeys}/lass.ssh.pub | 0 {Zpubkeys => krebs/Zpubkeys}/makefu_arch.ssh.pub | 0 {Zpubkeys => krebs/Zpubkeys}/makefu_omo.ssh.pub | 0 {Zpubkeys => krebs/Zpubkeys}/makefu_tsp.ssh.pub | 0 {Zpubkeys => krebs/Zpubkeys}/mv_vod.ssh.pub | 0 {Zpubkeys => krebs/Zpubkeys}/tv_wu.ssh.pub | 0 {Zpubkeys => krebs/Zpubkeys}/uriel.ssh.pub | 0 tv/1systems/cd.nix | 2 +- {Zcerts => tv/Zcerts}/charybdis_cd.crt.pem | 0 132 files changed, 7 insertions(+), 7 deletions(-) rename {Zhosts => krebs/Zhosts}/Styx (100%) rename {Zhosts => krebs/Zhosts}/ThinkArmageddon (100%) rename {Zhosts => krebs/Zhosts}/TriBot (100%) rename {Zhosts => krebs/Zhosts}/ach (100%) rename {Zhosts => krebs/Zhosts}/air (100%) rename {Zhosts => krebs/Zhosts}/alarmpi (100%) rename {Zhosts => krebs/Zhosts}/albi10 (100%) rename {Zhosts => krebs/Zhosts}/albi7 (100%) rename {Zhosts => krebs/Zhosts}/almoehi (100%) rename {Zhosts => krebs/Zhosts}/alphalabs (100%) rename {Zhosts => krebs/Zhosts}/apfull (100%) rename {Zhosts => krebs/Zhosts}/bitchctl (100%) rename {Zhosts => krebs/Zhosts}/bitchextend (100%) rename {Zhosts => krebs/Zhosts}/bitchtop (100%) rename {Zhosts => krebs/Zhosts}/box (100%) rename {Zhosts => krebs/Zhosts}/bridge (100%) rename {Zhosts => krebs/Zhosts}/c2ft (100%) rename {Zhosts => krebs/Zhosts}/c2fthome (100%) rename {Zhosts => krebs/Zhosts}/casino (100%) rename {Zhosts => krebs/Zhosts}/cat1 (100%) rename {Zhosts => krebs/Zhosts}/cband (100%) rename {Zhosts => krebs/Zhosts}/cd (100%) rename {Zhosts => krebs/Zhosts}/cloudkrebs (100%) rename {Zhosts => krebs/Zhosts}/darth (100%) rename {Zhosts => krebs/Zhosts}/dei (100%) rename {Zhosts => krebs/Zhosts}/destroy (100%) rename {Zhosts => krebs/Zhosts}/devstar (100%) rename {Zhosts => krebs/Zhosts}/eigenserv (100%) rename {Zhosts => krebs/Zhosts}/elvis (100%) rename {Zhosts => krebs/Zhosts}/eulerwalk (100%) rename {Zhosts => krebs/Zhosts}/exile (100%) rename {Zhosts => krebs/Zhosts}/exitium_mobilis (100%) rename {Zhosts => krebs/Zhosts}/falk (100%) rename {Zhosts => krebs/Zhosts}/fastpoke (100%) rename {Zhosts => krebs/Zhosts}/filebitch (100%) rename {Zhosts => krebs/Zhosts}/filepimp (100%) rename {Zhosts => krebs/Zhosts}/flap (100%) rename {Zhosts => krebs/Zhosts}/foobar (100%) rename {Zhosts => krebs/Zhosts}/fuerkrebs (100%) rename {Zhosts => krebs/Zhosts}/go (100%) rename {Zhosts => krebs/Zhosts}/gum (100%) rename {Zhosts => krebs/Zhosts}/heidi (100%) rename {Zhosts => krebs/Zhosts}/horisa (100%) rename {Zhosts => krebs/Zhosts}/horreum_magnus (100%) rename {Zhosts => krebs/Zhosts}/incept (100%) rename {Zhosts => krebs/Zhosts}/ire (100%) rename {Zhosts => krebs/Zhosts}/ire2 (100%) rename {Zhosts => krebs/Zhosts}/irkel (100%) rename {Zhosts => krebs/Zhosts}/juhulian (100%) rename {Zhosts => krebs/Zhosts}/k2 (100%) rename {Zhosts => krebs/Zhosts}/kabinett (100%) rename {Zhosts => krebs/Zhosts}/kaepsele (100%) rename {Zhosts => krebs/Zhosts}/kalle (100%) rename {Zhosts => krebs/Zhosts}/karthus (100%) rename {Zhosts => krebs/Zhosts}/khackplug (100%) rename {Zhosts => krebs/Zhosts}/kheurop (100%) rename {Zhosts => krebs/Zhosts}/kiosk (100%) rename {Zhosts => krebs/Zhosts}/krebsplug (100%) rename {Zhosts => krebs/Zhosts}/kvasir (100%) rename {Zhosts => krebs/Zhosts}/laqueus (100%) rename {Zhosts => krebs/Zhosts}/linuxatom (100%) rename {Zhosts => krebs/Zhosts}/luminos (100%) rename {Zhosts => krebs/Zhosts}/machine (100%) rename {Zhosts => krebs/Zhosts}/makalu (100%) rename {Zhosts => krebs/Zhosts}/mako (100%) rename {Zhosts => krebs/Zhosts}/miefda0 (100%) rename {Zhosts => krebs/Zhosts}/minikrebs (100%) rename {Zhosts => krebs/Zhosts}/mkdir (100%) rename {Zhosts => krebs/Zhosts}/monitor (100%) rename {Zhosts => krebs/Zhosts}/mors (100%) rename {Zhosts => krebs/Zhosts}/motor (100%) rename {Zhosts => krebs/Zhosts}/mu (100%) rename {Zhosts => krebs/Zhosts}/muhbaasu (100%) rename {Zhosts => krebs/Zhosts}/nomic (100%) rename {Zhosts => krebs/Zhosts}/nomic2 (100%) rename {Zhosts => krebs/Zhosts}/nukular (100%) rename {Zhosts => krebs/Zhosts}/omo (100%) rename {Zhosts => krebs/Zhosts}/pic (100%) rename {Zhosts => krebs/Zhosts}/pigstarter (100%) rename {Zhosts => krebs/Zhosts}/pike (100%) rename {Zhosts => krebs/Zhosts}/pnp (100%) rename {Zhosts => krebs/Zhosts}/pornocauster (100%) rename {Zhosts => krebs/Zhosts}/radiotuxmini (100%) rename {Zhosts => krebs/Zhosts}/random (100%) rename {Zhosts => krebs/Zhosts}/raspafari (100%) rename {Zhosts => krebs/Zhosts}/reimae (100%) rename {Zhosts => krebs/Zhosts}/rmdir (100%) rename {Zhosts => krebs/Zhosts}/robchina (100%) rename {Zhosts => krebs/Zhosts}/rockit (100%) rename {Zhosts => krebs/Zhosts}/rtjure_debian_oder_so (100%) rename {Zhosts => krebs/Zhosts}/rtjure_ras (100%) rename {Zhosts => krebs/Zhosts}/rtjure_rdrlab_linkstation (100%) rename {Zhosts => krebs/Zhosts}/rubus (100%) rename {Zhosts => krebs/Zhosts}/senderechner (100%) rename {Zhosts => krebs/Zhosts}/serenity (100%) rename {Zhosts => krebs/Zhosts}/seruundroid (100%) rename {Zhosts => krebs/Zhosts}/sir_krebs_a_lot (100%) rename {Zhosts => krebs/Zhosts}/skirfir (100%) rename {Zhosts => krebs/Zhosts}/sleipnir (100%) rename {Zhosts => krebs/Zhosts}/smove (100%) rename {Zhosts => krebs/Zhosts}/sokrates (100%) rename {Zhosts => krebs/Zhosts}/sokrateslaptop (100%) rename {Zhosts => krebs/Zhosts}/soundflower (100%) rename {Zhosts => krebs/Zhosts}/steve (100%) rename {Zhosts => krebs/Zhosts}/tahoe (100%) rename {Zhosts => krebs/Zhosts}/taschenkrebs (100%) rename {Zhosts => krebs/Zhosts}/terrapi (100%) rename {Zhosts => krebs/Zhosts}/thomasDOTde (100%) rename {Zhosts => krebs/Zhosts}/tincdroid (100%) rename {Zhosts => krebs/Zhosts}/tmpd (100%) rename {Zhosts => krebs/Zhosts}/tpsw (100%) rename {Zhosts => krebs/Zhosts}/tsp (100%) rename {Zhosts => krebs/Zhosts}/ufo (100%) rename {Zhosts => krebs/Zhosts}/uriel (100%) rename {Zhosts => krebs/Zhosts}/vault (100%) rename {Zhosts => krebs/Zhosts}/voyager (100%) rename {Zhosts => krebs/Zhosts}/wooktop (100%) rename {Zhosts => krebs/Zhosts}/wu (100%) rename {Zhosts => krebs/Zhosts}/ytart (100%) rename {Zhosts => krebs/Zhosts}/zombiecancer (100%) rename {Zpubkeys => krebs/Zpubkeys}/deploy_wu.ssh.pub (100%) rename {Zpubkeys => krebs/Zpubkeys}/lass.ssh.pub (100%) rename {Zpubkeys => krebs/Zpubkeys}/makefu_arch.ssh.pub (100%) rename {Zpubkeys => krebs/Zpubkeys}/makefu_omo.ssh.pub (100%) rename {Zpubkeys => krebs/Zpubkeys}/makefu_tsp.ssh.pub (100%) rename {Zpubkeys => krebs/Zpubkeys}/mv_vod.ssh.pub (100%) rename {Zpubkeys => krebs/Zpubkeys}/tv_wu.ssh.pub (100%) rename {Zpubkeys => krebs/Zpubkeys}/uriel.ssh.pub (100%) rename {Zcerts => tv/Zcerts}/charybdis_cd.crt.pem (100%) diff --git a/krebs/3modules/default.nix b/krebs/3modules/default.nix index 65ebad7b8..5f338df62 100644 --- a/krebs/3modules/default.nix +++ b/krebs/3modules/default.nix @@ -303,11 +303,11 @@ let }; users = addNames { lass = { - pubkey = readFile ../../Zpubkeys/lass.ssh.pub; + pubkey = readFile ../Zpubkeys/lass.ssh.pub; mail = "lass@mors.retiolum"; }; uriel = { - pubkey = readFile ../../Zpubkeys/uriel.ssh.pub; + pubkey = readFile ../Zpubkeys/uriel.ssh.pub; mail = "lass@uriel.retiolum"; }; }; @@ -514,7 +514,7 @@ let users = addNames { makefu = { mail = "makefu@pornocauster.retiolum"; - pubkey = readFile ../../Zpubkeys/makefu_arch.ssh.pub; + pubkey = readFile ../Zpubkeys/makefu_arch.ssh.pub; }; }; }; @@ -685,11 +685,11 @@ let users = addNames { mv = { mail = "mv@cd.retiolum"; - pubkey = readFile ../../Zpubkeys/mv_vod.ssh.pub; + pubkey = readFile ../Zpubkeys/mv_vod.ssh.pub; }; tv = { mail = "tv@wu.retiolum"; - pubkey = readFile ../../Zpubkeys/tv_wu.ssh.pub; + pubkey = readFile ../Zpubkeys/tv_wu.ssh.pub; }; }; }; diff --git a/krebs/3modules/retiolum.nix b/krebs/3modules/retiolum.nix index 481d6565c..4e70b78aa 100644 --- a/krebs/3modules/retiolum.nix +++ b/krebs/3modules/retiolum.nix @@ -58,7 +58,7 @@ let hosts = mkOption { type = with types; either package path; - default = ../../Zhosts; + default = ../Zhosts; description = '' If a path is given, then it will be used to generate an ad-hoc package. ''; diff --git a/Zhosts/Styx b/krebs/Zhosts/Styx similarity index 100% rename from Zhosts/Styx rename to krebs/Zhosts/Styx diff --git a/Zhosts/ThinkArmageddon b/krebs/Zhosts/ThinkArmageddon similarity index 100% rename from Zhosts/ThinkArmageddon rename to krebs/Zhosts/ThinkArmageddon diff --git a/Zhosts/TriBot b/krebs/Zhosts/TriBot similarity index 100% rename from Zhosts/TriBot rename to krebs/Zhosts/TriBot diff --git a/Zhosts/ach b/krebs/Zhosts/ach similarity index 100% rename from Zhosts/ach rename to krebs/Zhosts/ach diff --git a/Zhosts/air b/krebs/Zhosts/air similarity index 100% rename from Zhosts/air rename to krebs/Zhosts/air diff --git a/Zhosts/alarmpi b/krebs/Zhosts/alarmpi similarity index 100% rename from Zhosts/alarmpi rename to krebs/Zhosts/alarmpi diff --git a/Zhosts/albi10 b/krebs/Zhosts/albi10 similarity index 100% rename from Zhosts/albi10 rename to krebs/Zhosts/albi10 diff --git a/Zhosts/albi7 b/krebs/Zhosts/albi7 similarity index 100% rename from Zhosts/albi7 rename to krebs/Zhosts/albi7 diff --git a/Zhosts/almoehi b/krebs/Zhosts/almoehi similarity index 100% rename from Zhosts/almoehi rename to krebs/Zhosts/almoehi diff --git a/Zhosts/alphalabs b/krebs/Zhosts/alphalabs similarity index 100% rename from Zhosts/alphalabs rename to krebs/Zhosts/alphalabs diff --git a/Zhosts/apfull b/krebs/Zhosts/apfull similarity index 100% rename from Zhosts/apfull rename to krebs/Zhosts/apfull diff --git a/Zhosts/bitchctl b/krebs/Zhosts/bitchctl similarity index 100% rename from Zhosts/bitchctl rename to krebs/Zhosts/bitchctl diff --git a/Zhosts/bitchextend b/krebs/Zhosts/bitchextend similarity index 100% rename from Zhosts/bitchextend rename to krebs/Zhosts/bitchextend diff --git a/Zhosts/bitchtop b/krebs/Zhosts/bitchtop similarity index 100% rename from Zhosts/bitchtop rename to krebs/Zhosts/bitchtop diff --git a/Zhosts/box b/krebs/Zhosts/box similarity index 100% rename from Zhosts/box rename to krebs/Zhosts/box diff --git a/Zhosts/bridge b/krebs/Zhosts/bridge similarity index 100% rename from Zhosts/bridge rename to krebs/Zhosts/bridge diff --git a/Zhosts/c2ft b/krebs/Zhosts/c2ft similarity index 100% rename from Zhosts/c2ft rename to krebs/Zhosts/c2ft diff --git a/Zhosts/c2fthome b/krebs/Zhosts/c2fthome similarity index 100% rename from Zhosts/c2fthome rename to krebs/Zhosts/c2fthome diff --git a/Zhosts/casino b/krebs/Zhosts/casino similarity index 100% rename from Zhosts/casino rename to krebs/Zhosts/casino diff --git a/Zhosts/cat1 b/krebs/Zhosts/cat1 similarity index 100% rename from Zhosts/cat1 rename to krebs/Zhosts/cat1 diff --git a/Zhosts/cband b/krebs/Zhosts/cband similarity index 100% rename from Zhosts/cband rename to krebs/Zhosts/cband diff --git a/Zhosts/cd b/krebs/Zhosts/cd similarity index 100% rename from Zhosts/cd rename to krebs/Zhosts/cd diff --git a/Zhosts/cloudkrebs b/krebs/Zhosts/cloudkrebs similarity index 100% rename from Zhosts/cloudkrebs rename to krebs/Zhosts/cloudkrebs diff --git a/Zhosts/darth b/krebs/Zhosts/darth similarity index 100% rename from Zhosts/darth rename to krebs/Zhosts/darth diff --git a/Zhosts/dei b/krebs/Zhosts/dei similarity index 100% rename from Zhosts/dei rename to krebs/Zhosts/dei diff --git a/Zhosts/destroy b/krebs/Zhosts/destroy similarity index 100% rename from Zhosts/destroy rename to krebs/Zhosts/destroy diff --git a/Zhosts/devstar b/krebs/Zhosts/devstar similarity index 100% rename from Zhosts/devstar rename to krebs/Zhosts/devstar diff --git a/Zhosts/eigenserv b/krebs/Zhosts/eigenserv similarity index 100% rename from Zhosts/eigenserv rename to krebs/Zhosts/eigenserv diff --git a/Zhosts/elvis b/krebs/Zhosts/elvis similarity index 100% rename from Zhosts/elvis rename to krebs/Zhosts/elvis diff --git a/Zhosts/eulerwalk b/krebs/Zhosts/eulerwalk similarity index 100% rename from Zhosts/eulerwalk rename to krebs/Zhosts/eulerwalk diff --git a/Zhosts/exile b/krebs/Zhosts/exile similarity index 100% rename from Zhosts/exile rename to krebs/Zhosts/exile diff --git a/Zhosts/exitium_mobilis b/krebs/Zhosts/exitium_mobilis similarity index 100% rename from Zhosts/exitium_mobilis rename to krebs/Zhosts/exitium_mobilis diff --git a/Zhosts/falk b/krebs/Zhosts/falk similarity index 100% rename from Zhosts/falk rename to krebs/Zhosts/falk diff --git a/Zhosts/fastpoke b/krebs/Zhosts/fastpoke similarity index 100% rename from Zhosts/fastpoke rename to krebs/Zhosts/fastpoke diff --git a/Zhosts/filebitch b/krebs/Zhosts/filebitch similarity index 100% rename from Zhosts/filebitch rename to krebs/Zhosts/filebitch diff --git a/Zhosts/filepimp b/krebs/Zhosts/filepimp similarity index 100% rename from Zhosts/filepimp rename to krebs/Zhosts/filepimp diff --git a/Zhosts/flap b/krebs/Zhosts/flap similarity index 100% rename from Zhosts/flap rename to krebs/Zhosts/flap diff --git a/Zhosts/foobar b/krebs/Zhosts/foobar similarity index 100% rename from Zhosts/foobar rename to krebs/Zhosts/foobar diff --git a/Zhosts/fuerkrebs b/krebs/Zhosts/fuerkrebs similarity index 100% rename from Zhosts/fuerkrebs rename to krebs/Zhosts/fuerkrebs diff --git a/Zhosts/go b/krebs/Zhosts/go similarity index 100% rename from Zhosts/go rename to krebs/Zhosts/go diff --git a/Zhosts/gum b/krebs/Zhosts/gum similarity index 100% rename from Zhosts/gum rename to krebs/Zhosts/gum diff --git a/Zhosts/heidi b/krebs/Zhosts/heidi similarity index 100% rename from Zhosts/heidi rename to krebs/Zhosts/heidi diff --git a/Zhosts/horisa b/krebs/Zhosts/horisa similarity index 100% rename from Zhosts/horisa rename to krebs/Zhosts/horisa diff --git a/Zhosts/horreum_magnus b/krebs/Zhosts/horreum_magnus similarity index 100% rename from Zhosts/horreum_magnus rename to krebs/Zhosts/horreum_magnus diff --git a/Zhosts/incept b/krebs/Zhosts/incept similarity index 100% rename from Zhosts/incept rename to krebs/Zhosts/incept diff --git a/Zhosts/ire b/krebs/Zhosts/ire similarity index 100% rename from Zhosts/ire rename to krebs/Zhosts/ire diff --git a/Zhosts/ire2 b/krebs/Zhosts/ire2 similarity index 100% rename from Zhosts/ire2 rename to krebs/Zhosts/ire2 diff --git a/Zhosts/irkel b/krebs/Zhosts/irkel similarity index 100% rename from Zhosts/irkel rename to krebs/Zhosts/irkel diff --git a/Zhosts/juhulian b/krebs/Zhosts/juhulian similarity index 100% rename from Zhosts/juhulian rename to krebs/Zhosts/juhulian diff --git a/Zhosts/k2 b/krebs/Zhosts/k2 similarity index 100% rename from Zhosts/k2 rename to krebs/Zhosts/k2 diff --git a/Zhosts/kabinett b/krebs/Zhosts/kabinett similarity index 100% rename from Zhosts/kabinett rename to krebs/Zhosts/kabinett diff --git a/Zhosts/kaepsele b/krebs/Zhosts/kaepsele similarity index 100% rename from Zhosts/kaepsele rename to krebs/Zhosts/kaepsele diff --git a/Zhosts/kalle b/krebs/Zhosts/kalle similarity index 100% rename from Zhosts/kalle rename to krebs/Zhosts/kalle diff --git a/Zhosts/karthus b/krebs/Zhosts/karthus similarity index 100% rename from Zhosts/karthus rename to krebs/Zhosts/karthus diff --git a/Zhosts/khackplug b/krebs/Zhosts/khackplug similarity index 100% rename from Zhosts/khackplug rename to krebs/Zhosts/khackplug diff --git a/Zhosts/kheurop b/krebs/Zhosts/kheurop similarity index 100% rename from Zhosts/kheurop rename to krebs/Zhosts/kheurop diff --git a/Zhosts/kiosk b/krebs/Zhosts/kiosk similarity index 100% rename from Zhosts/kiosk rename to krebs/Zhosts/kiosk diff --git a/Zhosts/krebsplug b/krebs/Zhosts/krebsplug similarity index 100% rename from Zhosts/krebsplug rename to krebs/Zhosts/krebsplug diff --git a/Zhosts/kvasir b/krebs/Zhosts/kvasir similarity index 100% rename from Zhosts/kvasir rename to krebs/Zhosts/kvasir diff --git a/Zhosts/laqueus b/krebs/Zhosts/laqueus similarity index 100% rename from Zhosts/laqueus rename to krebs/Zhosts/laqueus diff --git a/Zhosts/linuxatom b/krebs/Zhosts/linuxatom similarity index 100% rename from Zhosts/linuxatom rename to krebs/Zhosts/linuxatom diff --git a/Zhosts/luminos b/krebs/Zhosts/luminos similarity index 100% rename from Zhosts/luminos rename to krebs/Zhosts/luminos diff --git a/Zhosts/machine b/krebs/Zhosts/machine similarity index 100% rename from Zhosts/machine rename to krebs/Zhosts/machine diff --git a/Zhosts/makalu b/krebs/Zhosts/makalu similarity index 100% rename from Zhosts/makalu rename to krebs/Zhosts/makalu diff --git a/Zhosts/mako b/krebs/Zhosts/mako similarity index 100% rename from Zhosts/mako rename to krebs/Zhosts/mako diff --git a/Zhosts/miefda0 b/krebs/Zhosts/miefda0 similarity index 100% rename from Zhosts/miefda0 rename to krebs/Zhosts/miefda0 diff --git a/Zhosts/minikrebs b/krebs/Zhosts/minikrebs similarity index 100% rename from Zhosts/minikrebs rename to krebs/Zhosts/minikrebs diff --git a/Zhosts/mkdir b/krebs/Zhosts/mkdir similarity index 100% rename from Zhosts/mkdir rename to krebs/Zhosts/mkdir diff --git a/Zhosts/monitor b/krebs/Zhosts/monitor similarity index 100% rename from Zhosts/monitor rename to krebs/Zhosts/monitor diff --git a/Zhosts/mors b/krebs/Zhosts/mors similarity index 100% rename from Zhosts/mors rename to krebs/Zhosts/mors diff --git a/Zhosts/motor b/krebs/Zhosts/motor similarity index 100% rename from Zhosts/motor rename to krebs/Zhosts/motor diff --git a/Zhosts/mu b/krebs/Zhosts/mu similarity index 100% rename from Zhosts/mu rename to krebs/Zhosts/mu diff --git a/Zhosts/muhbaasu b/krebs/Zhosts/muhbaasu similarity index 100% rename from Zhosts/muhbaasu rename to krebs/Zhosts/muhbaasu diff --git a/Zhosts/nomic b/krebs/Zhosts/nomic similarity index 100% rename from Zhosts/nomic rename to krebs/Zhosts/nomic diff --git a/Zhosts/nomic2 b/krebs/Zhosts/nomic2 similarity index 100% rename from Zhosts/nomic2 rename to krebs/Zhosts/nomic2 diff --git a/Zhosts/nukular b/krebs/Zhosts/nukular similarity index 100% rename from Zhosts/nukular rename to krebs/Zhosts/nukular diff --git a/Zhosts/omo b/krebs/Zhosts/omo similarity index 100% rename from Zhosts/omo rename to krebs/Zhosts/omo diff --git a/Zhosts/pic b/krebs/Zhosts/pic similarity index 100% rename from Zhosts/pic rename to krebs/Zhosts/pic diff --git a/Zhosts/pigstarter b/krebs/Zhosts/pigstarter similarity index 100% rename from Zhosts/pigstarter rename to krebs/Zhosts/pigstarter diff --git a/Zhosts/pike b/krebs/Zhosts/pike similarity index 100% rename from Zhosts/pike rename to krebs/Zhosts/pike diff --git a/Zhosts/pnp b/krebs/Zhosts/pnp similarity index 100% rename from Zhosts/pnp rename to krebs/Zhosts/pnp diff --git a/Zhosts/pornocauster b/krebs/Zhosts/pornocauster similarity index 100% rename from Zhosts/pornocauster rename to krebs/Zhosts/pornocauster diff --git a/Zhosts/radiotuxmini b/krebs/Zhosts/radiotuxmini similarity index 100% rename from Zhosts/radiotuxmini rename to krebs/Zhosts/radiotuxmini diff --git a/Zhosts/random b/krebs/Zhosts/random similarity index 100% rename from Zhosts/random rename to krebs/Zhosts/random diff --git a/Zhosts/raspafari b/krebs/Zhosts/raspafari similarity index 100% rename from Zhosts/raspafari rename to krebs/Zhosts/raspafari diff --git a/Zhosts/reimae b/krebs/Zhosts/reimae similarity index 100% rename from Zhosts/reimae rename to krebs/Zhosts/reimae diff --git a/Zhosts/rmdir b/krebs/Zhosts/rmdir similarity index 100% rename from Zhosts/rmdir rename to krebs/Zhosts/rmdir diff --git a/Zhosts/robchina b/krebs/Zhosts/robchina similarity index 100% rename from Zhosts/robchina rename to krebs/Zhosts/robchina diff --git a/Zhosts/rockit b/krebs/Zhosts/rockit similarity index 100% rename from Zhosts/rockit rename to krebs/Zhosts/rockit diff --git a/Zhosts/rtjure_debian_oder_so b/krebs/Zhosts/rtjure_debian_oder_so similarity index 100% rename from Zhosts/rtjure_debian_oder_so rename to krebs/Zhosts/rtjure_debian_oder_so diff --git a/Zhosts/rtjure_ras b/krebs/Zhosts/rtjure_ras similarity index 100% rename from Zhosts/rtjure_ras rename to krebs/Zhosts/rtjure_ras diff --git a/Zhosts/rtjure_rdrlab_linkstation b/krebs/Zhosts/rtjure_rdrlab_linkstation similarity index 100% rename from Zhosts/rtjure_rdrlab_linkstation rename to krebs/Zhosts/rtjure_rdrlab_linkstation diff --git a/Zhosts/rubus b/krebs/Zhosts/rubus similarity index 100% rename from Zhosts/rubus rename to krebs/Zhosts/rubus diff --git a/Zhosts/senderechner b/krebs/Zhosts/senderechner similarity index 100% rename from Zhosts/senderechner rename to krebs/Zhosts/senderechner diff --git a/Zhosts/serenity b/krebs/Zhosts/serenity similarity index 100% rename from Zhosts/serenity rename to krebs/Zhosts/serenity diff --git a/Zhosts/seruundroid b/krebs/Zhosts/seruundroid similarity index 100% rename from Zhosts/seruundroid rename to krebs/Zhosts/seruundroid diff --git a/Zhosts/sir_krebs_a_lot b/krebs/Zhosts/sir_krebs_a_lot similarity index 100% rename from Zhosts/sir_krebs_a_lot rename to krebs/Zhosts/sir_krebs_a_lot diff --git a/Zhosts/skirfir b/krebs/Zhosts/skirfir similarity index 100% rename from Zhosts/skirfir rename to krebs/Zhosts/skirfir diff --git a/Zhosts/sleipnir b/krebs/Zhosts/sleipnir similarity index 100% rename from Zhosts/sleipnir rename to krebs/Zhosts/sleipnir diff --git a/Zhosts/smove b/krebs/Zhosts/smove similarity index 100% rename from Zhosts/smove rename to krebs/Zhosts/smove diff --git a/Zhosts/sokrates b/krebs/Zhosts/sokrates similarity index 100% rename from Zhosts/sokrates rename to krebs/Zhosts/sokrates diff --git a/Zhosts/sokrateslaptop b/krebs/Zhosts/sokrateslaptop similarity index 100% rename from Zhosts/sokrateslaptop rename to krebs/Zhosts/sokrateslaptop diff --git a/Zhosts/soundflower b/krebs/Zhosts/soundflower similarity index 100% rename from Zhosts/soundflower rename to krebs/Zhosts/soundflower diff --git a/Zhosts/steve b/krebs/Zhosts/steve similarity index 100% rename from Zhosts/steve rename to krebs/Zhosts/steve diff --git a/Zhosts/tahoe b/krebs/Zhosts/tahoe similarity index 100% rename from Zhosts/tahoe rename to krebs/Zhosts/tahoe diff --git a/Zhosts/taschenkrebs b/krebs/Zhosts/taschenkrebs similarity index 100% rename from Zhosts/taschenkrebs rename to krebs/Zhosts/taschenkrebs diff --git a/Zhosts/terrapi b/krebs/Zhosts/terrapi similarity index 100% rename from Zhosts/terrapi rename to krebs/Zhosts/terrapi diff --git a/Zhosts/thomasDOTde b/krebs/Zhosts/thomasDOTde similarity index 100% rename from Zhosts/thomasDOTde rename to krebs/Zhosts/thomasDOTde diff --git a/Zhosts/tincdroid b/krebs/Zhosts/tincdroid similarity index 100% rename from Zhosts/tincdroid rename to krebs/Zhosts/tincdroid diff --git a/Zhosts/tmpd b/krebs/Zhosts/tmpd similarity index 100% rename from Zhosts/tmpd rename to krebs/Zhosts/tmpd diff --git a/Zhosts/tpsw b/krebs/Zhosts/tpsw similarity index 100% rename from Zhosts/tpsw rename to krebs/Zhosts/tpsw diff --git a/Zhosts/tsp b/krebs/Zhosts/tsp similarity index 100% rename from Zhosts/tsp rename to krebs/Zhosts/tsp diff --git a/Zhosts/ufo b/krebs/Zhosts/ufo similarity index 100% rename from Zhosts/ufo rename to krebs/Zhosts/ufo diff --git a/Zhosts/uriel b/krebs/Zhosts/uriel similarity index 100% rename from Zhosts/uriel rename to krebs/Zhosts/uriel diff --git a/Zhosts/vault b/krebs/Zhosts/vault similarity index 100% rename from Zhosts/vault rename to krebs/Zhosts/vault diff --git a/Zhosts/voyager b/krebs/Zhosts/voyager similarity index 100% rename from Zhosts/voyager rename to krebs/Zhosts/voyager diff --git a/Zhosts/wooktop b/krebs/Zhosts/wooktop similarity index 100% rename from Zhosts/wooktop rename to krebs/Zhosts/wooktop diff --git a/Zhosts/wu b/krebs/Zhosts/wu similarity index 100% rename from Zhosts/wu rename to krebs/Zhosts/wu diff --git a/Zhosts/ytart b/krebs/Zhosts/ytart similarity index 100% rename from Zhosts/ytart rename to krebs/Zhosts/ytart diff --git a/Zhosts/zombiecancer b/krebs/Zhosts/zombiecancer similarity index 100% rename from Zhosts/zombiecancer rename to krebs/Zhosts/zombiecancer diff --git a/Zpubkeys/deploy_wu.ssh.pub b/krebs/Zpubkeys/deploy_wu.ssh.pub similarity index 100% rename from Zpubkeys/deploy_wu.ssh.pub rename to krebs/Zpubkeys/deploy_wu.ssh.pub diff --git a/Zpubkeys/lass.ssh.pub b/krebs/Zpubkeys/lass.ssh.pub similarity index 100% rename from Zpubkeys/lass.ssh.pub rename to krebs/Zpubkeys/lass.ssh.pub diff --git a/Zpubkeys/makefu_arch.ssh.pub b/krebs/Zpubkeys/makefu_arch.ssh.pub similarity index 100% rename from Zpubkeys/makefu_arch.ssh.pub rename to krebs/Zpubkeys/makefu_arch.ssh.pub diff --git a/Zpubkeys/makefu_omo.ssh.pub b/krebs/Zpubkeys/makefu_omo.ssh.pub similarity index 100% rename from Zpubkeys/makefu_omo.ssh.pub rename to krebs/Zpubkeys/makefu_omo.ssh.pub diff --git a/Zpubkeys/makefu_tsp.ssh.pub b/krebs/Zpubkeys/makefu_tsp.ssh.pub similarity index 100% rename from Zpubkeys/makefu_tsp.ssh.pub rename to krebs/Zpubkeys/makefu_tsp.ssh.pub diff --git a/Zpubkeys/mv_vod.ssh.pub b/krebs/Zpubkeys/mv_vod.ssh.pub similarity index 100% rename from Zpubkeys/mv_vod.ssh.pub rename to krebs/Zpubkeys/mv_vod.ssh.pub diff --git a/Zpubkeys/tv_wu.ssh.pub b/krebs/Zpubkeys/tv_wu.ssh.pub similarity index 100% rename from Zpubkeys/tv_wu.ssh.pub rename to krebs/Zpubkeys/tv_wu.ssh.pub diff --git a/Zpubkeys/uriel.ssh.pub b/krebs/Zpubkeys/uriel.ssh.pub similarity index 100% rename from Zpubkeys/uriel.ssh.pub rename to krebs/Zpubkeys/uriel.ssh.pub diff --git a/tv/1systems/cd.nix b/tv/1systems/cd.nix index 0049387be..03c375b9b 100644 --- a/tv/1systems/cd.nix +++ b/tv/1systems/cd.nix @@ -31,7 +31,7 @@ with lib; imports = [ ../2configs/charybdis.nix ]; tv.charybdis = { enable = true; - sslCert = ../../Zcerts/charybdis_cd.crt.pem; + sslCert = ../Zcerts/charybdis_cd.crt.pem; }; } { diff --git a/Zcerts/charybdis_cd.crt.pem b/tv/Zcerts/charybdis_cd.crt.pem similarity index 100% rename from Zcerts/charybdis_cd.crt.pem rename to tv/Zcerts/charybdis_cd.crt.pem From 6def9f2d6ba957d068f0d1f0f267247b8e9a89f8 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 29 Aug 2015 08:29:35 +0200 Subject: [PATCH 16/37] krebs pkgs pssh: init --- krebs/5pkgs/default.nix | 1 + krebs/5pkgs/pssh/default.nix | 37 ++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 krebs/5pkgs/pssh/default.nix diff --git a/krebs/5pkgs/default.nix b/krebs/5pkgs/default.nix index 71bee3fa2..500d5fe25 100644 --- a/krebs/5pkgs/default.nix +++ b/krebs/5pkgs/default.nix @@ -18,6 +18,7 @@ rec { much = callPackage ./much {}; nq = callPackage ./nq {}; posix-array = callPackage ./posix-array {}; + pssh = callPackage ./pssh {}; youtube-tools = callPackage ./youtube-tools {}; execve = name: { filename, argv, envp ? {}, destination ? "" }: diff --git a/krebs/5pkgs/pssh/default.nix b/krebs/5pkgs/pssh/default.nix new file mode 100644 index 000000000..fd48d3e7c --- /dev/null +++ b/krebs/5pkgs/pssh/default.nix @@ -0,0 +1,37 @@ +{ writeScriptBin }: + +writeScriptBin "pssh" '' + #! /bin/sh + set -efu + case ''${1-} in + + # TODO create plog with -o json | jq ... | map date + + # usage: pssh {-j,--journal} host... + # Follow journal at each host. + -j|--journal) + shift + "$0" journalctl -n0 -ocat --follow --all ::: "$@" \ + | while read line; do + printf '%s %s\n' "$(date --rfc-3339=s)" "$line" + done + ;; + + -*) + echo $0: unknown option: $1 >&2 + exit 1 + ;; + + # usage: pssh command [arg...] ::: host... + # Run command at each host. + *) + exec parallel \ + --line-buffer \ + -j0 \ + --no-notice \ + --tagstring {} \ + ssh -T {} "$@" + ;; + + esac +'' From 0c09572004675aa8ac4a3aab252dc373f045ce76 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 29 Aug 2015 08:30:16 +0200 Subject: [PATCH 17/37] tv wu systemPackages += pssh --- tv/1systems/wu.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/tv/1systems/wu.nix b/tv/1systems/wu.nix index 622fd721a..da60738e6 100644 --- a/tv/1systems/wu.nix +++ b/tv/1systems/wu.nix @@ -86,6 +86,7 @@ with lib; p7zip pavucontrol posix_man_pages + pssh qrencode sxiv texLive From bf2ef5c76ba3ee84a067b26da40334a4dd192be4 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 29 Aug 2015 08:57:53 +0200 Subject: [PATCH 18/37] tv {cd,nomic} += ntp --- tv/1systems/cd.nix | 1 + tv/1systems/nomic.nix | 1 + 2 files changed, 2 insertions(+) diff --git a/tv/1systems/cd.nix b/tv/1systems/cd.nix index 03c375b9b..bb8124576 100644 --- a/tv/1systems/cd.nix +++ b/tv/1systems/cd.nix @@ -167,6 +167,7 @@ with lib; iptables mutt # for mv nethogs + ntp # ntpate rxvt_unicode.terminfo tcpdump ]; diff --git a/tv/1systems/nomic.nix b/tv/1systems/nomic.nix index 028e53539..7010e68b4 100644 --- a/tv/1systems/nomic.nix +++ b/tv/1systems/nomic.nix @@ -112,6 +112,7 @@ with lib; exit 23 esac '') + ntp # ntpate rxvt_unicode.terminfo tmux ]; From 83f06535de527c7470f8ff9c8b5e3a4632cf7cb9 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 29 Aug 2015 09:02:00 +0200 Subject: [PATCH 19/37] tv {cd,nomic,wu}: disable consul --- tv/1systems/cd.nix | 2 +- tv/1systems/nomic.nix | 2 +- tv/1systems/wu.nix | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tv/1systems/cd.nix b/tv/1systems/cd.nix index bb8124576..b385848f1 100644 --- a/tv/1systems/cd.nix +++ b/tv/1systems/cd.nix @@ -25,7 +25,7 @@ with lib; ../2configs/CAC-Developer-2.nix ../2configs/CAC-CentOS-7-64bit.nix ../2configs/base.nix - ../2configs/consul-server.nix + #../2configs/consul-server.nix ../2configs/git.nix { imports = [ ../2configs/charybdis.nix ]; diff --git a/tv/1systems/nomic.nix b/tv/1systems/nomic.nix index 7010e68b4..f08e74bbe 100644 --- a/tv/1systems/nomic.nix +++ b/tv/1systems/nomic.nix @@ -24,7 +24,7 @@ with lib; imports = [ ../2configs/AO753.nix ../2configs/base.nix - ../2configs/consul-server.nix + #../2configs/consul-server.nix ../2configs/git.nix { tv.iptables = { diff --git a/tv/1systems/wu.nix b/tv/1systems/wu.nix index da60738e6..6cd1565f7 100644 --- a/tv/1systems/wu.nix +++ b/tv/1systems/wu.nix @@ -24,7 +24,7 @@ with lib; imports = [ ../2configs/w110er.nix ../2configs/base.nix - ../2configs/consul-client.nix + #../2configs/consul-client.nix ../2configs/git.nix ../2configs/mail-client.nix ../2configs/xserver.nix From 0acd7f23e1e3adf4bf1427f186a7bf5505ff910d Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 31 Aug 2015 10:47:22 +0200 Subject: [PATCH 20/37] makefu: cleanup --- makefu/2configs/tp-x220.nix | 5 +---- makefu/2configs/tp-x2x0.nix | 10 +++++++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/makefu/2configs/tp-x220.nix b/makefu/2configs/tp-x220.nix index 94e51f726..f03922150 100644 --- a/makefu/2configs/tp-x220.nix +++ b/makefu/2configs/tp-x220.nix @@ -7,14 +7,11 @@ with lib; boot.kernelModules = [ "kvm-intel" ]; - #services.xserver.vaapiDrivers = [pkgs.vaapiIntel pkgs.vaapiVdpau ]; - services.xserver = { videoDriver = "intel"; - vaapiDrivers = [ pkgs.vaapiIntel ]; + vaapiDrivers = [ pkgs.vaapiIntel pkgs.vaapiVdpau ]; deviceSection = '' Option "AccelMethod" "sna" - BusID "PCI:0:2:0" ''; }; diff --git a/makefu/2configs/tp-x2x0.nix b/makefu/2configs/tp-x2x0.nix index b79d94b4a..aa2fc2050 100644 --- a/makefu/2configs/tp-x2x0.nix +++ b/makefu/2configs/tp-x2x0.nix @@ -11,9 +11,13 @@ with lib; zramSwap.enable = true; zramSwap.numDevices = 2; - hardware.trackpoint.enable = true; - hardware.trackpoint.sensitivity = 220; - hardware.trackpoint.speed = 220; + hardware.trackpoint = { + enable = true; + sensitivity = 220; + speed = 220; + emulateWheel = true; + }; + services.tlp.enable = true; services.tlp.extraConfig = '' From cbac1a75959c96d37f6c24a38efce19e88dadca2 Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 31 Aug 2015 10:59:28 +0200 Subject: [PATCH 21/37] makefu: merge /Z -> krebs/Z --- makefu/1systems/repunit.nix | 2 +- makefu/2configs/cgit-retiolum.nix | 4 ++-- makefu/2configs/tinc-basic-retiolum.nix | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/makefu/1systems/repunit.nix b/makefu/1systems/repunit.nix index 503fe8f65..d98ff17c1 100644 --- a/makefu/1systems/repunit.nix +++ b/makefu/1systems/repunit.nix @@ -49,7 +49,7 @@ }; krebs.retiolum = { enable = true; - hosts = ../../Zhosts; + hosts = ../../krebs/Zhosts; connectTo = [ "gum" "pigstarter" diff --git a/makefu/2configs/cgit-retiolum.nix b/makefu/2configs/cgit-retiolum.nix index 8d9439569..a40dabb3f 100644 --- a/makefu/2configs/cgit-retiolum.nix +++ b/makefu/2configs/cgit-retiolum.nix @@ -63,11 +63,11 @@ in { imports = [{ krebs.users.makefu-omo = { name = "makefu-omo" ; - pubkey= with builtins; readFile ../../Zpubkeys/makefu_omo.ssh.pub; + pubkey= with builtins; readFile ../../krebs/Zpubkeys/makefu_omo.ssh.pub; }; krebs.users.makefu-tsp = { name = "makefu-tsp" ; - pubkey= with builtins; readFile ../../Zpubkeys/makefu_tsp.ssh.pub; + pubkey= with builtins; readFile ../../krebs/Zpubkeys/makefu_tsp.ssh.pub; }; }]; krebs.git = { diff --git a/makefu/2configs/tinc-basic-retiolum.nix b/makefu/2configs/tinc-basic-retiolum.nix index cb1991bd6..fd6d1683d 100644 --- a/makefu/2configs/tinc-basic-retiolum.nix +++ b/makefu/2configs/tinc-basic-retiolum.nix @@ -4,7 +4,7 @@ with lib; { krebs.retiolum = { enable = true; - hosts = ../../Zhosts; + hosts = ../../krebs/Zhosts; connectTo = [ "gum" "pigstarter" From 0f50750e254c22153cb7024e79181661f98d1b33 Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 31 Aug 2015 14:22:21 +0200 Subject: [PATCH 22/37] Reaktor: initial commit at 0.3.5 --- krebs/3modules/Reaktor.nix | 97 +++++++++++++++++++++++++++++++++ krebs/3modules/default.nix | 1 + krebs/5pkgs/Reaktor/default.nix | 19 +++++++ krebs/5pkgs/default.nix | 1 + 4 files changed, 118 insertions(+) create mode 100644 krebs/3modules/Reaktor.nix create mode 100644 krebs/5pkgs/Reaktor/default.nix diff --git a/krebs/3modules/Reaktor.nix b/krebs/3modules/Reaktor.nix new file mode 100644 index 000000000..2ca7a0ee3 --- /dev/null +++ b/krebs/3modules/Reaktor.nix @@ -0,0 +1,97 @@ +{ config, pkgs,lib, ... }: + + +let + kpkgs = import ../5pkgs { inherit pkgs; inherit lib; }; + + inherit (lib) + mkIf + mkOption + types + singleton + isString + optionalString + concatStrings + ; + + ReaktorConfig = mkIf ( isString cfg.extraConfig ) pkgs.writeText "config.py" cfg.extraConfig; + cfg = config.krebs.Reaktor; + + out = { + options.krebs.Reaktor = api; + config = mkIf cfg.enable imp; + }; + + api = { + enable = mkOption { + default = false; + description = '' + Start Reaktor at system boot + ''; + }; + + nickname = mkOption { + default = config.krebs.build.host.name + "|r"; + type = types.str; + description = '' + The nick name of the irc bot. + Defaults to {hostname}|r + ''; + }; + + + extraConfig = mkOption { + default = null; + type = types.nullOr types.str; + description = '' + configuration to be used instead of default ones. + Reaktor default cfg can be retrieved via `reaktor get-config` + ''; + }; + + ReaktorPkg = mkOption { + default = kpkgs.Reaktor; + description = '' + the Reaktor pkg to use. + ''; + }; + }; + + imp = { + # for reaktor get-config + environment.systemPackages = [ cfg.ReaktorPkg ]; + + users.extraUsers = singleton { + name = "Reaktor"; + # uid = config.ids.uids.Reaktor; + uid = 2066439104; #genid Reaktor + description = "Reaktor user"; + home = "/var/lib/Reaktor"; + createHome = true; + }; + + #users.extraGroups = singleton { + # name = "Reaktor"; + # gid = config.ids.gids.Reaktor; + #}; + + systemd.services.Reaktor = { + path = with pkgs; [ + utillinux #flock for tell_on-join + # git # for nag + python # for caps + ]; + description = "Reaktor IRC Bot"; + after = [ "network.target" ]; + wantedBy = [ "multi-user.target" ]; + serviceConfig.User = "Reaktor"; + environment = { + GIT_SSL_CAINFO = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"; + IRC_NICKNAME = cfg.nickname; + }; + serviceConfig.ExecStart = "${cfg.ReaktorPkg}/bin/reaktor run ${if (isString cfg.extraConfig) then cfg.ReaktorConfig else ""}"; + }; + }; + +in +out diff --git a/krebs/3modules/default.nix b/krebs/3modules/default.nix index 5f338df62..16ed92170 100644 --- a/krebs/3modules/default.nix +++ b/krebs/3modules/default.nix @@ -11,6 +11,7 @@ let ./github-hosts-sync.nix ./git.nix ./nginx.nix + ./Reaktor.nix ./retiolum.nix ./urlwatch.nix ]; diff --git a/krebs/5pkgs/Reaktor/default.nix b/krebs/5pkgs/Reaktor/default.nix new file mode 100644 index 000000000..54e88d939 --- /dev/null +++ b/krebs/5pkgs/Reaktor/default.nix @@ -0,0 +1,19 @@ +{ lib, pkgs,buildPythonPackage,fetchurl, ... }: + +buildPythonPackage rec { + name = "Reaktor-${version}"; + version = "0.3.5"; + propagatedBuildInputs = with pkgs;[ + pythonPackages.docopt + pythonPackages.requests + ]; + src = fetchurl { + url = "https://pypi.python.org/packages/source/R/Reaktor/Reaktor-${version}.tar.gz"; + sha256 = "1bi92hbm5f4z87biklh8lpjrmfhrdrj7x2hr64lkxpcabgs8kgyh"; + }; + meta = { + homepage = http://krebsco.de/; + description = "An IRC bot based on asynchat"; + license = lib.licenses.wtfpl; + }; +} diff --git a/krebs/5pkgs/default.nix b/krebs/5pkgs/default.nix index 500d5fe25..b42101820 100644 --- a/krebs/5pkgs/default.nix +++ b/krebs/5pkgs/default.nix @@ -19,6 +19,7 @@ rec { nq = callPackage ./nq {}; posix-array = callPackage ./posix-array {}; pssh = callPackage ./pssh {}; + Reaktor = callPackage ./Reaktor {}; youtube-tools = callPackage ./youtube-tools {}; execve = name: { filename, argv, envp ? {}, destination ? "" }: From 4d917dfa98d1a324a73e3290d553114e7047a621 Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 31 Aug 2015 14:25:27 +0200 Subject: [PATCH 23/37] makefu: enable Reaktor for pnp --- makefu/1systems/pnp.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/makefu/1systems/pnp.nix b/makefu/1systems/pnp.nix index 963d07744..bbb99390d 100644 --- a/makefu/1systems/pnp.nix +++ b/makefu/1systems/pnp.nix @@ -21,6 +21,8 @@ krebs.build.user = config.krebs.users.makefu; krebs.build.target = "root@pnp"; + krebs.Reaktor.enable = true; + krebs.build.deps = { nixpkgs = { url = https://github.com/NixOS/nixpkgs; From ba2cb6c3a865780263125558fa07bf4299f62335 Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 31 Aug 2015 19:44:10 +0200 Subject: [PATCH 24/37] reaktor: py3k --- krebs/5pkgs/Reaktor/default.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/krebs/5pkgs/Reaktor/default.nix b/krebs/5pkgs/Reaktor/default.nix index 54e88d939..5dd18f895 100644 --- a/krebs/5pkgs/Reaktor/default.nix +++ b/krebs/5pkgs/Reaktor/default.nix @@ -1,15 +1,15 @@ -{ lib, pkgs,buildPythonPackage,fetchurl, ... }: +{ lib, pkgs,python3Packages,fetchurl, ... }: -buildPythonPackage rec { +python3Packages.buildPythonPackage rec { name = "Reaktor-${version}"; - version = "0.3.5"; + version = "0.4.0"; propagatedBuildInputs = with pkgs;[ - pythonPackages.docopt - pythonPackages.requests + python3Packages.docopt + python3Packages.requests ]; src = fetchurl { url = "https://pypi.python.org/packages/source/R/Reaktor/Reaktor-${version}.tar.gz"; - sha256 = "1bi92hbm5f4z87biklh8lpjrmfhrdrj7x2hr64lkxpcabgs8kgyh"; + sha256 = "0izwpq6smp86964hiddnk2bbx8g27nrzfbvdp790bjmnw6gk64nb"; }; meta = { homepage = http://krebsco.de/; From 3e581053f4a1ccf22154f46bb04acea3fe1b29ab Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 31 Aug 2015 19:55:38 +0200 Subject: [PATCH 25/37] add extraConfig and overrideConfig this allows of preserving the original config while adding bonus features --- krebs/3modules/Reaktor.nix | 40 ++++++++++++++++++++++++++++++++------ 1 file changed, 34 insertions(+), 6 deletions(-) diff --git a/krebs/3modules/Reaktor.nix b/krebs/3modules/Reaktor.nix index 2ca7a0ee3..407f1bce7 100644 --- a/krebs/3modules/Reaktor.nix +++ b/krebs/3modules/Reaktor.nix @@ -12,9 +12,17 @@ let isString optionalString concatStrings + escapeShellArg ; - ReaktorConfig = mkIf ( isString cfg.extraConfig ) pkgs.writeText "config.py" cfg.extraConfig; + ReaktorConfig = pkgs.writeText "config.py" '' + ${if (isString cfg.overrideConfig ) then '' + # Overriden Config + ${cfg.overrideConfig} + '' else ""} + ## Extra Config + ${cfg.extraConfig} + ''; cfg = config.krebs.Reaktor; out = { @@ -40,7 +48,7 @@ let }; - extraConfig = mkOption { + overrideConfig = mkOption { default = null; type = types.nullOr types.str; description = '' @@ -48,6 +56,13 @@ let Reaktor default cfg can be retrieved via `reaktor get-config` ''; }; + extraConfig = mkOption { + default = ""; + type = types.str; + description = '' + configuration appended to the default or overridden configuration + ''; + }; ReaktorPkg = mkOption { default = kpkgs.Reaktor; @@ -60,7 +75,6 @@ let imp = { # for reaktor get-config environment.systemPackages = [ cfg.ReaktorPkg ]; - users.extraUsers = singleton { name = "Reaktor"; # uid = config.ids.uids.Reaktor; @@ -84,12 +98,26 @@ let description = "Reaktor IRC Bot"; after = [ "network.target" ]; wantedBy = [ "multi-user.target" ]; - serviceConfig.User = "Reaktor"; environment = { GIT_SSL_CAINFO = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"; - IRC_NICKNAME = cfg.nickname; + REAKTOR_NICKNAME = cfg.nickname; + }; + serviceConfig= { + ExecStartPre = pkgs.writeScript "Reaktor-init" '' + #! /bin/sh + ${if (isString cfg.overrideConfig) then + ''cp ${ReaktorConfig} /tmp/config.py'' + else + ''(${cfg.ReaktorPkg}/bin/reaktor get-config;cat "${ReaktorConfig}" ) > /tmp/config.py'' + } + ''; + ExecStart = "${cfg.ReaktorPkg}/bin/reaktor run /tmp/config.py"; + PrivateTmp = "true"; + User = "Reaktor"; + Restart = "on-abort"; + #StartLimitInterval = "5m"; + #StartLimitBurst = "1"; }; - serviceConfig.ExecStart = "${cfg.ReaktorPkg}/bin/reaktor run ${if (isString cfg.extraConfig) then cfg.ReaktorConfig else ""}"; }; }; From e10d36bec7e4fb8cb82162c2e9bc86e58f2d5a0e Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 31 Aug 2015 19:56:47 +0200 Subject: [PATCH 26/37] add sample of how to extend the Reaktor config --- makefu/1systems/pornocauster.nix | 2 ++ makefu/2configs/Reaktor/simpleExtend.nix | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 makefu/2configs/Reaktor/simpleExtend.nix diff --git a/makefu/1systems/pornocauster.nix b/makefu/1systems/pornocauster.nix index 415c1af30..1e2c31257 100644 --- a/makefu/1systems/pornocauster.nix +++ b/makefu/1systems/pornocauster.nix @@ -23,6 +23,8 @@ ../2configs/virtualization.nix ../2configs/wwan.nix + ../2configs/Reaktor/simpleExtend.nix + # hardware specifics are in here ../2configs/tp-x220.nix ]; diff --git a/makefu/2configs/Reaktor/simpleExtend.nix b/makefu/2configs/Reaktor/simpleExtend.nix new file mode 100644 index 000000000..3b55ca412 --- /dev/null +++ b/makefu/2configs/Reaktor/simpleExtend.nix @@ -0,0 +1,21 @@ +{ config, lib, pkgs, ... }: + +with pkgs; +let + nixos-version-script = pkgs.writeScript "nix-version" '' + #! /bin/sh + . /etc/os-release + echo "$PRETTY_NAME" + ''; +in { + krebs.Reaktor.enable = true; + krebs.Reaktor.nickname = "test-reaktor"; + krebs.Reaktor.extraConfig = '' + public_commands.insert(0,{ + 'capname' : "nixos-version", + 'pattern' : indirect_pattern.format("nixos-version"), + 'argv' : ["${nixos-version-script}"], + 'env' : { 'state_dir': workdir } }) + ''; +} + From 444dfa388b62a5123631df6597de469077b98304 Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 31 Aug 2015 21:10:00 +0200 Subject: [PATCH 27/37] krebs:add euer.krebsco.de to pigstarter cnames --- krebs/3modules/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/krebs/3modules/default.nix b/krebs/3modules/default.nix index 16ed92170..140045b93 100644 --- a/krebs/3modules/default.nix +++ b/krebs/3modules/default.nix @@ -440,6 +440,7 @@ let IN MX 10 mx42 euer IN MX 1 aspmx.l.google.com. io IN NS pigstarter.krebsco.de. + euer IN A ${elemAt nets.internet.addrs4 0} pigstarter IN A ${elemAt nets.internet.addrs4 0} conf IN A ${elemAt nets.internet.addrs4 0} gold IN A ${elemAt nets.internet.addrs4 0} From 951b00742f9e3aeff807612fdfd6dd2fbd5f0976 Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 1 Sep 2015 12:53:32 +0200 Subject: [PATCH 28/37] add krebszones --- krebs/5pkgs/default.nix | 1 + krebs/5pkgs/krebszones/default.nix | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 krebs/5pkgs/krebszones/default.nix diff --git a/krebs/5pkgs/default.nix b/krebs/5pkgs/default.nix index b42101820..39d3d69ce 100644 --- a/krebs/5pkgs/default.nix +++ b/krebs/5pkgs/default.nix @@ -14,6 +14,7 @@ rec { github-hosts-sync = callPackage ./github-hosts-sync {}; github-known_hosts = callPackage ./github-known_hosts {}; hashPassword = callPackage ./hashPassword {}; + krebszones = callPackage ./krebszones {}; lentil = callPackage ./lentil {}; much = callPackage ./much {}; nq = callPackage ./nq {}; diff --git a/krebs/5pkgs/krebszones/default.nix b/krebs/5pkgs/krebszones/default.nix new file mode 100644 index 000000000..83a06f768 --- /dev/null +++ b/krebs/5pkgs/krebszones/default.nix @@ -0,0 +1,20 @@ +{ lib, pkgs,python3Packages,fetchurl, ... }: + +python3Packages.buildPythonPackage rec { + name = "krebs-zones"; + version = "0.4.2"; + propagatedBuildInputs = with pkgs;[ + python3Packages.d2to1 # for setup to work + python3Packages.ovh + python3Packages.docopt + ]; + src = fetchurl { + url = "https://pypi.python.org/packages/source/k/krebszones/krebszones-${version}.tar.gz"; + sha256 = "0mmz2camqcmv8pppwbzd2v986v07620dg6p5d9v094v8ij1bdlfk"; + }; + meta = { + homepage = http://krebsco.de/; + description = "OVH Zone Upload"; + license = lib.licenses.wtfpl; + }; +} From b60eafb2e22de4d79da7b1d5a3679873a69bf828 Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 1 Sep 2015 13:10:19 +0200 Subject: [PATCH 29/37] fix reaktor dependencies --- krebs/5pkgs/Reaktor/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/krebs/5pkgs/Reaktor/default.nix b/krebs/5pkgs/Reaktor/default.nix index 5dd18f895..0619d232b 100644 --- a/krebs/5pkgs/Reaktor/default.nix +++ b/krebs/5pkgs/Reaktor/default.nix @@ -5,7 +5,7 @@ python3Packages.buildPythonPackage rec { version = "0.4.0"; propagatedBuildInputs = with pkgs;[ python3Packages.docopt - python3Packages.requests + python3Packages.requests2 ]; src = fetchurl { url = "https://pypi.python.org/packages/source/R/Reaktor/Reaktor-${version}.tar.gz"; From dc471ef625c132c2fe73a31bbe94e75d782a1880 Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 1 Sep 2015 15:16:46 +0200 Subject: [PATCH 30/37] krebszones: fix names --- krebs/5pkgs/krebszones/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/krebs/5pkgs/krebszones/default.nix b/krebs/5pkgs/krebszones/default.nix index 83a06f768..e556aa477 100644 --- a/krebs/5pkgs/krebszones/default.nix +++ b/krebs/5pkgs/krebszones/default.nix @@ -1,7 +1,7 @@ { lib, pkgs,python3Packages,fetchurl, ... }: python3Packages.buildPythonPackage rec { - name = "krebs-zones"; + name = "krebszones-${version}"; version = "0.4.2"; propagatedBuildInputs = with pkgs;[ python3Packages.d2to1 # for setup to work From f911d43005d043ca360837eb8b3c2c2fe30bc962 Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 1 Sep 2015 15:54:12 +0200 Subject: [PATCH 31/37] krebszones: bump version --- krebs/5pkgs/krebszones/default.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/krebs/5pkgs/krebszones/default.nix b/krebs/5pkgs/krebszones/default.nix index e556aa477..62805c73c 100644 --- a/krebs/5pkgs/krebszones/default.nix +++ b/krebs/5pkgs/krebszones/default.nix @@ -2,15 +2,15 @@ python3Packages.buildPythonPackage rec { name = "krebszones-${version}"; - version = "0.4.2"; - propagatedBuildInputs = with pkgs;[ - python3Packages.d2to1 # for setup to work - python3Packages.ovh - python3Packages.docopt + version = "0.4.3"; + propagatedBuildInputs = with pkgs.python3Packages;[ + d2to1 # for setup to work + ovh + docopt ]; src = fetchurl { url = "https://pypi.python.org/packages/source/k/krebszones/krebszones-${version}.tar.gz"; - sha256 = "0mmz2camqcmv8pppwbzd2v986v07620dg6p5d9v094v8ij1bdlfk"; + sha256 = "1i6aqy27bikypc4mq7ymfnvf42rr5sxiy6l7gnyk6ifhlp1jq8z5"; }; meta = { homepage = http://krebsco.de/; From 37744f0016b77af41e8f57bc6da32b15f5ac50fd Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 2 Sep 2015 10:02:05 +0200 Subject: [PATCH 32/37] makefu: sort 2configs --- makefu/1systems/pnp.nix | 6 +- makefu/1systems/pornocauster.nix | 16 ++-- makefu/1systems/tsp.nix | 4 +- makefu/2configs/fs/cac-boot-partition.nix | 23 ++++++ .../{ => fs}/sda-crypto-root-home.nix | 0 makefu/2configs/{ => fs}/sda-crypto-root.nix | 0 .../2configs/{ => fs}/vm-single-partition.nix | 0 makefu/2configs/git/brain-retiolum.nix | 77 +++++++++++++++++++ makefu/2configs/{ => git}/cgit-retiolum.nix | 6 +- makefu/2configs/{ => hw}/tp-x200.nix | 0 makefu/2configs/{ => hw}/tp-x220.nix | 0 makefu/2configs/{ => hw}/tp-x2x0.nix | 0 makefu/3modules/default.nix | 2 +- 13 files changed, 119 insertions(+), 15 deletions(-) create mode 100644 makefu/2configs/fs/cac-boot-partition.nix rename makefu/2configs/{ => fs}/sda-crypto-root-home.nix (100%) rename makefu/2configs/{ => fs}/sda-crypto-root.nix (100%) rename makefu/2configs/{ => fs}/vm-single-partition.nix (100%) create mode 100644 makefu/2configs/git/brain-retiolum.nix rename makefu/2configs/{ => git}/cgit-retiolum.nix (89%) rename makefu/2configs/{ => hw}/tp-x200.nix (100%) rename makefu/2configs/{ => hw}/tp-x220.nix (100%) rename makefu/2configs/{ => hw}/tp-x2x0.nix (100%) diff --git a/makefu/1systems/pnp.nix b/makefu/1systems/pnp.nix index bbb99390d..6ca1f1108 100644 --- a/makefu/1systems/pnp.nix +++ b/makefu/1systems/pnp.nix @@ -9,9 +9,9 @@ [ # Include the results of the hardware scan. ../2configs/base.nix - ../2configs/cgit-retiolum.nix + ../2configs/git/cgit-retiolum.nix # ../2configs/graphite-standalone.nix - ../2configs/vm-single-partition.nix + ../2configs/fs/vm-single-partition.nix ../2configs/tinc-basic-retiolum.nix ../2configs/exim-retiolum.nix @@ -26,7 +26,7 @@ krebs.build.deps = { nixpkgs = { url = https://github.com/NixOS/nixpkgs; - rev = "13576925552b1d0751498fdda22e91a055a1ff6c"; + rev = "03921972268934d900cc32dad253ff383926771c"; }; }; diff --git a/makefu/1systems/pornocauster.nix b/makefu/1systems/pornocauster.nix index 1e2c31257..4dcfe4eca 100644 --- a/makefu/1systems/pornocauster.nix +++ b/makefu/1systems/pornocauster.nix @@ -13,9 +13,7 @@ ../2configs/tinc-basic-retiolum.nix #../2configs/disable_v6.nix - #../2configs/sda-crypto-root.nix - ../2configs/sda-crypto-root-home.nix - + # environment ../2configs/zsh-user.nix # applications @@ -23,16 +21,22 @@ ../2configs/virtualization.nix ../2configs/wwan.nix - ../2configs/Reaktor/simpleExtend.nix + # services + ../2configs/git/brain-retiolum.nix + # ../2configs/Reaktor/simpleExtend.nix # hardware specifics are in here - ../2configs/tp-x220.nix + ../2configs/hw/tp-x220.nix + # mount points + ../2configs/fs/sda-crypto-root-home.nix ]; krebs.build.host = config.krebs.hosts.pornocauster; krebs.build.user = config.krebs.users.makefu; krebs.build.target = "root@pornocauster"; + #krebs.Reaktor.nickname = "makefu|r"; + networking.firewall.allowedTCPPorts = [ 25 ]; @@ -41,7 +45,7 @@ nixpkgs = { url = https://github.com/NixOS/nixpkgs; #url = https://github.com/makefu/nixpkgs; - rev = "13576925552b1d0751498fdda22e91a055a1ff6c"; + rev = "03921972268934d900cc32dad253ff383926771c"; }; }; } diff --git a/makefu/1systems/tsp.nix b/makefu/1systems/tsp.nix index 67db22460..3c2bb2eda 100644 --- a/makefu/1systems/tsp.nix +++ b/makefu/1systems/tsp.nix @@ -9,9 +9,9 @@ ../2configs/base.nix ../2configs/base-gui.nix ../2configs/tinc-basic-retiolum.nix - ../2configs/sda-crypto-root.nix + ../2configs/fs/sda-crypto-root.nix # hardware specifics are in here - ../2configs/tp-x200.nix #< imports tp-x2x0.nix + ../2configs/hw/tp-x200.nix #< imports tp-x2x0.nix ../2configs/disable_v6.nix ../2configs/rad1o.nix diff --git a/makefu/2configs/fs/cac-boot-partition.nix b/makefu/2configs/fs/cac-boot-partition.nix new file mode 100644 index 000000000..fdf4b89d8 --- /dev/null +++ b/makefu/2configs/fs/cac-boot-partition.nix @@ -0,0 +1,23 @@ +{ config, lib, pkgs, ... }: + +# vda1 ext4 (label nixos) -> only root partition +with lib; +{ + boot.loader.grub.enable = true; + boot.loader.grub.version = 2; + boot.loader.grub.device = "/dev/sda"; + + fileSystems."/" = { + device = "/dev/disk/by-label/nixos"; + fsType = "ext4"; + }; + fileSystems."/boot" = { + device = "/dev/disk/by-label/boot"; + fsType = "ext4"; + }; + + hardware.enableAllFirmware = true; + nixpkgs.config.allowUnfree = true; + hardware.cpu.amd.updateMicrocode = true; + +} diff --git a/makefu/2configs/sda-crypto-root-home.nix b/makefu/2configs/fs/sda-crypto-root-home.nix similarity index 100% rename from makefu/2configs/sda-crypto-root-home.nix rename to makefu/2configs/fs/sda-crypto-root-home.nix diff --git a/makefu/2configs/sda-crypto-root.nix b/makefu/2configs/fs/sda-crypto-root.nix similarity index 100% rename from makefu/2configs/sda-crypto-root.nix rename to makefu/2configs/fs/sda-crypto-root.nix diff --git a/makefu/2configs/vm-single-partition.nix b/makefu/2configs/fs/vm-single-partition.nix similarity index 100% rename from makefu/2configs/vm-single-partition.nix rename to makefu/2configs/fs/vm-single-partition.nix diff --git a/makefu/2configs/git/brain-retiolum.nix b/makefu/2configs/git/brain-retiolum.nix new file mode 100644 index 000000000..0ab64773f --- /dev/null +++ b/makefu/2configs/git/brain-retiolum.nix @@ -0,0 +1,77 @@ +{ config, lib, pkgs, ... }: +# TODO: remove tv lib :) +with import ../../../tv/4lib { inherit lib pkgs; }; +let + + repos = priv-repos // krebs-repos ; + rules = concatMap krebs-rules (attrValues krebs-repos) ++ concatMap priv-rules (attrValues priv-repos); + + krebs-repos = mapAttrs make-krebs-repo { + brain = { + desc = "braiiiins"; + }; + }; + + priv-repos = mapAttrs make-priv-repo { + autosync = { }; + }; + + # TODO move users to separate module + make-priv-repo = name: { desc ? null, ... }: { + inherit name desc; + public = false; + }; + + make-krebs-repo = with git; name: { desc ? null, ... }: { + inherit name desc; + public = false; + hooks = { + post-receive = git.irc-announce { + nick = config.networking.hostName; + channel = "#retiolum"; + # TODO remove the hardcoded hostname + server = "cd.retiolum"; + }; + }; + }; + + set-owners = with git;repo: user: + singleton { + inherit user; + repo = [ repo ]; + perm = push "refs/*" [ non-fast-forward create delete merge ]; + }; + + set-ro-access = with git; repo: user: + optional repo.public { + inherit user; + repo = [ repo ]; + perm = fetch; + }; + + # TODO: get the list of all krebsministers + krebsminister = with config.krebs.users; [ lass tv ]; + all-makefu = with config.krebs.users; [ makefu makefu-omo makefu-tsp ]; + + priv-rules = repo: set-owners repo all-makefu; + + krebs-rules = repo: + set-owners repo all-makefu ++ set-ro-access repo krebsminister; + +in { + imports = [{ + krebs.users.makefu-omo = { + name = "makefu-omo" ; + pubkey= with builtins; readFile ../../../krebs/Zpubkeys/makefu_omo.ssh.pub; + }; + krebs.users.makefu-tsp = { + name = "makefu-tsp" ; + pubkey= with builtins; readFile ../../../krebs/Zpubkeys/makefu_tsp.ssh.pub; + }; + }]; + krebs.git = { + enable = true; + cgit = false; + inherit repos rules; + }; +} diff --git a/makefu/2configs/cgit-retiolum.nix b/makefu/2configs/git/cgit-retiolum.nix similarity index 89% rename from makefu/2configs/cgit-retiolum.nix rename to makefu/2configs/git/cgit-retiolum.nix index a40dabb3f..40b51e601 100644 --- a/makefu/2configs/cgit-retiolum.nix +++ b/makefu/2configs/git/cgit-retiolum.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: # TODO: remove tv lib :) -with import ../../tv/4lib { inherit lib pkgs; }; +with import ../../../tv/4lib { inherit lib pkgs; }; let repos = priv-repos // krebs-repos ; @@ -63,11 +63,11 @@ in { imports = [{ krebs.users.makefu-omo = { name = "makefu-omo" ; - pubkey= with builtins; readFile ../../krebs/Zpubkeys/makefu_omo.ssh.pub; + pubkey= with builtins; readFile ../../../krebs/Zpubkeys/makefu_omo.ssh.pub; }; krebs.users.makefu-tsp = { name = "makefu-tsp" ; - pubkey= with builtins; readFile ../../krebs/Zpubkeys/makefu_tsp.ssh.pub; + pubkey= with builtins; readFile ../../../krebs/Zpubkeys/makefu_tsp.ssh.pub; }; }]; krebs.git = { diff --git a/makefu/2configs/tp-x200.nix b/makefu/2configs/hw/tp-x200.nix similarity index 100% rename from makefu/2configs/tp-x200.nix rename to makefu/2configs/hw/tp-x200.nix diff --git a/makefu/2configs/tp-x220.nix b/makefu/2configs/hw/tp-x220.nix similarity index 100% rename from makefu/2configs/tp-x220.nix rename to makefu/2configs/hw/tp-x220.nix diff --git a/makefu/2configs/tp-x2x0.nix b/makefu/2configs/hw/tp-x2x0.nix similarity index 100% rename from makefu/2configs/tp-x2x0.nix rename to makefu/2configs/hw/tp-x2x0.nix diff --git a/makefu/3modules/default.nix b/makefu/3modules/default.nix index 015f472f7..417808425 100644 --- a/makefu/3modules/default.nix +++ b/makefu/3modules/default.nix @@ -1,6 +1,6 @@ { config, lib, ... }: -with import ../../krebs/4lib { inherit lib; }; +with lib; let cfg = config.krebs; From 8012e60b7778fa8addbf2e63a408dd20f0a80185 Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 4 Sep 2015 12:37:12 +0200 Subject: [PATCH 33/37] krebs/3modules/Reaktor: fix auto startup --- krebs/3modules/Reaktor.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/krebs/3modules/Reaktor.nix b/krebs/3modules/Reaktor.nix index 407f1bce7..7d9bad40f 100644 --- a/krebs/3modules/Reaktor.nix +++ b/krebs/3modules/Reaktor.nix @@ -115,8 +115,8 @@ let PrivateTmp = "true"; User = "Reaktor"; Restart = "on-abort"; - #StartLimitInterval = "5m"; - #StartLimitBurst = "1"; + StartLimitInterval = "1m"; + StartLimitBurst = "1"; }; }; }; From d12e86c48129ec497b0cba5743928be9bc2f3ae8 Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 4 Sep 2015 22:56:06 +0200 Subject: [PATCH 34/37] Reaktor: debug enable/disable --- krebs/3modules/Reaktor.nix | 9 ++++++++- krebs/5pkgs/Reaktor/default.nix | 4 ++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/krebs/3modules/Reaktor.nix b/krebs/3modules/Reaktor.nix index 7d9bad40f..23a1c0888 100644 --- a/krebs/3modules/Reaktor.nix +++ b/krebs/3modules/Reaktor.nix @@ -40,7 +40,7 @@ let nickname = mkOption { default = config.krebs.build.host.name + "|r"; - type = types.str; + type = types.string; description = '' The nick name of the irc bot. Defaults to {hostname}|r @@ -70,6 +70,12 @@ let the Reaktor pkg to use. ''; }; + debug = mkOption { + default = false; + description = '' + Reaktor debug output + ''; + }; }; imp = { @@ -101,6 +107,7 @@ let environment = { GIT_SSL_CAINFO = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"; REAKTOR_NICKNAME = cfg.nickname; + REAKTOR_DEBUG = (if cfg.debug then "True" else "False"); }; serviceConfig= { ExecStartPre = pkgs.writeScript "Reaktor-init" '' diff --git a/krebs/5pkgs/Reaktor/default.nix b/krebs/5pkgs/Reaktor/default.nix index 0619d232b..524782081 100644 --- a/krebs/5pkgs/Reaktor/default.nix +++ b/krebs/5pkgs/Reaktor/default.nix @@ -2,14 +2,14 @@ python3Packages.buildPythonPackage rec { name = "Reaktor-${version}"; - version = "0.4.0"; + version = "0.4.3"; propagatedBuildInputs = with pkgs;[ python3Packages.docopt python3Packages.requests2 ]; src = fetchurl { url = "https://pypi.python.org/packages/source/R/Reaktor/Reaktor-${version}.tar.gz"; - sha256 = "0izwpq6smp86964hiddnk2bbx8g27nrzfbvdp790bjmnw6gk64nb"; + sha256 = "1rvfw9vg7i7z2ah7m5k3zik2b92d3xdaqa8am62qw6vgvmxcmfp4"; }; meta = { homepage = http://krebsco.de/; From 6bcda8fa7b87ae84e6484d497382abb766c7bae8 Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 4 Sep 2015 22:57:16 +0200 Subject: [PATCH 35/37] makefu:Reakor add random-issue --- makefu/2configs/Reaktor/random-issue.sh | 20 +++++++++++++++++ makefu/2configs/Reaktor/stockholmLentil.nix | 25 +++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 makefu/2configs/Reaktor/random-issue.sh create mode 100644 makefu/2configs/Reaktor/stockholmLentil.nix diff --git a/makefu/2configs/Reaktor/random-issue.sh b/makefu/2configs/Reaktor/random-issue.sh new file mode 100644 index 000000000..5c47c6156 --- /dev/null +++ b/makefu/2configs/Reaktor/random-issue.sh @@ -0,0 +1,20 @@ +#! /bin/sh +set -eu +# requires env: +# $state_dir +# $origin + +# in PATH: git,lentil,coreutils +subdir=`echo "$1" | tr -dc "[:alnum:]"` +name=`echo "$origin" | tr -dc "[:alnum:]"` +track="$state_dir/$name-checkout" +(if test -e "$track" ;then + cd "$track" + git fetch origin master + git reset --hard origin/master +else + git clone "$origin" "$track" +fi) >&2 + +cd "$track" +lentil "${subdir:-.}" -f csv | sed 1d | shuf | head -1 diff --git a/makefu/2configs/Reaktor/stockholmLentil.nix b/makefu/2configs/Reaktor/stockholmLentil.nix new file mode 100644 index 000000000..80f1f7765 --- /dev/null +++ b/makefu/2configs/Reaktor/stockholmLentil.nix @@ -0,0 +1,25 @@ +{ config, lib, pkgs, ... }: + +with pkgs; +let + random-issue = pkgs.writeScript "random-issue" (builtins.readFile ./random-issue.sh); + random-issue-path = lib.makeSearchPath "bin" (with pkgs; [ + coreutils + git + gnused + lentil]); +in { + krebs.Reaktor.enable = true; + krebs.Reaktor.debug = true; + # krebs.Reaktor.nickname = "test-reaktor"; + # TODO: make origin variable + krebs.Reaktor.extraConfig = '' + public_commands.insert(0,{ + 'capname' : "stockholm-issue", + 'pattern' : indirect_pattern.format("stockholm-issue"), + 'argv' : ["${random-issue}"], + 'env' : { 'state_dir': workdir, + 'PATH':'${random-issue-path}', + 'origin':'http://cgit.pnp/stockholm' } }) + ''; +} From 6099a42734f4fe242c7d244944cb2b3b23b2524f Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 4 Sep 2015 23:01:41 +0200 Subject: [PATCH 36/37] Reaktor extraconfig is extensible --- krebs/3modules/Reaktor.nix | 2 +- makefu/2configs/Reaktor/simpleExtend.nix | 2 -- makefu/2configs/Reaktor/stockholmLentil.nix | 5 +---- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/krebs/3modules/Reaktor.nix b/krebs/3modules/Reaktor.nix index 23a1c0888..fce24fa63 100644 --- a/krebs/3modules/Reaktor.nix +++ b/krebs/3modules/Reaktor.nix @@ -58,7 +58,7 @@ let }; extraConfig = mkOption { default = ""; - type = types.str; + type = types.string; description = '' configuration appended to the default or overridden configuration ''; diff --git a/makefu/2configs/Reaktor/simpleExtend.nix b/makefu/2configs/Reaktor/simpleExtend.nix index 3b55ca412..95175a4e0 100644 --- a/makefu/2configs/Reaktor/simpleExtend.nix +++ b/makefu/2configs/Reaktor/simpleExtend.nix @@ -8,8 +8,6 @@ let echo "$PRETTY_NAME" ''; in { - krebs.Reaktor.enable = true; - krebs.Reaktor.nickname = "test-reaktor"; krebs.Reaktor.extraConfig = '' public_commands.insert(0,{ 'capname' : "nixos-version", diff --git a/makefu/2configs/Reaktor/stockholmLentil.nix b/makefu/2configs/Reaktor/stockholmLentil.nix index 80f1f7765..147fb5a7a 100644 --- a/makefu/2configs/Reaktor/stockholmLentil.nix +++ b/makefu/2configs/Reaktor/stockholmLentil.nix @@ -9,10 +9,7 @@ let gnused lentil]); in { - krebs.Reaktor.enable = true; - krebs.Reaktor.debug = true; - # krebs.Reaktor.nickname = "test-reaktor"; - # TODO: make origin variable + # TODO: make origin a variable, <- module is generic enough to handle different origins, not only stockholm krebs.Reaktor.extraConfig = '' public_commands.insert(0,{ 'capname' : "stockholm-issue", From d6d9956abc60548c755d30e6a5bd13c10abbb181 Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 4 Sep 2015 23:06:43 +0200 Subject: [PATCH 37/37] makefu/pnp: uses new Reaktor infrastructure --- makefu/1systems/pnp.nix | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/makefu/1systems/pnp.nix b/makefu/1systems/pnp.nix index 6ca1f1108..98f3ecd22 100644 --- a/makefu/1systems/pnp.nix +++ b/makefu/1systems/pnp.nix @@ -7,21 +7,33 @@ { imports = [ # Include the results of the hardware scan. - + # Base ../2configs/base.nix - ../2configs/git/cgit-retiolum.nix - # ../2configs/graphite-standalone.nix - ../2configs/fs/vm-single-partition.nix ../2configs/tinc-basic-retiolum.nix + # HW/FS + + ../2configs/fs/vm-single-partition.nix + + # Services + ../2configs/git/cgit-retiolum.nix + + ## Reaktor + ## \/ are only plugins, must enable Reaktor explicitly + ../2configs/Reaktor/stockholmLentil.nix + ../2configs/Reaktor/simpleExtend.nix + ../2configs/exim-retiolum.nix ../2configs/urlwatch.nix + + # ../2configs/graphite-standalone.nix ]; + krebs.Reaktor.enable = true; + krebs.build.host = config.krebs.hosts.pnp; krebs.build.user = config.krebs.users.makefu; krebs.build.target = "root@pnp"; - krebs.Reaktor.enable = true; krebs.build.deps = { nixpkgs = {