summary refs log tree commit diff
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2022-12-12 00:41:58 +0100
committerTheArcaneBrony <myrainbowdash949@gmail.com>2022-12-12 00:41:58 +0100
commit9e4c06dd22b98fdc13bbeb641244fe97b7c7635b (patch)
tree443f26d96988fce9c5883acbca6a82ce58c023f5
parentRemove /etc access (diff)
downloadRory-Open-Architecture-9e4c06dd22b98fdc13bbeb641244fe97b7c7635b.tar.xz
Add hw config to git temporarily for build
Signed-off-by: TheArcaneBrony <myrainbowdash949@gmail.com>
-rwxr-xr-xbuild.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/build.sh b/build.sh
index 1fdf453..2d01c32 100755
--- a/build.sh
+++ b/build.sh
@@ -8,10 +8,14 @@ if [ $# -ne 2 ]; then
 fi
 if [ "$1" = "/" ]; then
     nixos-generate-config --show-hardware-config > hardware-configuration.nix
+    git add -f hardware-configuration.nix
     nixos-rebuild --flake ".#${2}" build
-    exit 1
+    git rm --cached hardware-configuration.nix
+    exit
 else
     nixos-generate-config --show-hardware-config > hardware-configuration.nix
+    git add -f hardware-configuration.nix
     nixos-install --root "${1}" --flake ".#${2}" 
-    exit 1
+    git rm --cached hardware-configuration.nix
+    exit
 fi