diff --git a/flake.nix b/flake.nix index 2030274..a7e0939 100644 --- a/flake.nix +++ b/flake.nix @@ -100,9 +100,29 @@ } ) self.nixosConfigurations); - + argon2id = + let + python = pkgs.python3.withPackages (pp: with pp; [ + argon2-cffi + ]); + in + pkgs.writeTextFile { + name = "argon2id"; + text = '' + #!${python}/bin/python + import getpass + from argon2 import PasswordHasher + pw = getpass.getpass() + ph = PasswordHasher( + time_cost=5, + memory_cost=2*1024*1024, # in kibibytes + parallelism=4, + ) + print(ph.hash(pw)) + ''; + executable = true; + }; }); - }) // { overlay = import ./pkgs;