38 current 2025-10-04 13:51:04 25.05.20251001.5b5be50 6.12.49 *
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
# flake for blakes nixos config
|
# flake for blakes nixos config
|
||||||
# define new devices in outputs
|
# define new devices in outputs
|
||||||
# generation: 37
|
# generation: 39
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,8 @@ pushd ~/.nix
|
|||||||
git diff -U0 $(find . -name '*.nix')
|
git diff -U0 $(find . -name '*.nix')
|
||||||
|
|
||||||
# add generation comment to flake.nix
|
# add generation comment to flake.nix
|
||||||
gen=$(nixos-rebuild list-generations | grep current | awk '{print $1}')
|
current_gen=$(nixos-rebuild list-generations | grep current | awk '{print $1}')
|
||||||
|
gen=$((current_gen + 1))
|
||||||
if sed -n '3p' flake.nix | grep -q '^# generation:'; then
|
if sed -n '3p' flake.nix | grep -q '^# generation:'; then
|
||||||
# replace the comment on line 3
|
# replace the comment on line 3
|
||||||
sed -i "3s/^# generation:.*/# generation: $gen/" flake.nix
|
sed -i "3s/^# generation:.*/# generation: $gen/" flake.nix
|
||||||
|
|||||||
Reference in New Issue
Block a user