add comment to flake.nix w/ gen # fix
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
# generation:
|
||||||
# flake for blakes nixos config
|
# flake for blakes nixos config
|
||||||
# define new devices in outputs
|
# define new devices in outputs
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ pushd ~/.nix
|
|||||||
git diff -U0 *.nix
|
git diff -U0 *.nix
|
||||||
|
|
||||||
# add generation comment to flake.nix
|
# add generation comment to flake.nix
|
||||||
|
gen=$(nixos-rebuild list-generations | grep current | awk '{print $1}')
|
||||||
if grep -q '^# generation:' flake.nix; then
|
if grep -q '^# generation:' flake.nix; then
|
||||||
sed -i "1s/^# generation:.*/# generation: $gen/" flake.nix
|
sed -i "1s/^# generation:.*/# generation: $gen/" flake.nix
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user