grace/dots
dotfiles/nix configs
git clone https://git.gae.moe/grace/dots
7b15e76
main
1target host : 2#!/usr/bin/env fish 3set host{{ quote ( host ) }} 4string match --quiet --regex'^[a-zA-Z0-9][a-zA-Z0-9-]*$' --$host ; or exit 2 5set archive( nix flake archive --to ssh://grace@dijkstra.i.gae.moe --json .) 6or exit 1 7set source( printf '%s\n' $archive | jq -er .path) 8or exit 1 9ssh grace@dijkstra.i.gae.moe\ 10"sudo -n systemd-run --unit=nixos-remote --collect --service-type=exec --uid=grace \ 11--setenv=PATH=/run/current-system/sw/bin:/usr/bin:/bin \ 12/run/current-system/sw/bin/nixos-rebuild switch \ 13--flake $source # $host --target-host grace@ $host .i.gae.moe --sudo" 14 15logs : 16ssh grace@dijkstra.i.gae.moe'sudo -n journalctl --unit=nixos-remote.service --invocation=0 --lines=100 --follow --no-pager' 17 18gc host : 19ssh {{ host }} -- sudo nix-collect-garbage -d