System Gen176 @ 2025-05-01-12:10:41

This commit is contained in:
Jonas Röger 2025-05-01 12:10:42 +02:00
parent 85c2004551
commit e37eec7d7f

View File

@ -1,8 +1,4 @@
{
config,
pkgs,
...
}: let
{pkgs, ...}: let
home-rebuild =
pkgs.writeShellScriptBin ".home-rebuild"
''
@ -13,7 +9,8 @@
echo "NixOS Rebuilding..."
${pkgs.nh}/bin/nh home switch ~/.nixos
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"
by="$(${pkgs.coreutils-full}/bin/whoami)@$(${pkgs.nettools}/bin/hostname)"
${pkgs.git}/bin/git commit --no-gpg-sign -am "Home $gen by $by"
popd
'';
rebuild =
@ -26,7 +23,8 @@
echo "NixOS Rebuilding..."
${pkgs.nh}/bin/nh os switch ~/.nixos
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"
by="$(${pkgs.coreutils-full}/bin/whoami)@$(${pkgs.nettools}/bin/hostname)"
${pkgs.git}/bin/git commit --no-gpg-sign -am "System $gen by $by"
popd
'';
upgrade =
@ -53,7 +51,8 @@
echo "NixOS Rebuilding..."
${pkgs.nh}/bin/nh os switch ~/.nixos
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"
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 branch -D "$branch_staging"
popd
'';