grace/dots

dotfiles/nix configs

git clone https://git.gae.moe/grace/dots

Grace Yoderi dont remember7b15e76

main
1.1 KiB41 linesraw
1mod remote
2
3update:
4    nix flake update
5
6rebuild:
7    #!/usr/bin/env fish
8    switch (hostname -f)
9        case turing 'turing.*'
10            sudo darwin-rebuild switch --flake .#turing
11        case cs.purdue.edu '*.cs.purdue.edu'
12            home-manager switch --flake .#cs.purdue.edu
13        case vulcan 'vulcan.*'
14            home-manager switch --flake .#vulcan
15        case '*'
16            sudo nixos-rebuild switch --flake ".#"(hostname -s)
17    end
18
19target host:
20    #! /usr/bin/env nix-shell
21    #! nix-shell -i fish -p fish nixos-rebuild-ng
22
23    nixos-rebuild switch \
24        --flake '.#{{host}}' \
25        --build-host builder@dijkstra.i.gae.moe \
26        --target-host grace@{{host}}.i.gae.moe \
27        --sudo
28
29iso:
30    nix build .#packages.x86_64-linux.portable-iso
31
32sops-edit file:
33    #!/usr/bin/env fish
34    set config (mktemp)
35    printf '[editor]\nauto-format = false\n' > $config
36    set -lx SOPS_EDITOR "hx --config "(string escape -- $config)
37    set -lx GPG_TTY (tty)
38    sops --input-type binary --output-type binary {{quote(file)}}
39    set result $status
40    rm -f $config
41    exit $result