Skip to content

Instantly share code, notes, and snippets.

View mwilsoncoding's full-sized avatar
💭
I may be slow to respond.

Max Wilson mwilsoncoding

💭
I may be slow to respond.
View GitHub Profile

Nix Tidbits

In which tidbits regarding nix can be found...

Nix

Inherit

# introduces the 'hi' attribute to the following scope
# only valid inside a let block
nix-repl> let inherit ({greeting = "helloworld";}) greeting; in greeting
"helloworld"
# nix-env -p /nix/var/nix/profiles/system --delete-generations old
# nix-collect-garbage -d
# nix-env -p /nix/var/nix/profiles/system --list-generations
## Remove entries from /boot/loader/entries:
# sudo bash -c "cd /boot/loader/entries; ls | grep -v <current-generation-name> | xargs rm"