summaryrefslogtreecommitdiffstats
path: root/krebs
diff options
context:
space:
mode:
Diffstat (limited to 'krebs')
-rw-r--r--krebs/3modules/makefu/default.nix5
-rw-r--r--krebs/3modules/tv/default.nix3
-rw-r--r--krebs/5pkgs/bepasty-client-cli/default.nix22
-rw-r--r--krebs/5pkgs/krebspaste/default.nix7
-rw-r--r--krebs/5pkgs/translate-shell/default.nix43
-rw-r--r--krebs/default.nix3
6 files changed, 80 insertions, 3 deletions
diff --git a/krebs/3modules/makefu/default.nix b/krebs/3modules/makefu/default.nix
index a9279b027..652527da2 100644
--- a/krebs/3modules/makefu/default.nix
+++ b/krebs/3modules/makefu/default.nix
@@ -164,6 +164,7 @@ with lib;
dc = "makefu"; #dc = "cac";
extraZones = {
"krebsco.de" = ''
+ euer IN A ${head nets.internet.addrs4}
wiki.euer IN A ${head nets.internet.addrs4}
wry IN A ${head nets.internet.addrs4}
io IN NS wry.krebsco.de.
@@ -191,6 +192,9 @@ with lib;
"paste.retiolum"
"wry.retiolum"
"wiki.makefu.retiolum"
+ "wiki.wry.retiolum"
+ "blog.makefu.retiolum"
+ "blog.wry.retiolum"
];
tinc.pubkey = ''
-----BEGIN RSA PUBLIC KEY-----
@@ -240,7 +244,6 @@ with lib;
extraZones = {
"krebsco.de" = ''
- euer IN A ${head nets.internet.addrs4}
share.euer IN A ${head nets.internet.addrs4}
gum IN A ${head nets.internet.addrs4}
'';
diff --git a/krebs/3modules/tv/default.nix b/krebs/3modules/tv/default.nix
index 4c295dffe..302d1a92c 100644
--- a/krebs/3modules/tv/default.nix
+++ b/krebs/3modules/tv/default.nix
@@ -158,7 +158,8 @@ with lib;
};
};
secure = true;
- ssh.pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILn7C3LxAs9kUynENdRNgQs4qjrhNDfXzlHTpVJt6e09";
+ ssh.privkey.path = <secrets/ssh.id_ed25519>;
+ ssh.pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILMPMh3nHxVcPqM+LrkK7eYxNJY1ShBXOTg1vlSR45wx";
};
ok = {
nets = {
diff --git a/krebs/5pkgs/bepasty-client-cli/default.nix b/krebs/5pkgs/bepasty-client-cli/default.nix
new file mode 100644
index 000000000..990f99af6
--- /dev/null
+++ b/krebs/5pkgs/bepasty-client-cli/default.nix
@@ -0,0 +1,22 @@
+{ lib, pkgs, pythonPackages, fetchurl, ... }:
+
+with pythonPackages; buildPythonPackage rec {
+ name = "bepasty-client-cli-${version}";
+ version = "0.3.0";
+ propagatedBuildInputs = [
+ python_magic
+ click
+ requests2
+ ];
+
+ src = fetchurl {
+ url = "https://pypi.python.org/packages/source/b/bepasty-client-cli/bepasty-client-cli-${version}.tar.gz";
+ sha256 = "002kcplyfnmr5pn2ywdfilss0rmbm8wcdzz8hzp03ksy2zr4sdbw";
+ };
+
+ meta = {
+ homepage = https://github.com/bepasty/bepasty-client-cli;
+ description = "CLI client for bepasty-server";
+ license = lib.licenses.bsd2;
+ };
+}
diff --git a/krebs/5pkgs/krebspaste/default.nix b/krebs/5pkgs/krebspaste/default.nix
new file mode 100644
index 000000000..fb318af83
--- /dev/null
+++ b/krebs/5pkgs/krebspaste/default.nix
@@ -0,0 +1,7 @@
+{ writeScriptBin, pkgs }:
+
+# TODO: use `wrapProgram --add-flags` instead?
+writeScriptBin "krebspaste" ''
+ #! /bin/sh
+ exec ${pkgs.bepasty-client-cli}/bin/bepasty-cli --url http://paste.retiolum "$@"
+''
diff --git a/krebs/5pkgs/translate-shell/default.nix b/krebs/5pkgs/translate-shell/default.nix
new file mode 100644
index 000000000..00ab226e5
--- /dev/null
+++ b/krebs/5pkgs/translate-shell/default.nix
@@ -0,0 +1,43 @@
+{stdenv, fetchurl,pkgs,... }:
+let
+ s =
+ rec {
+ baseName="translate-shell";
+ version="0.9.0.9";
+ name="${baseName}-${version}";
+ url=https://github.com/soimort/translate-shell/archive/v0.9.0.9.tar.gz;
+ sha256="1269j4yr9dr1d8c5kmysbzfplbgdg8apqnzs5w57d29sd7gz2i34";
+ };
+ searchpath = with pkgs; stdenv.lib.makeSearchPath "bin" [
+ fribidi
+ gawk
+ bash
+ curl
+ less
+ ];
+ buildInputs = [
+ pkgs.makeWrapper
+ ];
+in
+stdenv.mkDerivation {
+ inherit (s) name version;
+ inherit buildInputs;
+ src = fetchurl {
+ inherit (s) url sha256;
+ };
+ # TODO: maybe mplayer
+ installPhase = ''
+ mkdir -p $out/bin
+ make PREFIX=$out install
+ wrapProgram $out/bin/trans --suffix PATH : "${searchpath}"
+ '';
+
+ meta = {
+ inherit (s) version;
+ description = ''translate using google api'';
+ license = stdenv.lib.licenses.free;
+ maintainers = [stdenv.lib.maintainers.makefu];
+ platforms = stdenv.lib.platforms.linux ;
+ };
+}
+
diff --git a/krebs/default.nix b/krebs/default.nix
index 31a7f7d04..bfd6175d9 100644
--- a/krebs/default.nix
+++ b/krebs/default.nix
@@ -84,6 +84,7 @@ let out = {
cat<<EOF
# put following into config.krebs.hosts.$system:
+ ssh.privkey.path = <secrets/ssh.$key_type>;
ssh.pubkey = $(echo $pubkey | jq -R .);
EOF
'';
@@ -178,7 +179,7 @@ let out = {
nix-path =
lib.concatStringsSep ":"
- (lib.mapAttrsToList (name: _: "${name}=/root/${name}")
+ (lib.mapAttrsToList (name: src: "${name}=${src.target-path}")
(config.krebs.build.source.dir //
config.krebs.build.source.git));
in ''