chore: improved handling of git-hidden files

This commit is contained in:
alina 🌸 2024-04-16 04:22:45 +03:00
parent 5619796099
commit 99e3934ce5
Signed by: teidesu
SSH key fingerprint: SHA256:uNeCpw6aTSU4aIObXLvHfLkDa82HWH9EiOj9AXOIRpI
2 changed files with 6 additions and 0 deletions

1
hosts/teidesu-osx/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/arc-setup.nix

5
switch
View file

@ -24,6 +24,11 @@ if [ "$1" == "boot" ]; then
fi fi
if [ "$(uname)" == "Darwin" ]; then if [ "$(uname)" == "Darwin" ]; then
git add -f hosts/teidesu-osx/arc-setup.nix
function restore {
git restore --staged hosts/teidesu-osx/arc-setup.nix
}
trap restore EXIT
if command -v darwin-rebuild &> /dev/null; then if command -v darwin-rebuild &> /dev/null; then
darwin-rebuild switch --flake . $args $@ darwin-rebuild switch --flake . $args $@
else else