diff options
Diffstat (limited to 'krebs')
-rw-r--r-- | krebs/3modules/lass/default.nix | 21 | ||||
-rw-r--r-- | krebs/5pkgs/goify/default.nix | 15 | ||||
-rw-r--r-- | krebs/5pkgs/haskell-overrides/kirk.nix | 18 | ||||
-rw-r--r-- | krebs/5pkgs/haskell-overrides/news.nix | 18 | ||||
-rw-r--r-- | krebs/5pkgs/netcup/default.nix | 32 |
5 files changed, 97 insertions, 7 deletions
diff --git a/krebs/3modules/lass/default.nix b/krebs/3modules/lass/default.nix index ec5811d86..cd8238dc1 100644 --- a/krebs/3modules/lass/default.nix +++ b/krebs/3modules/lass/default.nix @@ -302,6 +302,27 @@ with import <stockholm/lib>; iso = { cores = 1; }; + sokrateslaptop = { + nets = { + retiolum = { + ip4.addr = "10.243.142.104"; + ip6.addr = "42:f8a1:044d:0f75:9d73:56d8:f432:c6cc"; + aliases = [ + "sokrateslaptop.r" + ]; + tinc.pubkey = '' + -----BEGIN RSA PUBLIC KEY----- + MIIBCgKCAQEA0EMbBv5NCSns4V/VR/NJHhwe2qNLUYjWWtCDY4zDuoiJdm3JNZJ2 + t0iKNxFwd6Mmg3ahAlndsH4FOjOBGBQCgBG25VRnQgli1sypI/gYTsSgIWHVIRoZ + rgrng0K3oyJ6FuTP+nH1rd7UAYkrOQolXQBY+LqAbxOVjiJl+DpbAXIxCIs5TBeW + egtBiXZ1S53Lv5EGFXug716XlgZLHjw7PzRLJXSlvUAIRZj0Sjq4UD9VrhazM9s5 + aDuxJIdknccEEXm6NK7a51hU/o8L+T0IUpZxhaXOdi6fvO/y3TbffKb1yRTbN0/V + VBjBh18Le7h0SmAEED5tz7NOCrAjMZQtJQIDAQAB + -----END RSA PUBLIC KEY----- + ''; + }; + }; + }; }; users = { lass = { diff --git a/krebs/5pkgs/goify/default.nix b/krebs/5pkgs/goify/default.nix index e2849b5c7..9c44aaeeb 100644 --- a/krebs/5pkgs/goify/default.nix +++ b/krebs/5pkgs/goify/default.nix @@ -1,17 +1,18 @@ { pkgs, ... }: -pkgs.writeDashBin "goify" '' +pkgs.writeBashBin "goify" '' set -euf GO_HOST=''${GO_HOST:-go} while read line; do - echo "$line" | sed -E 's|https?://\S*|\n&\n|g' | while read word; do - if echo "$word" | grep -Eq ^https?:; then - ${pkgs.curl}/bin/curl -Ss -F uri="$word" http://"$GO_HOST" | tr -d '\r' + echo "$line" | sed 's|https\?://\S*|\n&\n|g' | while read word; do + if echo "$word" | grep -q '^https\?:'; then + ${pkgs.curl}/bin/curl -Ss -F uri="$word" http://"$GO_HOST" \ + | tr -d '\r' else - echo "$word"; - fi; - done | sed '/^$/d' | tr '\n' ' '; echo; + echo "$word" + fi + done | grep . | tr '\n' ' '; echo done '' diff --git a/krebs/5pkgs/haskell-overrides/kirk.nix b/krebs/5pkgs/haskell-overrides/kirk.nix new file mode 100644 index 000000000..2cd6bb134 --- /dev/null +++ b/krebs/5pkgs/haskell-overrides/kirk.nix @@ -0,0 +1,18 @@ +{ mkDerivation, async, base, bytestring, fetchgit, network +, optparse-applicative, stdenv, text +}: +mkDerivation { + pname = "kirk"; + version = "1.0.0"; + src = fetchgit { + url = "http://cgit.krebsco.de/kirk"; + sha256 = "0w4drg2lyyw45abfn3g55zd6m7pl7yqxql5rpyy6qqdbvnyak94w"; + rev = "c78f3c62c0ba76465e39d1570073f867aa2d4240"; + }; + isLibrary = false; + isExecutable = true; + executableHaskellDepends = [ + async base bytestring network optparse-applicative text + ]; + license = stdenv.lib.licenses.mit; +} diff --git a/krebs/5pkgs/haskell-overrides/news.nix b/krebs/5pkgs/haskell-overrides/news.nix new file mode 100644 index 000000000..ba5e7a5e1 --- /dev/null +++ b/krebs/5pkgs/haskell-overrides/news.nix @@ -0,0 +1,18 @@ +{ mkDerivation, base, bloomfilter, bytestring, feed, fetchgit, lens +, stdenv, wreq +}: +mkDerivation { + pname = "news"; + version = "1.0.0"; + src = fetchgit { + url = "http://cgit.lassul.us/news"; + sha256 = "1n3ffr2a5irr5aly0y7qsafag3kxvyyh077ayk0vdwbd0s9hvnjs"; + rev = "c3eb2c0a1a34fc41e18d0bc99b1c4dc73aa6eb20"; + }; + isLibrary = false; + isExecutable = true; + executableHaskellDepends = [ + base bloomfilter bytestring feed lens wreq + ]; + license = stdenv.lib.licenses.mit; +} diff --git a/krebs/5pkgs/netcup/default.nix b/krebs/5pkgs/netcup/default.nix new file mode 100644 index 000000000..d1f46299d --- /dev/null +++ b/krebs/5pkgs/netcup/default.nix @@ -0,0 +1,32 @@ +{ coreutils, curl, fetchgit, gawk, gnugrep, gnused, jq, stdenv, w3m, ... }: +with import <stockholm/lib>; +let + readJSON = path: fromJSON (readFile path); + sed.escape = replaceChars ["/"] ["\\/"]; # close enough + PATH = makeBinPath [ + coreutils + curl + gawk + gnugrep + gnused + jq + w3m + ]; +in +stdenv.mkDerivation { + name = "netcup-1.0.0"; + src = fetchgit { + url = "http://cgit.ni.krebsco.de/netcup"; + rev = "refs/tags/v1.0.0"; + sha256 = "1rn7bncfhjw0bqjbvj38m7lks4nyf5qcvkj9dg0zr99ba6dylzx5"; + }; + phases = [ "unpackPhase" "patchPhase" "installPhase" ]; + patchPhase = '' + path=${shell.escape (sed.escape PATH)} + sed -i "1s/.*/&\nPATH=$path/" vcp + ''; + installPhase = '' + mkdir -p $out/bin + cp vcp $out/bin + ''; +} |