Skip to content

Instantly share code, notes, and snippets.

@infinisil
Created June 29, 2017 05:59
Show Gist options
  • Select an option

  • Save infinisil/e9672f641bb01bb54820e10ef7d6977c to your computer and use it in GitHub Desktop.

Select an option

Save infinisil/e9672f641bb01bb54820e10ef7d6977c 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 $(ls $result/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