diff options
Diffstat (limited to 'packages')
| -rw-r--r-- | packages/randpass.nix | 8 |
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}"'' |
