refactor: update Home Manager and Ansible commands to use HOSTNAME variable
All checks were successful
Nix Format Check / check-format (push) Successful in 37s
All checks were successful
Nix Format Check / check-format (push) Successful in 37s
This commit is contained in:
parent
ac575c5125
commit
6ffb65fbc0
5
.bashrc
5
.bashrc
@ -6,11 +6,6 @@ HISTFILESIZE=2000 # Adjusted to match both histfile and size criteria
|
|||||||
# Docker Compose Alias (Mostly for old shell scripts)
|
# Docker Compose Alias (Mostly for old shell scripts)
|
||||||
alias docker-compose='docker compose'
|
alias docker-compose='docker compose'
|
||||||
|
|
||||||
# Home Manager Configuration
|
|
||||||
alias hm='cd $HOME/dotfiles/config/home-manager/ && home-manager'
|
|
||||||
alias hmnews='hm news --flake .#$DOTF_HOSTNAME'
|
|
||||||
alias hmup='hm switch --flake .#$DOTF_HOSTNAME --impure'
|
|
||||||
|
|
||||||
# Modern tools aliases
|
# Modern tools aliases
|
||||||
alias l="eza --header --long --git --group-directories-first --group --icons --color=always --sort=name --hyperlink -o --no-permissions"
|
alias l="eza --header --long --git --group-directories-first --group --icons --color=always --sort=name --hyperlink -o --no-permissions"
|
||||||
alias ll='l'
|
alias ll='l'
|
||||||
|
@ -52,7 +52,7 @@ if [[ "$RUN_HA" == true ]]; then
|
|||||||
rm -rf $HOME/.config/mimeapps.list.backup
|
rm -rf $HOME/.config/mimeapps.list.backup
|
||||||
|
|
||||||
printfe "%s\n" "cyan" "Upgrading Home Manager packages..."
|
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
|
if [[ $? -ne 0 ]]; then
|
||||||
printfe "%s\n" "red" "Failed to upgrade Home Manager packages."
|
printfe "%s\n" "red" "Failed to upgrade Home Manager packages."
|
||||||
@ -76,7 +76,7 @@ if [[ "$RUN_ANSIBLE" == true ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
printfe "%s\n" "cyan" "Running Ansible playbook..."
|
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
|
if [[ $? -ne 0 ]]; then
|
||||||
printfe "%s\n" "red" "Failed to upgrade Ansible packages."
|
printfe "%s\n" "red" "Failed to upgrade Ansible packages."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user