summaryrefslogtreecommitdiffstats
path: root/Zpkgs
diff options
context:
space:
mode:
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 {};