I’d appreciate it if any NixOS users here could offer a little advice: I’ve played a little with Nix, and read about NixOS, and I’m interested in switching because there are enough things that tempt me:
Defining my workstation setup in a single, easily understood, interpretable file (I sort-of-but-not-really have this now with an org doc that contains notes + shell commands to be run on a new Fedora install).
Nix shell for ad-hoc (and not!) envs for work stuff (honestly, this alone might be the killer feature).
The apparent ease of writing my own nix packages.
However, I’ve become used to the following and I don’t want to lose them:
Up-to-date kernels. I use the AMD opensource drivers and they’re a work-in-progress (I see the brand new Impala release has 4.14, the previous release was 4.9; my “old” Fedora 27 install already has 4.15).
Wayland, for all its foibles, has fixed my screen tearing woes and in its up-to-date Fedora/GNOME incarnation works very well for me. I don’t want to go back to X.
Things working; Fedora is boring in a good way, I can get on with my work with very little fiddling.
Is NixOS for me? Would a combination of Fedora + Nix perhaps serve me better?
A lot of people, including me, are already using home-manager successfully. It has its own set of user modules (out of necessity) and works like NixOS’ configuration.nix. It also has a NixOS module you can use to put all your home-manager configuration directly into configuration.nix and have it apply in a single nixos-rebuild switch. Its state is moderately active, getting a decent amount of PR’s which are merged quickly. I and many others can definitely recommend it to anybody using NixOS.
In comparison, the PR you linked seems more dead than anything. The creators of home-manager (rycee) and NixUP actually intended to work together at some point, but from what I heard from rycee, there wasn’t much communication for a while now.
No update in 6 months and very sparse updates in general, there have been a ton of merge conflicts for a while now. The author almost hasn’t been active at all the last 12 months. There have been multiple instances of him picking it up again, but then silence again (see the comments on the PR). It’s now the third oldest open PR in nixpkgs. It’s probably one of the biggest changes to nixpkgs too.
The main reason for the success of home-manager is probably just that the author set up a nice repository with a readme and spreading the word. And it’s completely usable on any Linux and even macOS, all in user space, the NixOS integration module is the cherry on the top.
I see, that’s a little disappointing. I’ve been following the PR for a long time - while it will get put to good use either way, I even made an additional donation to Nix purely because I was hoping to see some work going towards it. I was hoping to see it merged soon. I guess I’ll have to start taking a better look at home-manager.
Do you know if there is any reason home-manager hasn’t been merged into NixOS? Is it not suitable to be in NixOS, or is the plan to get it in at some point?
Always having to do PR’s to the already PR-overloaded NixOS will probably reduce home-manager’s development speed.
home-manager modules can’t be shared with NixOS modules as of now, which means there would be lots of duplicated functionality in a single repo, which nixpkgs maintainers wouldn’t like.
Any NixOS user can tell me if the only way to have the latest version of everything is to use the unstable channel? Basically I want Arch but with an easy undo button so I don’t look like a fool at work when upgrades go bad.
Even better, you can run stable, but then manually pull unstable packages out and install them. I ran 17.09 but pulled in the unstable LLVM 6.0 for example. The same would work for firefox/chrome or other packages.
for example:
let
unstablePkgs = import ((import <nixpkgs> { }).fetchFromGitHub {
owner = "NixOS";
repo = "nixpkgs";
rev = "Some future unstable nixos version with a version of firefox you want";
sha256 = "XXX";
}) { config = { }; }
in
unstablePkgs.firefox
If you paste that into a file default.nix and run “nix-build” (or now in this release “nix build”) it will give you exactly the right firefox like magic you can also install it into your user profile with nix-env -i.
edit: Or what you could do, is run unstable, but pull in old packages from the past if you don’t want the new one.
That’s a super easy way to do it. If you wanna add unstable and have a tool track the commits, you can use nix-channel, add it then install it via nix-env and a prefix.
Any NixOS user can tell me if the only way to have the latest version of everything is to use the unstable channel? Basically I want Arch but with an easy undo button so I don’t look like a fool at work when upgrades go bad.
True, I have never tried having multiple channels, but it works too.
I’d appreciate it if any NixOS users here could offer a little advice: I’ve played a little with Nix, and read about NixOS, and I’m interested in switching because there are enough things that tempt me:
However, I’ve become used to the following and I don’t want to lose them:
Is NixOS for me? Would a combination of Fedora + Nix perhaps serve me better?
boot.kernelPackages = pkgs.linuxPackages_4_15;has worked for me in both 17.09 and 18.03This is exactly what I was looking for, thank you.
I’m kind of disappointed declarative user profiles didn’t make it into the release. That was the big thing I was looking forward to.
That would solve a lot of problems and replace ad-hoc tools. I’m glad to see that this is on the roadmap for Nix!
A lot of people, including me, are already using home-manager successfully. It has its own set of user modules (out of necessity) and works like NixOS’
configuration.nix. It also has a NixOS module you can use to put all your home-manager configuration directly intoconfiguration.nixand have it apply in a singlenixos-rebuild switch. Its state is moderately active, getting a decent amount of PR’s which are merged quickly. I and many others can definitely recommend it to anybody using NixOS.In comparison, the PR you linked seems more dead than anything. The creators of home-manager (rycee) and NixUP actually intended to work together at some point, but from what I heard from rycee, there wasn’t much communication for a while now.
How is it dead? It’s just been awaiting review for a while.
Home manager does seem like a good option, and I’m sure it works, but I’d like to see something that’s built directly into NixOS.
No update in 6 months and very sparse updates in general, there have been a ton of merge conflicts for a while now. The author almost hasn’t been active at all the last 12 months. There have been multiple instances of him picking it up again, but then silence again (see the comments on the PR). It’s now the third oldest open PR in nixpkgs. It’s probably one of the biggest changes to nixpkgs too.
The main reason for the success of home-manager is probably just that the author set up a nice repository with a readme and spreading the word. And it’s completely usable on any Linux and even macOS, all in user space, the NixOS integration module is the cherry on the top.
I see, that’s a little disappointing. I’ve been following the PR for a long time - while it will get put to good use either way, I even made an additional donation to Nix purely because I was hoping to see some work going towards it. I was hoping to see it merged soon. I guess I’ll have to start taking a better look at home-manager.
Do you know if there is any reason home-manager hasn’t been merged into NixOS? Is it not suitable to be in NixOS, or is the plan to get it in at some point?
These are the reasons I can think of right now.
Any NixOS user can tell me if the only way to have the latest version of everything is to use the unstable channel? Basically I want Arch but with an easy undo button so I don’t look like a fool at work when upgrades go bad.
I’m an Arch -> NixOS convert and run unstable, it’s basically what you’re looking for.
Thanks you very much.
Even better, you can run stable, but then manually pull unstable packages out and install them. I ran 17.09 but pulled in the unstable LLVM 6.0 for example. The same would work for firefox/chrome or other packages.
for example:
If you paste that into a file default.nix and run “nix-build” (or now in this release “nix build”) it will give you exactly the right firefox like magic you can also install it into your user profile with nix-env -i.
edit: Or what you could do, is run unstable, but pull in old packages from the past if you don’t want the new one.
that is also my experience in using nix.
That’s a super easy way to do it. If you wanna add unstable and have a tool track the commits, you can use
nix-channel, add it then install it vianix-envand a prefix.True, I have never tried having multiple channels, but it works too.