4 ms·
I tried Nixos but I found out it is really easy to setup a system but then it gets harder when you get off the beaten path by messing with npm or steam for exam
by dimitar 6y ago
I tried Nixos but I found out it is really easy to setup a system but then it gets harder when you get off the beaten path by messing with npm or steam for example.
I think a winning approach would be to manage the OS using nix, but let the user do more imperative stuff in his home directory.
Here is an illustration of how one is supposed to use a package manager for a programming language (in this example npm) in Nixos: https://unix.stackexchange.com/a/381797 https://unix.stackexchange.com/a/381797
And here is an article about the hoops needed to run Steam games: https://nixos.wiki/wiki/Steam https://nixos.wiki/wiki/Steam
- takeda 6y agoThat's how it works normally, but once you get to the point of having the system configured declaratively, people strive for more. The home-manager as far as I know is not official component, but a lot of people add it because they love the idea. I think anyone who is interested in Nix should start with Nix Pills[1] they are concentrating on just nix and nixpkgs, but I think it is minimum getting started. Once you are familiar how to build nix derivations, adding custom components is not that hard. [1] https://nixos.org/nixos/nix-pills/index.html https://nixos.org/nixos/nix-pills/index.html
- Shoue 6y agoRegarding NPM, you can do user-level "global" installs on NixOS, see toraritte's answer in the same Stackexchange question. NPM should work fine within a project, but if you need specific dynamic libraries that a Node package implicitly depends on, you can specify them using Nix, and this means you automate the process of installing system dependencies for anyone else who touches the project too. While you could use nix-shell, it is IMO a dated and very manual way, preferably you'd use direnv or lorri to automatically load a default.nix or shell.nix from your project root directory where libraries have been specified in `buildInputs`.