diff --git a/justfile b/justfile index a1cfcd2..b8d309c 100644 --- a/justfile +++ b/justfile @@ -1,3 +1,5 @@ +usb_ram_disk := "/dev/disk/by-id/usb-jalr_RAM_Mass_Storage_DE6270431F6F342C-0:0" + boot: nixos-rebuild boot --flake . --use-remote-sudo which fwupdmgr >/dev/null 2>&1 && fwupdmgr update || true @@ -22,3 +24,11 @@ repl: pkgs = flake.inputs.nixpkgs.legacyPackages."\${builtins.currentSystem}"; \ } \ " + +luks-pass host: + @if [ -b "{{usb_ram_disk}}" ]; then \ + gpg -d hosts/{{host}}/luks-passfile.gpg | sudo dd of={{usb_ram_disk}}; \ + else \ + echo "{{usb_ram_disk}} is not a block device" >&2; \ + fi +