#!/usr/bin/env fish # update server with nixos-rebuild if test (path basename $PWD) != nixfiles echo "not in nixfiles directory!" >&2 return 1 end set --local target (status basename) nixos-rebuild switch \ --flake .?submodules=1#{$target} \ --target-host root@{$target} \ --build-host root@{$target} \ --no-reexec