summary refs log tree commit diff
path: root/rebuild-wsl.sh
blob: afa93ef84de84144e3f998c0fd1271d907d82085 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
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