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