From 99e3934ce558d6b738fa0b35264160a543d7c3ca Mon Sep 17 00:00:00 2001 From: alina sireneva Date: Tue, 16 Apr 2024 04:22:45 +0300 Subject: [PATCH] chore: improved handling of git-hidden files --- hosts/teidesu-osx/.gitignore | 1 + switch | 5 +++++ 2 files changed, 6 insertions(+) create mode 100644 hosts/teidesu-osx/.gitignore diff --git a/hosts/teidesu-osx/.gitignore b/hosts/teidesu-osx/.gitignore new file mode 100644 index 0000000..e37fa3c --- /dev/null +++ b/hosts/teidesu-osx/.gitignore @@ -0,0 +1 @@ +/arc-setup.nix \ No newline at end of file diff --git a/switch b/switch index 2ae2302..a75eaa4 100755 --- a/switch +++ b/switch @@ -24,6 +24,11 @@ if [ "$1" == "boot" ]; then fi 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 darwin-rebuild switch --flake . $args $@ else