summary refs log tree commit diff
path: root/rebuild-wsl.sh
diff options
context:
space:
mode:
authorEmma (Rory&) <root@rory.gay>2023-09-28 15:56:29 +0000
committerEmma (Rory&) <root@rory.gay>2023-09-28 15:56:29 +0000
commitb2c4d04963c89846e03c6e8080e7418d7daed59e (patch)
tree7d52785d6fa87ab1a9416128a76e72fd8df2b255 /rebuild-wsl.sh
parentFormatting changes (diff)
downloadRory-Open-Architecture-b2c4d04963c89846e03c6e8080e7418d7daed59e.tar.xz
Add WSL config
Diffstat (limited to 'rebuild-wsl.sh')
-rwxr-xr-xrebuild-wsl.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/rebuild-wsl.sh b/rebuild-wsl.sh
new file mode 100755
index 0000000..afa93ef
--- /dev/null
+++ b/rebuild-wsl.sh
@@ -0,0 +1,14 @@
+#!/usr/bin/env sh
+
+if [ -d "nixpkgs" ]; then
+    cd nixpkgs
+    git remote add upstream https://github.com/NixOS/nixpkgs || git remote set-url upstream https://github.com/NixOS/nixpkgs
+    git fetch --all -v
+    git rebase upstream/nixos-unstable -v
+    cd ..
+fi
+
+nix flake update
+nom build .#nixosConfigurations.${HOSTNAME}.config.system.build.toplevel
+sudo nixos-rebuild switch --flake .#${HOSTNAME}
+#./build.sh / $HOSTNAME