Skip to content

Instantly share code, notes, and snippets.

@luochen1990
Last active May 30, 2022 13:49
Show Gist options
  • Save luochen1990/ef1b1beb462a60f1e466dce1bf8a822c to your computer and use it in GitHub Desktop.
Save luochen1990/ef1b1beb462a60f1e466dce1bf8a822c to your computer and use it in GitHub Desktop.
A convient nix-repl to debug your nix flakes
#!/usr/bin/env nix-shell
#! nix-shell -p "expect" -i expect
#set timeout -1
cd ~/ws/nixos
spawn nix repl
send ":lf .\n"
send ":a builtins\n"
send ":a nixosConfigurations.[ exec hostname ]\n"
interact
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment