Litenet-Nix-Infra/rebuild-wsl.sh
2024-07-19 03:31:44 +00:00

14 lines
432 B
Bash
Executable file

#!/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