refactor: update dotfiles paths and remove obsolete configurations
Some checks failed
Nix Format Check / check-format (push) Failing after 40s
Some checks failed
Nix Format Check / check-format (push) Failing after 40s
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
source $HOME/dotfiles/bin/helpers/functions.sh
|
||||
source $DOTFILES_PATH/bin/helpers/functions.sh
|
||||
|
||||
# Define associative array with app_name => command mapping
|
||||
declare -A apps=(
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
source $HOME/dotfiles/bin/helpers/functions.sh
|
||||
source $HOMEsource $DOTFILES_PATH/bin/helpers/functions.sh
|
||||
|
||||
welcome() {
|
||||
echo
|
||||
|
@@ -1,10 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
source $HOME/dotfiles/bin/helpers/functions.sh
|
||||
source $DOTFILES_PATH/bin/helpers/functions.sh
|
||||
|
||||
# Print logo
|
||||
logo
|
||||
|
||||
# Print help
|
||||
cat $HOME/dotfiles/bin/resources/help.txt
|
||||
cat $DOTFILES_PATH/bin/resources/help.txt
|
||||
println " " "cyan"
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
source $HOME/dotfiles/bin/helpers/functions.sh
|
||||
source $DOTFILES_PATH/bin/helpers/functions.sh
|
||||
|
||||
if is_wsl; then
|
||||
output=$(op.exe item get "Dotfiles Secrets" --fields password)
|
||||
@@ -111,8 +111,8 @@ decrypt_folder() {
|
||||
|
||||
if [[ "$1" == "decrypt" ]]; then
|
||||
printfe "%s\n" "cyan" "Decrypting secrets..."
|
||||
decrypt_folder ~/dotfiles/secrets
|
||||
decrypt_folder $DOTFILES_PATH/secrets
|
||||
elif [[ "$1" == "encrypt" ]]; then
|
||||
printfe "%s\n" "cyan" "Encrypting secrets..."
|
||||
encrypt_folder ~/dotfiles/secrets
|
||||
encrypt_folder $DOTFILES_PATH/secrets
|
||||
fi
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
source $HOME/dotfiles/bin/helpers/functions.sh
|
||||
source $DOTFILES_PATH/bin/helpers/functions.sh
|
||||
|
||||
help() {
|
||||
printfe "%s\n" "green" "Usage: upgrade.sh [options]"
|
||||
@@ -45,14 +45,14 @@ printfe "%s\n" "cyan" "Limiting to $CORES cores with $JOBS jobs."
|
||||
|
||||
if [[ "$RUN_HA" == true ]]; then
|
||||
printfe "%s\n" "cyan" "Updating Home Manager flake..."
|
||||
cd $HOME/dotfiles/config/home-manager && nix --extra-experimental-features nix-command --extra-experimental-features flakes flake update
|
||||
cd $DOTFILES_PATH/config/home-manager && nix --extra-experimental-features nix-command --extra-experimental-features flakes flake update
|
||||
|
||||
if command -v home-manager &> /dev/null; then
|
||||
printfe "%s\n" "cyan" "Cleaning old backup files..."
|
||||
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 .#$HOSTNAME --impure --cores $CORES -j $JOBS
|
||||
cd $DOTFILES_PATH/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=$HOSTNAME" --extra-vars "ansible_user=$USER" --limit $HOSTNAME --ask-become-pass ${ANSIBLE_VERBOSE:+-vvv}
|
||||
cd $DOTFILES_PATH/config/ansible && ansible-playbook -i $DOTFILES_PATH/config/ansible/inventory.ini $DOTFILES_PATH/config/ansible/main.yml --extra-vars "hostname=$HOSTNAME" --extra-vars "ansible_user=$USER" --limit $HOSTNAME --ask-become-pass ${ANSIBLE_VERBOSE:+-vvv}
|
||||
|
||||
if [[ $? -ne 0 ]]; then
|
||||
printfe "%s\n" "red" "Failed to upgrade Ansible packages."
|
||||
|
Reference in New Issue
Block a user