Skip to content

Instantly share code, notes, and snippets.

@infinisil
Created June 29, 2017 06:31
Show Gist options
  • Save infinisil/75560f29139173582c99f69e57f827f1 to your computer and use it in GitHub Desktop.
Save infinisil/75560f29139173582c99f69e57f827f1 to your computer and use it in GitHub Desktop.
#!/run/current-system/sw/bin/bash
set -x
password=$(pass MacBookAir | head -n 1)
drv=$(nix-instantiate --argstr PW1 "$password")
result=$(nix-store -r "$drv")
sudo teensy-loader-cli -mmcu=atmega32u4 -v -w $result/hex/*.hex
nix-store --delete $result
nix-store --delete $drv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment