System Gen55 @ 2025-05-30-00:35:34 by jonas@monolith

This commit is contained in:
Jonas Röger 2025-05-30 00:35:58 +02:00
parent 5825a2e2b8
commit 009e339bbc

View File

@ -10,11 +10,11 @@
pkgs.writeShellScriptBin ".home-rebuild"
''
set -e
pushd ~/.nixos/
pushd ~/.hive/
${pkgs.alejandra}/bin/alejandra . &>/dev/null
${pkgs.git}/bin/git diff -U0
echo "NixOS Rebuilding..."
${pkgs.nh}/bin/nh home switch ~/.nixos
${pkgs.nh}/bin/nh home switch ~/.hive
gen=$(home-manager generations | head -n1 | ${pkgs.gawk}/bin/awk '{print "Gen" $5 " @ " $1 "-" $2}')
by="$(${pkgs.coreutils-full}/bin/whoami)@$(${pkgs.nettools}/bin/hostname)"
${pkgs.git}/bin/git commit --no-gpg-sign -am "Home $gen by $by"
@ -24,11 +24,11 @@
pkgs.writeShellScriptBin ".nixos-rebuild"
''
set -e
pushd ~/.nixos/
pushd ~/.hive/
${pkgs.alejandra}/bin/alejandra . &>/dev/null
${pkgs.git}/bin/git diff -U0
echo "NixOS Rebuilding..."
${pkgs.nh}/bin/nh os switch ~/.nixos
${pkgs.nh}/bin/nh os switch ~/.hive
gen=$(sudo nix-env --list-generations --profile /nix/var/nix/profiles/system | ${pkgs.gnugrep}/bin/grep current | ${pkgs.gawk}/bin/awk '{print "Gen" $1 " @ " $2 "-" $3}')
by="$(${pkgs.coreutils-full}/bin/whoami)@$(${pkgs.nettools}/bin/hostname)"
${pkgs.git}/bin/git commit --no-gpg-sign -am "System $gen by $by"
@ -38,9 +38,9 @@
pkgs.writeShellScriptBin ".nixos-upgrade"
''
set -e
pushd ~/.nixos/
pushd ~/.hive/
if [ -n "$(${pkgs.git}/bin/git status --porcelain)" ]; then
echo ".nixos is unclean!"
echo ".hive is unclean!"
exit 1
fi
branch_staging="staging-update"
@ -56,7 +56,7 @@
echo "Updating nix-flake..."
nix flake update --flake .
echo "NixOS Rebuilding..."
${pkgs.nh}/bin/nh os switch ~/.nixos
${pkgs.nh}/bin/nh os switch ~/.hive
gen=$(sudo nix-env --list-generations --profile /nix/var/nix/profiles/system | ${pkgs.gnugrep}/bin/grep current | ${pkgs.gawk}/bin/awk '{print "Gen" $1 " @ " $2 "-" $3}')
by="$(${pkgs.coreutils-full}/bin/whoami)@$(${pkgs.nettools}/bin/hostname)"
${pkgs.git}/bin/git commit --no-gpg-sign -am "Upgrade $gen by $by"
@ -67,9 +67,9 @@
pkgs.writeShellScriptBin ".nixos-update"
''
set -e
pushd ~/.nixos/
pushd ~/.hive/
if [ -n "$(${pkgs.git}/bin/git status --porcelain)" ]; then
echo ".nixos is unclean!"
echo ".hive is unclean!"
exit 1
fi
branch_staging="staging-update"