5 ms·
TIL specialisations: https://nixos.wiki/wiki/Specialisation https://nixos.wiki/wiki/Specialisation I plan to use this for testing changes to my boot units. In
by freedinosaur 4y ago
TIL specialisations: https://nixos.wiki/wiki/Specialisation https://nixos.wiki/wiki/Specialisation
I plan to use this for testing changes to my boot units.
In theory, plain old generations allow you to safely test changes to boot units, by allowing you to jump to the previous generation. In practice, this involves remembering which generations have known-good boots.
Specialisations will allow me to run a stable and candy track, on per generation.
What other usecases do specialisations improve?
- freedinosaur 4y agoThis makes testing changes easier in other ways too: when I make experimental changes, I'm reluctant to commit them until I know they're working, since I like being able to checkout an old commit and know it boots. In practice this means I end up with a dirty checkout, and uncertainty on which changes have been tested. In theory I could manage this with git rebasing and/or tagging, but in practice I lose confidence in whether I've accurately tracked. With specialisations, I'd comfortably commit an experimental change to my canary track, even though it might break, safe in the knowledge that the stable track continues to boot.
- freedinosaur 4y ago> Specialisations will allow me to run a stable and candy track, on per generation. Typos: Specialisations will allow me to run a stable and canary track, one per generation.
- LelouBil 4y agoCandy track sounds better. It's candy for tinkerers.
- spindle 4y ago> In practice, this involves remembering which generations have known-good boots. Another option is to use named profiles for this: nixos-rebuild switch --profile-name whatever The profile names show up in your boot menu.
- freedinosaur 4y agoTIL. Maybe I could get into the habit of using branches for experiments, and then including the branch name in --profile-name.
- spindle 4y agoPlease do. I get the impression that not many people use --profile-name, and I live in fear of them taking it away. It needs critical mass. Two of us should be enough!
- senorsmile 4y agoTIL too. This makes 3 now.