5 ms·
As a very nix-curious non-user, this looks like a good place to start; is it? I'm mostly interested in managing my home directory to start (replace gnu stow fo
by claytonjy 4y ago
As a very nix-curious non-user, this looks like a good place to start; is it?
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?
- grhmc 4y agoI'd recommend: 1. Start learning with https://zero-to-nix.com/ https://zero-to-nix.com/ 2. Take a look at https://github.com/nix-community/home-manager https://github.com/nix-community/home-manager Good luck!
- the_gipsy 4y agoI still use stow, but for my nix and home-manager config dirs only. The rest of my dotfiles is generated from home-manager, and my system nix stuff from nixos-rebuild. I am successfully sharing a config between my work and my personal laptop, it's something really amazing. 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.
- trallnag 4y agoHave you considered something like Ansible instead? It's not as clean as Nix but works good enough in my opinion.
- GNOMES 4y agoThis is currently how I manage my dot files + app installs on my different hosts. Nix is interesting for me from an immutable point of view though (mainly NixOS).
- JamesSwift 4y agoYes you are basically describing home-manager. I dont use NixOS so I'm not sure if home-manager is a necessary addon there, but on Mac I use nixpkgs + home-manager.
- dlyons 4y agoI second the recommendation for zero-to-nix, it's a great resource. I really like what DetSys is doing for the Nix community! In addition to that, check out this Shopify video series: - https://www.youtube.com/playlist?list=PLRGI9KQ3_HP_OFRG6R-p4iFgMSK1t5BHs https://www.youtube.com/playlist?list=PLRGI9KQ3_HP_OFRG6R-p4... - https://shopify.engineering/what-is-nix 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: - https://github.com/dustinlyons/nixos-config https://github.com/dustinlyons/nixos-config
- indemnity 4y agoLooks like we are kindred spirits, but you are much farther on your journey! Going to spend some good time this weekend studying your config :)
- outworlder 4y agoYou can try Nix first(the package manager) without bothering with the OS initially. I have nix with home-manager in my OSX laptop. Becoming comfortable with the package manager makes understanding NixOS much easier. 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.
- drakerossman 4y agoI'm writing a book about NixOS, you may track the progress here: https://drakerossman.com/blog/practical-nixos-the-book https://drakerossman.com/blog/practical-nixos-the-book 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?
- indemnity 4y agoNow that this binary installer exists I would definitely recommend it. 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 https://github.com/leonbreedt/dotfiles Won’t work for you out of the box tho as it depends on private repo for sensitive configs.