aboutsummaryrefslogtreecommitdiff
path: root/justfile
diff options
context:
space:
mode:
Diffstat (limited to 'justfile')
-rw-r--r--justfile16
1 files changed, 8 insertions, 8 deletions
diff --git a/justfile b/justfile
index 3d49102..edebd3e 100644
--- a/justfile
+++ b/justfile
@@ -29,29 +29,29 @@ switch:
@echo "switching to new config..."
sudo darwin-rebuild switch --flake .
+# build the iso to bootstrap a new machine
[group('linux')]
build-iso:
@echo "building an ISO for nixos..."
nix build .#nixosConfigurations.iso.config.system.build.isoImage
+# provision a new machine with nixos-anywhere
+[group('linux')]
+deploy-nixos flake ip:
+ ./tools/deploy-nixos.py --flake {{flake}} --target-ip {{ip}}
+
+# rebuild the nixos configuration for a host
[group('linux')]
rbuild hostname:
@echo "building {{hostname}} nixos config..."
nixos-rebuild build --keep-going --flake ".#{{hostname}}" --target-host {{hostname}} --fast --use-remote-sudo --use-substitutes
+# apply the nixos configuration for a host
[group('linux')]
rswitch hostname:
@echo "switching {{hostname}} to new config..."
nixos-rebuild switch --keep-going --flake ".#{{hostname}}" --target-host {{hostname}} --fast --use-remote-sudo --use-substitutes
-# sync agenix key from 1password
-[group('secrets')]
-sync-agenix-key:
- @echo "copying agenix SSH key from 1password..."
- mkdir -p ~/.ssh
- op --account my.1password.com read "op://Private/agenix/private key?ssh-format=openssh" > ~/.ssh/agenix
- op --account my.1password.com read "op://Private/agenix/public key" > ~/.ssh/agenix.pub
-
# generate a new OIDC secret
[group('secrets')]
oidc-secret: