From a30269753d5d1acdb773bd431f33953b6d5444e9 Mon Sep 17 00:00:00 2001 From: Michael Kelly Date: Fri, 14 Feb 2025 15:28:32 -0800 Subject: [PATCH] git rebase --- base.nix | 2 +- base_lite.nix | 2 +- powerwash.sh | 5 ++++- powerwash_lite.sh | 5 ++++- update.sh | 2 +- update_lite.sh | 2 +- update_shutdown.sh | 2 +- update_shutdown_lite.sh | 2 +- 8 files changed, 14 insertions(+), 8 deletions(-) diff --git a/base.nix b/base.nix index a3fe82c..60a3b39 100644 --- a/base.nix +++ b/base.nix @@ -69,7 +69,7 @@ # Update nixbook configs ${pkgs.coreutils-full}/bin/nice -n 19 ${pkgs.util-linux}/bin/ionice -c 3 ${pkgs.git}/bin/git -C /etc/nixbook reset --hard ${pkgs.coreutils-full}/bin/nice -n 19 ${pkgs.util-linux}/bin/ionice -c 3 ${pkgs.git}/bin/git -C /etc/nixbook clean -fd - ${pkgs.coreutils-full}/bin/nice -n 19 ${pkgs.util-linux}/bin/ionice -c 3 ${pkgs.git}/bin/git -C /etc/nixbook pull + ${pkgs.coreutils-full}/bin/nice -n 19 ${pkgs.util-linux}/bin/ionice -c 3 ${pkgs.git}/bin/git -C /etc/nixbook pull --rebase # Flatpak Updates ${pkgs.coreutils-full}/bin/nice -n 19 ${pkgs.util-linux}/bin/ionice -c 3 ${pkgs.flatpak}/bin/flatpak update --noninteractive --assumeyes diff --git a/base_lite.nix b/base_lite.nix index 20082e0..af84b4a 100644 --- a/base_lite.nix +++ b/base_lite.nix @@ -52,7 +52,7 @@ set -eu ${pkgs.coreutils-full}/bin/nice -n 19 ${pkgs.util-linux}/bin/ionice -c 3 ${pkgs.git}/bin/git -C /etc/nixbook reset --hard ${pkgs.coreutils-full}/bin/nice -n 19 ${pkgs.util-linux}/bin/ionice -c 3 ${pkgs.git}/bin/git -C /etc/nixbook clean -fd - ${pkgs.coreutils-full}/bin/nice -n 19 ${pkgs.util-linux}/bin/ionice -c 3 ${pkgs.git}/bin/git -C /etc/nixbook pull + ${pkgs.coreutils-full}/bin/nice -n 19 ${pkgs.util-linux}/bin/ionice -c 3 ${pkgs.git}/bin/git -C /etc/nixbook pull --rebase # Get the timestamp of the current generation last_gen_time=$(${pkgs.nix}/bin/nix-env --list-generations --profile /nix/var/nix/profiles/system | ${pkgs.gawk}/bin/awk 'END {print $2, $3}') diff --git a/powerwash.sh b/powerwash.sh index 9daf195..ff592a1 100755 --- a/powerwash.sh +++ b/powerwash.sh @@ -4,7 +4,10 @@ read -p "Do you want to continue? (y/n): " answer if [[ "$answer" =~ ^[Yy]$ ]]; then echo "Powerwashing NixBook..." # Get latest nixbook code - sudo git -C /etc/nixbook pull + sudo git -C /etc/nixbook reset --hard + sudo git -C /etc/nixbook clean -fd + sudo git -C /etc/nixbook pull --rebase + # Erase data and set up home directory again rm -rf ~/ diff --git a/powerwash_lite.sh b/powerwash_lite.sh index 65069f7..0e5ff62 100755 --- a/powerwash_lite.sh +++ b/powerwash_lite.sh @@ -5,7 +5,10 @@ read -p "Do you want to continue? (y/n): " answer if [[ "$answer" =~ ^[Yy]$ ]]; then echo "Powerwashing NixBook Lite..." # Get latest nixbook code - sudo git -C /etc/nixbook pull + sudo git -C /etc/nixbook reset --hard + sudo git -C /etc/nixbook clean -fd + sudo git -C /etc/nixbook pull --rebase + # Erase data and set up home directory again rm -rf ~/ diff --git a/update.sh b/update.sh index a8a1cb2..014f9e1 100755 --- a/update.sh +++ b/update.sh @@ -7,7 +7,7 @@ if [[ "$answer" =~ ^[Yy]$ ]]; then # Download the latest nixbook changes sudo git -C /etc/nixbook reset --hard sudo git -C /etc/nixbook clean -fd - sudo git -C /etc/nixbook pull + sudo git -C /etc/nixbook pull --rebase # Update the nixos nix-channel to be the same as config.system.autoUpgrade.channel in base.nix or base_lite.nix AUTOUPDATE_CHANNEL="$(sudo nix-instantiate --eval '' -A config.system.autoUpgrade.channel | tr -d '"')" diff --git a/update_lite.sh b/update_lite.sh index 4e8d3f4..65b3d37 100755 --- a/update_lite.sh +++ b/update_lite.sh @@ -7,7 +7,7 @@ if [[ "$answer" =~ ^[Yy]$ ]]; then # Download the latest nixbook changes sudo git -C /etc/nixbook reset --hard sudo git -C /etc/nixbook clean -fd - sudo git -C /etc/nixbook pull + sudo git -C /etc/nixbook pull --rebase # Update the nixos nix-channel to be the same as config.system.autoUpgrade.channel in base.nix or base_lite.nix AUTOUPDATE_CHANNEL="$(sudo nix-instantiate --eval '' -A config.system.autoUpgrade.channel | tr -d '"')" diff --git a/update_shutdown.sh b/update_shutdown.sh index 5678219..a7043da 100755 --- a/update_shutdown.sh +++ b/update_shutdown.sh @@ -7,7 +7,7 @@ if [[ "$answer" =~ ^[Yy]$ ]]; then # Download the latest nixbook changes sudo git -C /etc/nixbook reset --hard sudo git -C /etc/nixbook clean -fd - sudo git -C /etc/nixbook pull + sudo git -C /etc/nixbook pull --rebase # Update the nixos nix-channel to be the same as config.system.autoUpgrade.channel in base.nix or base_lite.nix AUTOUPDATE_CHANNEL="$(sudo nix-instantiate --eval '' -A config.system.autoUpgrade.channel | tr -d '"')" diff --git a/update_shutdown_lite.sh b/update_shutdown_lite.sh index 328b47b..030d61f 100755 --- a/update_shutdown_lite.sh +++ b/update_shutdown_lite.sh @@ -7,7 +7,7 @@ if [[ "$answer" =~ ^[Yy]$ ]]; then # Download the latest nixbook changes sudo git -C /etc/nixbook reset --hard sudo git -C /etc/nixbook clean -fd - sudo git -C /etc/nixbook pull + sudo git -C /etc/nixbook pull --rebase # Update the nixos nix-channel to be the same as config.system.autoUpgrade.channel in base.nix or base_lite.nix AUTOUPDATE_CHANNEL="$(sudo nix-instantiate --eval '' -A config.system.autoUpgrade.channel | tr -d '"')"