hachyderm.io is one of the many independent Mastodon servers you can use to participate in the fediverse.
Hachyderm is a safe space, LGBTQIA+ and BLM, primarily comprised of tech industry professionals world wide. Note that many non-user account types have restrictions - please see our About page.

Administered by:

Server stats:

7.9K
active users

Jonathan Meek

Published a new post on cleaning up profiles from one's grub profile. Also fixed the feed so it should work if someone want to try it out and let me know that would be awesome and @25admins got mentioned in the post

meeknot.es/p/cleaning-up-nixos

Meek Notes · Cleaning Up NixOS ProfilesMy discovery of cleaning up NixOS Profiles out of my GRUB Menu

@j_l_meek a “safer” way to do this is via `nix-collect-garbage --delete-older-than 30d` (replace 30 with the threshold of your choice)

Granted this will purge any unreferenced (and newly unreferenced) derivations from the store (and not “just” remove the bootloader entries). But if you want to prune things over time, that’s how I do it

@ivan thanks for the suggestion! I will give it a try later on. I think I tried this already and the issue comes to play that with profiles are their own list of generations instead of the general list of generations when you navigate to “All configurations” in the GRUB menu. Either way I will try and update my post with my findings!

@j_l_meek another tip I’d have is I like to use `nixos-rebuild test` while I’m iterating on a config change, it will activate the changes but won’t make a boot entry. Once I’m done, I’ll persist the changes with `nixos-rebuild switch`.

Makes the cleanup easier by avoiding the mess in the first place ;)

@ivan I did try this out using —dry-run and discovered it nabbed some of the profiles I wanted to keep (e.g a profile I created on Feb 1 appeared in the dry run with —-delete-older-than 30d). I agree with you on how to avoid the mess so thanks for that. The update to my blog should be live sometime today. If you are okay with it, I would like to add in a link to this thread. I like to give credit to folks when they teach me something

@j_l_meek sure that’s fine!