summaryrefslogtreecommitdiffstats
path: root/Zpkgs
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2015-07-24 23:57:12 +0200
committermakefu <github@syntax-fehler.de>2015-07-24 23:57:12 +0200
commitf338d3d4d15ff29b3048b4f89716a8aa1a19f21b (patch)
treebb803bdcc4d93141e16e94e417c69ca8b1b3c9f5 /Zpkgs
parenta4d2509918c3ce1400071eb0ef2b5421023976ca (diff)
parent99527e88aec089b4fea496248cf03f738bfed257 (diff)
Merge remote-tracking branch 'cd/master'
Diffstat (limited to 'Zpkgs')
-rw-r--r--Zpkgs/krebs/default.nix3
-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/hashPassword.nix16
-rw-r--r--Zpkgs/tv/default.nix6
5 files changed, 21 insertions, 4 deletions
diff --git a/Zpkgs/krebs/default.nix b/Zpkgs/krebs/default.nix
index be8f72011..231fda797 100644
--- a/Zpkgs/krebs/default.nix
+++ b/Zpkgs/krebs/default.nix
@@ -6,6 +6,9 @@ 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/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 e3e12bd18..50625f868 100644
--- a/Zpkgs/tv/default.nix
+++ b/Zpkgs/tv/default.nix
@@ -2,13 +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 {};
lentil = callPackage ./lentil {};
much = callPackage ./much.nix {};
viljetic-pages = callPackage ./viljetic-pages {};