refactor: update Home Manager and Ansible commands to use HOSTNAME variable
All checks were successful
Nix Format Check / check-format (push) Successful in 37s

This commit is contained in:
2025-01-22 16:15:06 +01:00
parent ac575c5125
commit 6ffb65fbc0
2 changed files with 2 additions and 7 deletions

View File

@ -52,7 +52,7 @@ if [[ "$RUN_HA" == true ]]; then
rm -rf $HOME/.config/mimeapps.list.backup
printfe "%s\n" "cyan" "Upgrading Home Manager packages..."
cd $HOME/dotfiles/config/home-manager && NIXPKGS_ALLOW_UNFREE=1 home-manager --extra-experimental-features nix-command --extra-experimental-features flakes switch -b backup --flake .#$DOTF_HOSTNAME --impure --cores $CORES -j $JOBS
cd $HOME/dotfiles/config/home-manager && NIXPKGS_ALLOW_UNFREE=1 home-manager --extra-experimental-features nix-command --extra-experimental-features flakes switch -b backup --flake .#$HOSTNAME --impure --cores $CORES -j $JOBS
if [[ $? -ne 0 ]]; then
printfe "%s\n" "red" "Failed to upgrade Home Manager packages."
@ -76,7 +76,7 @@ if [[ "$RUN_ANSIBLE" == true ]]; then
fi
printfe "%s\n" "cyan" "Running Ansible playbook..."
cd $HOME/dotfiles/config/ansible && ansible-playbook -i $HOME/dotfiles/config/ansible/inventory.ini $HOME/dotfiles/config/ansible/main.yml --extra-vars "hostname=$DOTF_HOSTNAME" --extra-vars "ansible_user=$USER" --limit $DOTF_HOSTNAME --ask-become-pass
cd $HOME/dotfiles/config/ansible && ansible-playbook -i $HOME/dotfiles/config/ansible/inventory.ini $HOME/dotfiles/config/ansible/main.yml --extra-vars "hostname=$HOSTNAME" --extra-vars "ansible_user=$USER" --limit $HOSTNAME --ask-become-pass
if [[ $? -ne 0 ]]; then
printfe "%s\n" "red" "Failed to upgrade Ansible packages."