diff options
| author | Kleidi Bujari <mail@4kb.net> | 2025-12-05 18:43:42 -0800 |
|---|---|---|
| committer | Kleidi Bujari <mail@4kb.net> | 2025-12-05 18:44:34 -0800 |
| commit | 35669d2454e0ad0283fe10c651531d1fde520fb8 (patch) | |
| tree | 926ed40127fef2e6a5ec594521d6ef5ff67006af | |
| parent | 928d0d2c5b6be584e22571f77f4521e458b7fa9e (diff) | |
| download | depot-35669d2454e0ad0283fe10c651531d1fde520fb8.tar.gz depot-35669d2454e0ad0283fe10c651531d1fde520fb8.tar.bz2 depot-35669d2454e0ad0283fe10c651531d1fde520fb8.zip | |
package randpass
| -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}"'' |
