Allow setting OS-level password

Bit ugly as it is, but we're slowly iterating towards a secret manager
I'm happy with.
This commit is contained in:
Geoffrey Frogeye 2024-06-18 22:56:44 +02:00
parent 5462fa43fa
commit a39118d439
Signed by: geoffrey
GPG key ID: C72403E7F82E6AD8
3 changed files with 171 additions and 0 deletions

View file

@ -39,7 +39,14 @@ then
fi
if [ "$verb" = "test" ] || [ "$verb" = "switch" ] || [ "$confirm" = "y" ]
then
# Generate passwords first. If there's a missing one that cannot be generated, we'll know before anything is written
"$toplevel/bin/generate-passwords"
# Install the passwords to their respective directories
"$toplevel/bin/install-passwords"
sudo nixos-rebuild --flake "$self#$HOSTNAME" test "${specialisationArgs[@]}" "$@"
# Fix passwords permission. After install, so it can use new users
"$toplevel/bin/fix-permissions-passwords"
# TODO Install passwords with correct permissions during activation
fi
# Set as boot