moves various things to home manager
All checks were successful
Nix Format Check / check-format (push) Successful in 1m4s

This commit is contained in:
2025-01-02 00:59:22 +01:00
parent df66535bf1
commit dfff773f7e
14 changed files with 237 additions and 230 deletions

View File

@@ -40,24 +40,34 @@ fi
printfe "%s\n" "cyan" "Limiting to $CORES cores with $JOBS jobs."
if [[ "$RUN_NIX" == true ]]; then
printfe "%s\n" "cyan" "Upgrading NixOS packages..."
cd $HOME/dotfiles/config/nixos && sudo nixos-rebuild switch --upgrade --flake .#$DOTF_HOSTNAME --impure --cores $CORES -j $JOBS
if command -v nixos-rebuild &> /dev/null; then
printfe "%s\n" "cyan" "Upgrading NixOS packages..."
cd $HOME/dotfiles/config/nixos && sudo nixos-rebuild switch --upgrade --flake .#$DOTF_HOSTNAME --impure --cores $CORES -j $JOBS
if [[ $? -ne 0 ]]; then
printfe "%s\n" "red" "Failed to upgrade NixOS packages."
if [[ $? -ne 0 ]]; then
printfe "%s\n" "red" "Failed to upgrade NixOS packages."
exit 1
fi
else
printfe "%s\n" "red" "NixOS is not installed."
exit 1
fi
fi
if [[ "$RUN_HA" == true ]]; then
printfe "%s\n" "cyan" "Cleaning old backup files..."
rm -rf $HOME/.config/mimeapps.list.backup
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 switch -b backup --flake .#$DOTF_HOSTNAME --impure --cores $CORES -j $JOBS
printfe "%s\n" "cyan" "Upgrading Home Manager packages..."
cd $HOME/dotfiles/config/home-manager && NIXPKGS_ALLOW_UNFREE=1 home-manager switch -b backup --flake .#$DOTF_HOSTNAME --impure --cores $CORES -j $JOBS
if [[ $? -ne 0 ]]; then
printfe "%s\n" "red" "Failed to upgrade Home Manager packages."
if [[ $? -ne 0 ]]; then
printfe "%s\n" "red" "Failed to upgrade Home Manager packages."
exit 1
fi
else
printfe "%s\n" "red" "Home Manager is not installed."
exit 1
fi
fi