• 4 Posts
  • 23 Comments
Joined 1 year ago
cake
Cake day: June 13th, 2023

help-circle














  • the problem nix trying to solve is reproducible build, which means from a single config file you can migrate to any machine and have the same environment, auto install and dot files. While other package manager install in a imperative way, which means you have to call the install command on every package you need and you have to remember it. That’s the basic difference. You can consider trying it if you see it’s worth it. It’s harder than any other package manager I know, but it solves a different problem.







  • oh yeah, Nix is powerful and also has quite a steep learning curve compared to other tools, but you can adopt gradually, some utility of Nix I can list out here:

    • experimenting with packages with nix-shell when you are not sure if u want to install
    • use it just like other package managers like homebrew, yay, etc with nix-env (imperative way, not really recommended by the community)
    • manage the entire dev environment with home-manager and nix flake. If you use macOS or nixOS, you can even manage your OS settings (on macOS uses nix-darwin)
    • manage dev dependency on project level with direnv + nix. for example, you don’t want to install python on your machine, but only want it active in the repo you’re working on, u can declare it inside the repo

    here is my tutorial a while ago, I still don’t write the next part but this might be a good start for u. And here is my personal setup using nix and home-manager