[M] Update include folder structure

This commit is contained in:
Hykilpikonna
2021-09-16 21:59:50 -04:00
parent b6d88caf6c
commit 627eb5c191
5 changed files with 4 additions and 11 deletions
+32
View File
@@ -0,0 +1,32 @@
alias rebuild="nixos-rebuild switch"
alias gc="nix-collect-garbage -d"
alias rebuild-gc="rebuild; gc"
# Update git
nix-git-update() {
pushd /etc/nixos
# Make sure there aren't any other changes
if git diff-index --quiet HEAD --; then
# No changes
update-nix-fetchgit *.nix
# If there are changes after updating
if ! git diff-index --quiet HEAD --; then
# Has changes
rebuild-gc
git add *.nix
git commit -m "[U] Update fetchgit refs"
git push
echo "Successfully updated fetchgit refs"
else
echo "There aren't any updates"
fi
else
# Changes
echo "Error: There are uncommitted changes"
git status
fi
popd
}