summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorKleidi Bujari <mail@4kb.net>2025-12-05 18:43:42 -0800
committerKleidi Bujari <mail@4kb.net>2025-12-05 18:44:34 -0800
commit35669d2454e0ad0283fe10c651531d1fde520fb8 (patch)
tree926ed40127fef2e6a5ec594521d6ef5ff67006af /packages
parent928d0d2c5b6be584e22571f77f4521e458b7fa9e (diff)
downloaddepot-35669d2454e0ad0283fe10c651531d1fde520fb8.tar.gz
depot-35669d2454e0ad0283fe10c651531d1fde520fb8.tar.bz2
depot-35669d2454e0ad0283fe10c651531d1fde520fb8.zip
package randpass
Diffstat (limited to 'packages')
-rw-r--r--packages/randpass.nix8
1 files changed, 8 insertions, 0 deletions
diff --git a/packages/randpass.nix b/packages/randpass.nix
new file mode 100644
index 0000000..ef8fe91
--- /dev/null
+++ b/packages/randpass.nix
@@ -0,0 +1,8 @@
+# Generate mostly random string with alphanumerics
+# ARGS
+# $1: num of chars to output, default 14
+
+{ writeShellScriptBin, ... }:
+
+writeShellScriptBin "randpass"
+ ''tr -dc '[:alnum:]' </dev/urandom | head -c "''${1:-14}"''