diff options
| -rw-r--r-- | flake.nix | 4 | ||||
| -rw-r--r-- | packages/randpass.nix | 8 |
2 files changed, 12 insertions, 0 deletions
@@ -86,6 +86,10 @@ { inherit (depot.misc) cv; inherit (depot.web) site; + inherit (depot) + randpass + run-image + ; } ); }; 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}"'' |
