-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathjustfile
28 lines (22 loc) · 911 Bytes
/
justfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# CHANGEME
FQDN := "myfedimint.net"
SSH_HOST := "root@" + FQDN
FLAKE_CONF := "myfedimint"
[private]
default:
@just --list
# Apply (deply) configuration to a host
apply conf=(FLAKE_CONF) ssh_host=(SSH_HOST):
nixos-rebuild switch --flake .#{{conf}} --target-host "{{ssh_host}}"
apply-build-on-remote conf=(FLAKE_CONF) ssh_host=(SSH_HOST):
nixos-rebuild switch --flake .#{{conf}} --build-host "{{ssh_host}}" --target-host "{{ssh_host}}"
# Bootstrap host using nixos-anywhere
bootstrap conf=(FLAKE_CONF) ssh_host=(SSH_HOST):
nix run github:nix-community/nixos-anywhere -- --flake .#{{conf}} {{ssh_host}}
# Bootstrap host using nixos-anywhere, building on the remote server
bootstrap-build-on-remote conf=(FLAKE_CONF) ssh_host=(SSH_HOST):
nix run github:nix-community/nixos-anywhere -- --build-on-remote --flake .#{{conf}} {{ssh_host}}
# Check for problems
check:
nix flake check
just --evaluate