summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--krebs/4lib/default.nix6
-rw-r--r--krebs/5pkgs/default.nix27
-rw-r--r--krebs/5pkgs/push/default.nix48
-rw-r--r--tv/1systems/wu.nix1
-rw-r--r--tv/2configs/base.nix6
-rw-r--r--tv/2configs/git.nix1
7 files changed, 65 insertions, 26 deletions
diff --git a/Makefile b/Makefile
index 552e6e0fd..8834cb7c8 100644
--- a/Makefile
+++ b/Makefile
@@ -35,11 +35,11 @@ ifeq ($(filter),json)
else
filter() { cat; }
endif
- NIX_PATH=stockholm=$$PWD:$$NIX_PATH \
nix-instantiate \
$${extraArgs-} \
--eval \
-A "$$get" \
+ -I stockholm="$$PWD" \
'<stockholm>' \
--argstr current-date "$$(date -Is)" \
--argstr current-host-name "$$HOSTNAME" \
diff --git a/krebs/4lib/default.nix b/krebs/4lib/default.nix
index ca7219c7e..78f719988 100644
--- a/krebs/4lib/default.nix
+++ b/krebs/4lib/default.nix
@@ -5,6 +5,8 @@ with lib;
builtins // lib // rec {
+ eq = x: y: x == y;
+
addName = name: set:
set // { inherit name; };
@@ -22,4 +24,8 @@ builtins // lib // rec {
null = "NULL";
string = toJSON x; # close enough
}.${typeOf x};
+
+ subdirsOf = path:
+ mapAttrs (name: _: path + "/${name}")
+ (filterAttrs (_: eq "directory") (readDir path));
}
diff --git a/krebs/5pkgs/default.nix b/krebs/5pkgs/default.nix
index c48c3dee8..a8a1b5853 100644
--- a/krebs/5pkgs/default.nix
+++ b/krebs/5pkgs/default.nix
@@ -3,28 +3,15 @@
with import ../4lib { inherit lib; };
let
- inherit (pkgs) callPackage;
+ subdirs = mapAttrs (_: flip pkgs.callPackage {}) (subdirsOf ./.);
+ pkgs' = pkgs // subdirs;
in
-rec {
- cac = callPackage ./cac {};
- charybdis = callPackage ./charybdis {};
- dic = callPackage ./dic {};
- genid = callPackage ./genid {};
- get = callPackage ./get {};
- github-hosts-sync = callPackage ./github-hosts-sync {};
- hashPassword = callPackage ./hashPassword {};
- jq = callPackage ./jq {};
- krebszones = callPackage ./krebszones {};
- lentil = callPackage ./lentil {};
- much = callPackage ./much {};
- nq = callPackage ./nq {};
- posix-array = callPackage ./posix-array {};
- pssh = callPackage ./pssh {};
- passwdqc-utils = callPackage ./passwdqc-utils {};
- Reaktor = callPackage ./Reaktor {};
- realwallpaper = callPackage ./realwallpaper.nix {};
- youtube-tools = callPackage ./youtube-tools {};
+subdirs // rec {
+
+ push = pkgs'.callPackage ./push {
+ inherit (subdirs) get jq;
+ };
execve = name: { filename, argv, envp ? {}, destination ? "" }:
writeC name { inherit destination; } ''
diff --git a/krebs/5pkgs/push/default.nix b/krebs/5pkgs/push/default.nix
new file mode 100644
index 000000000..ce496d9c3
--- /dev/null
+++ b/krebs/5pkgs/push/default.nix
@@ -0,0 +1,48 @@
+{ fetchgit, lib, stdenv
+, coreutils
+, get
+, git
+, gnused
+, jq
+, openssh
+, parallel
+, ... }:
+
+stdenv.mkDerivation {
+ name = "push-1.0.0";
+
+ src = fetchgit {
+ url = http://cgit.cd.retiolum/push;
+ rev = "513da89fe50b3bad3d758855f5622c4508977e4a";
+ sha256 = "6124e1d4d4ef57455e2f06891e06fb01d3786846efaf9b79e3176d89988e1b4e";
+ };
+
+ phases = [
+ "unpackPhase"
+ "installPhase"
+ ];
+
+ installPhase =
+ let
+ path = lib.makeSearchPath "bin" [
+ coreutils
+ get
+ git
+ gnused
+ jq
+ openssh
+ parallel
+ ];
+ in
+ ''
+ mkdir -p $out/bin
+
+ sed \
+ '1s,.*,&\nPATH=${path},' \
+ < ./push \
+ > $out/bin/push
+
+ chmod +x $out/bin/push
+ '';
+}
+
diff --git a/tv/1systems/wu.nix b/tv/1systems/wu.nix
index 0ef846f93..cc99b0498 100644
--- a/tv/1systems/wu.nix
+++ b/tv/1systems/wu.nix
@@ -89,6 +89,7 @@ with lib;
pavucontrol
posix_man_pages
pssh
+ push
qrencode
sxiv
texLive
diff --git a/tv/2configs/base.nix b/tv/2configs/base.nix
index 1c6eba662..010d4b326 100644
--- a/tv/2configs/base.nix
+++ b/tv/2configs/base.nix
@@ -79,11 +79,7 @@ in
environment.etc."vim/vim${majmin pkgs.vim.version}".source =
"${pkgs.vim}/share/vim/vim${majmin pkgs.vim.version}";
- # multiple-definition-problem when defining environment.variables.EDITOR
- environment.extraInit = ''
- EDITOR=vim
- '';
-
+ environment.variables.EDITOR = mkForce "vim";
environment.variables.VIM = "/etc/vim";
}
{
diff --git a/tv/2configs/git.nix b/tv/2configs/git.nix
index 401cf5f4d..d782c87f1 100644
--- a/tv/2configs/git.nix
+++ b/tv/2configs/git.nix
@@ -35,6 +35,7 @@ let
nixos-infest = {};
nixpkgs = {};
painload = {};
+ push = {};
quipper = {};
regfish = {};
stockholm = {