Files
NixOsConfig/pkgs/set-password/default.nix
T

21 lines
489 B
Nix

# Hashes a login password (yescrypt) and stores it via secret-from-file.
{
lib,
writeShellApplication,
mkpasswd,
secret-from-file,
}:
writeShellApplication {
name = "set-password";
runtimeInputs = [
mkpasswd
secret-from-file
];
text = builtins.readFile ./set-password.sh;
meta = {
description = "Set the login password of a user as an agenix secret (secrets/<user>-password.age)";
mainProgram = "set-password";
platforms = lib.platforms.linux;
};
}