3 ms·
I'm using NixOS for my HPTC and home PC. It took some to set it all up, including adding a few new packages (mostly related to 3D printing) and fixing some, but
by ambrop7 12y ago
I'm using NixOS for my HPTC and home PC. It took some to set it all up, including adding a few new packages (mostly related to 3D printing) and fixing some, but now it's running well and I'm really happy. I've always wanted distro where I can have all the configuration on the same place and which I can use to reproduce the whole thing.
There's a gotcha though. The default configuration will use the "channel" as the package repository (which is really just a nixpkgs snapshot that was automatically built by the build farm and automatically tested to some extent). Updating the channel is stateful - it's non-trivial to go back to a previous version of a channel, in case you want to extend and rebuild a working configuration (not just boot it). Personally I avoid the channels and instead just manage a nixpkgs git checkout, where you can make a tag whenever you're happy with the results of nixos-rebuild, possibly with an equally named tag in your configuration (/etc/nixos) repo.
Another problem is the insecurity of the channels and the cache. By default Nix will try to fetch builds from cache.nixos.org, even if you don't use channels, and anyone capable of MITM could give you whatever he wants. So for the moment, I've disabled the cache on my systems and I build everything locally (and the nixpkgs is fetched over HTTPS). I think that signing is being worked on though.
On a positive note, it's very easy to get help, and it's not hard at all to get fixes and package additions merged. All my added packages were merged in a few days, most within a few hours. In Gentoo I usually had an overlay with 15 or so packages, now I have just 2 local commits in nixpkgs. On the other hand, if you're using channels, making local changes is a bit harder than Gentoo's overlays.
- yetfeo 12y agoDo you have any tips on managing a nixpkgs clone vs using channels? How do you set it up to default to your clone for example?
- ambrop7 12y agoI wrap the nixos-rebuild command into a script that sets a custom nixpkgs: #!/bin/sh exec nixos-rebuild -I nixpkgs=/etc/nixos/nixpkgs "$@" This itself works, but then you're probably still using channels for nix-env (user profiles). These need to be configured separately. Or maybe with NIX_PATH, I don't know since I don't use the user profiles feature. After that, you just work with it like any git repo (presumably you, like git pull --rebase, git rebase -i...).
- Lethalman 12y agoFor using with nix-env, there's still -I, or -f. E.g. nix-env -f ~/nixpkgs -iA thepackage.