adding yacreader
This commit is contained in:
@@ -1,13 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
echo "searching generations"
|
||||
# your hostname (flake target)
|
||||
hostname="$(hostname)"
|
||||
old_gen=$(nixos-rebuild list-generations | grep current | awk '{print $1}')
|
||||
gen=$((old_gen + 1))
|
||||
echo "gen $old_gen --> gen $gen"
|
||||
timestamp=$(date '+%Y-%m-%d %H:%M:%S')
|
||||
nix_dir="$HOME/.nix"
|
||||
logfile="$nix_dir/.nixos-switch-log"
|
||||
|
||||
|
||||
pushd "$nix_dir" >/dev/null
|
||||
|
||||
# function to get current nixos generation
|
||||
@@ -17,6 +21,8 @@ get_current_generation() {
|
||||
|
||||
echo "diffs:"
|
||||
git diff
|
||||
echo ""
|
||||
echo "files:"
|
||||
git status --short
|
||||
read -rp "commit message: " commit_msg
|
||||
echo "rebuilding nixos with flake.nix..."
|
||||
|
||||
Reference in New Issue
Block a user