summaryrefslogtreecommitdiffstats
path: root/Zpkgs
diff options
context:
space:
mode:
authorlassulus <lass@aidsballs.de>2015-07-27 10:09:13 +0200
committerlassulus <lass@aidsballs.de>2015-07-27 10:09:13 +0200
commit54a01c0c74bdd4233962d62c4e6631f7f8b50f77 (patch)
tree705a3f8307b49e52bd95ecac8cd6d6ca828921a4 /Zpkgs
parent6476abd6ac7e000d0759569a1e2754acb2f518ca (diff)
parent3197897292f0fc8f38d30ad6ddc9742be4a7cc1d (diff)
Merge branch 'tv' into master
Diffstat (limited to 'Zpkgs')
-rw-r--r--Zpkgs/krebs/default.nix14
-rw-r--r--Zpkgs/krebs/dic.nix (renamed from Zpkgs/tv/dic.nix)0
-rw-r--r--Zpkgs/krebs/genid.nix (renamed from Zpkgs/tv/genid.nix)0
-rw-r--r--Zpkgs/krebs/github-hosts-sync.nix (renamed from Zpkgs/tv/github-hosts-sync.nix)0
-rw-r--r--Zpkgs/krebs/github-known_hosts.nix (renamed from Zpkgs/tv/github-known_hosts.nix)0
-rw-r--r--Zpkgs/krebs/hashPassword.nix16
-rw-r--r--Zpkgs/tv/default.nix8
7 files changed, 32 insertions, 6 deletions
diff --git a/Zpkgs/krebs/default.nix b/Zpkgs/krebs/default.nix
new file mode 100644
index 000000000..231fda797
--- /dev/null
+++ b/Zpkgs/krebs/default.nix
@@ -0,0 +1,14 @@
+{ pkgs, ... }:
+
+let
+ inherit (pkgs) callPackage;
+in
+
+pkgs //
+{
+ 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 {};
+}
diff --git a/Zpkgs/tv/dic.nix b/Zpkgs/krebs/dic.nix
index 571773d22..571773d22 100644
--- a/Zpkgs/tv/dic.nix
+++ b/Zpkgs/krebs/dic.nix
diff --git a/Zpkgs/tv/genid.nix b/Zpkgs/krebs/genid.nix
index c75bec317..c75bec317 100644
--- a/Zpkgs/tv/genid.nix
+++ b/Zpkgs/krebs/genid.nix
diff --git a/Zpkgs/tv/github-hosts-sync.nix b/Zpkgs/krebs/github-hosts-sync.nix
index d69b2b12b..d69b2b12b 100644
--- a/Zpkgs/tv/github-hosts-sync.nix
+++ b/Zpkgs/krebs/github-hosts-sync.nix
diff --git a/Zpkgs/tv/github-known_hosts.nix b/Zpkgs/krebs/github-known_hosts.nix
index 302fdd8d5..302fdd8d5 100644
--- a/Zpkgs/tv/github-known_hosts.nix
+++ b/Zpkgs/krebs/github-known_hosts.nix
diff --git a/Zpkgs/krebs/hashPassword.nix b/Zpkgs/krebs/hashPassword.nix
new file mode 100644
index 000000000..a10340cc4
--- /dev/null
+++ b/Zpkgs/krebs/hashPassword.nix
@@ -0,0 +1,16 @@
+{ lib, pkgs, ... }:
+
+pkgs.writeScriptBin "hashPassword" ''
+ #! /bin/sh
+ # usage: hashPassword
+ set -euf
+
+ export PATH=${lib.makeSearchPath "bin" (with pkgs; [
+ coreutils
+ mkpasswd
+ openssl
+ ])}
+
+ salt=$(openssl rand -base64 16 | tr -d '+=' | head -c 16)
+ exec mkpasswd -m sha-512 -S "$salt"
+''
diff --git a/Zpkgs/tv/default.nix b/Zpkgs/tv/default.nix
index fa9fff84c..50625f868 100644
--- a/Zpkgs/tv/default.nix
+++ b/Zpkgs/tv/default.nix
@@ -2,15 +2,11 @@
let
inherit (pkgs) callPackage;
+ krebs = import ../../Zpkgs/krebs { inherit pkgs; };
in
-pkgs //
-{
+krebs // {
charybdis = callPackage ./charybdis {};
- dic = callPackage ./dic.nix {};
- genid = callPackage ./genid.nix {};
- github-hosts-sync = callPackage ./github-hosts-sync.nix {};
- github-known_hosts = callPackage ./github-known_hosts.nix {};
lentil = callPackage ./lentil {};
much = callPackage ./much.nix {};
viljetic-pages = callPackage ./viljetic-pages {};