System Gen55 @ 2025-05-30-00:35:34 by jonas@monolith
This commit is contained in:
parent
5825a2e2b8
commit
009e339bbc
@ -10,11 +10,11 @@
|
|||||||
pkgs.writeShellScriptBin ".home-rebuild"
|
pkgs.writeShellScriptBin ".home-rebuild"
|
||||||
''
|
''
|
||||||
set -e
|
set -e
|
||||||
pushd ~/.nixos/
|
pushd ~/.hive/
|
||||||
${pkgs.alejandra}/bin/alejandra . &>/dev/null
|
${pkgs.alejandra}/bin/alejandra . &>/dev/null
|
||||||
${pkgs.git}/bin/git diff -U0
|
${pkgs.git}/bin/git diff -U0
|
||||||
echo "NixOS Rebuilding..."
|
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}')
|
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)"
|
by="$(${pkgs.coreutils-full}/bin/whoami)@$(${pkgs.nettools}/bin/hostname)"
|
||||||
${pkgs.git}/bin/git commit --no-gpg-sign -am "Home $gen by $by"
|
${pkgs.git}/bin/git commit --no-gpg-sign -am "Home $gen by $by"
|
||||||
@ -24,11 +24,11 @@
|
|||||||
pkgs.writeShellScriptBin ".nixos-rebuild"
|
pkgs.writeShellScriptBin ".nixos-rebuild"
|
||||||
''
|
''
|
||||||
set -e
|
set -e
|
||||||
pushd ~/.nixos/
|
pushd ~/.hive/
|
||||||
${pkgs.alejandra}/bin/alejandra . &>/dev/null
|
${pkgs.alejandra}/bin/alejandra . &>/dev/null
|
||||||
${pkgs.git}/bin/git diff -U0
|
${pkgs.git}/bin/git diff -U0
|
||||||
echo "NixOS Rebuilding..."
|
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}')
|
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)"
|
by="$(${pkgs.coreutils-full}/bin/whoami)@$(${pkgs.nettools}/bin/hostname)"
|
||||||
${pkgs.git}/bin/git commit --no-gpg-sign -am "System $gen by $by"
|
${pkgs.git}/bin/git commit --no-gpg-sign -am "System $gen by $by"
|
||||||
@ -38,9 +38,9 @@
|
|||||||
pkgs.writeShellScriptBin ".nixos-upgrade"
|
pkgs.writeShellScriptBin ".nixos-upgrade"
|
||||||
''
|
''
|
||||||
set -e
|
set -e
|
||||||
pushd ~/.nixos/
|
pushd ~/.hive/
|
||||||
if [ -n "$(${pkgs.git}/bin/git status --porcelain)" ]; then
|
if [ -n "$(${pkgs.git}/bin/git status --porcelain)" ]; then
|
||||||
echo ".nixos is unclean!"
|
echo ".hive is unclean!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
branch_staging="staging-update"
|
branch_staging="staging-update"
|
||||||
@ -56,7 +56,7 @@
|
|||||||
echo "Updating nix-flake..."
|
echo "Updating nix-flake..."
|
||||||
nix flake update --flake .
|
nix flake update --flake .
|
||||||
echo "NixOS Rebuilding..."
|
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}')
|
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)"
|
by="$(${pkgs.coreutils-full}/bin/whoami)@$(${pkgs.nettools}/bin/hostname)"
|
||||||
${pkgs.git}/bin/git commit --no-gpg-sign -am "Upgrade $gen by $by"
|
${pkgs.git}/bin/git commit --no-gpg-sign -am "Upgrade $gen by $by"
|
||||||
@ -67,9 +67,9 @@
|
|||||||
pkgs.writeShellScriptBin ".nixos-update"
|
pkgs.writeShellScriptBin ".nixos-update"
|
||||||
''
|
''
|
||||||
set -e
|
set -e
|
||||||
pushd ~/.nixos/
|
pushd ~/.hive/
|
||||||
if [ -n "$(${pkgs.git}/bin/git status --porcelain)" ]; then
|
if [ -n "$(${pkgs.git}/bin/git status --porcelain)" ]; then
|
||||||
echo ".nixos is unclean!"
|
echo ".hive is unclean!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
branch_staging="staging-update"
|
branch_staging="staging-update"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user