by claytonjy · 3y ago · 0 comments
I'm mostly interested in managing my home directory to start (replace gnu stow for dotfiles), but also to manage all my other software in a way that ports nicely between systems and OSes (skip over brew, flatpak, apt, etc.). I think this means home-manager, right?
Should I just start here with Determinate Nix, or somewhere else?
In addition to that, check out this Shopify video series:
- https://www.youtube.com/playlist?list=PLRGI9KQ3_HP_OFRG6R-p4...
- https://shopify.engineering/what-is-nix
I share a bunch of configuration between my M1 Macbook and x86 desktop in my office. I use home-manager with config that is organized like nixos/*, macos/*, and common/*. The first two just import the latter. Here's a link if it's helpful:
1. Start learning with https://zero-to-nix.com/
2. Take a look at https://github.com/nix-community/home-manager
Good luck!
It's more NixOS oriented, but most of the knowledge is obviously transferable to a bare-bones (if one could say that) Nix installation on top of other OSes.
With regards to all the Nix/NixOS documentation already out there, I'm trying to keep my stuff extremely straight-forward and rather simplistic (but not superficial), so the people outside of Nix (and even outside of Linux) may give it a solid try.
Just to note, if you wish to subscribe to the newsletter, it's broken now, gonna fix it in a few days.
Also a question to @grhmc: would you maybe have some doc that describes how to UN_install nix via your installer on macOS?
I've only used nix on NixOS, so I don't know about installing nix on top of an existing (non-NixOS) OS. A collegue is running just home-manager on ubuntu, with some success.
I’ve deleted Homebrew from my system and I’m now using the same home-manager setup for my macOS laptops as well as my WSL installation on windows.
It’s so great to have the exact same tools and shell configuration installed everywhere.
I have not used flakes yet but if that will help me deal with the differences between my systems I’m definitely for it!
E.g I have a work Mac, personal Mac, personal PC with WSL.
When on my work machine, usernames are different and my Git config should identify me as me, and I shouldn’t have access to my personal credential for personal GitHub, RSA private keys for personal servers, etc.
But all else should be the same.
Mostly there but the credentials part I am still figuring out.
If you want to check it out, it’s here: https://github.com/leonbreedt/dotfiles
Won’t work for you out of the box tho as it depends on private repo for sensitive configs.
Of course you can dive straight into the whole thing if you would prefer. I've tried that too (in a former chromebook). NixOS is pretty eye opening.
Nix is interesting for me from an immutable point of view though (mainly NixOS).