Generation 101 2024-04-22 16:55:23 (current)

This commit is contained in:
2024-04-22 16:55:24 +02:00
parent d52a85f5f3
commit e5bd8d80f1
2 changed files with 4 additions and 23 deletions

View File

@@ -12,7 +12,7 @@
${pkgs.git}/bin/git diff -U0
echo "NixOS Rebuilding..."
${pkgs.unstable.nh}/bin/nh home switch ~/.nixos
gen=$(home-manager generations | head -n1 | ${pkgs.gawk}/bin/awk '{print "Gen" $5 " @ " $1}')
gen=$(home-manager generations | head -n1 | ${pkgs.gawk}/bin/awk '{print "Gen" $5 " @ " $1 "-" $2}')
${pkgs.git}/bin/git commit --no-gpg-sign -am "Home $gen"
popd
'';
@@ -25,8 +25,8 @@
${pkgs.git}/bin/git diff -U0
echo "NixOS Rebuilding..."
${pkgs.unstable.nh}/bin/nh os switch ~/.nixos
gen=$(sudo nix-env --list-generations --profile /nix/var/nix/profiles/system | ${pkgs.gnugrep}/bin/grep current)
${pkgs.git}/bin/git commit --no-gpg-sign -am "Generation $gen"
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}')
${pkgs.git}/bin/git commit --no-gpg-sign -am "System $gen"
popd
'';
upgrade =
@@ -42,7 +42,7 @@
nix flake update .
echo "NixOS Rebuilding..."
${pkgs.unstable.nh}/bin/nh os switch ~/.nixos
gen=$(sudo nix-env --list-generations --profile /nix/var/nix/profiles/system | ${pkgs.gnugrep}/bin/grep current)
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}')
${pkgs.git}/bin/git commit --no-gpg-sign -am "Upgrade $gen"
popd
'';