4 ms·
I'm glad this guide is focused on flakes. If you're starting out with Nix, forget about home-manager, nix-env, and the pre-flake configuration model.
by smasher164 4y ago
I'm glad this guide is focused on flakes. If you're starting out with Nix, forget about home-manager, nix-env, and the pre-flake configuration model.
- licebmi__at__ 4y agoBut what if I manage my home-manager configuration with flakes.
- smasher164 4y agoUsually you’re on a single-user system anyway though. You should be able to manage all that with your global configuration.nix. You’ll also get the benefit of rollbacks.
- pxc 4y agoHome Manager is nice if you're on non-NixOS, where you don't have a configuration.nix. :)
- smasher164 4y agoI use configuration on macos as well, so I'm not sure what you mean?
- pxc 4y agoYeah, Home Manager is more redundant if you're using Nix-Darwin for a configuration.nix. Non-NixOS Linux doesn't have an equivalent module system to Nix-Darwin, though, so if you want a module system for declarative config there it's Home Manager.
- smasher164 4y agoI see. Yeah that's a shame.
- eterps 4y agoSo Nix does not support system level declarative config on Linux except for NixOS? Oh wow, that sucks.
- pxc 4y agoYeah. It's an unfortunate gap. There is some work in NixOS-WSL on a special Systemd shim which allows that NixOS instance to work with the WSL-provided Systemd that Microsoft recently added with their 'native' systemd support. I wonder if that can be extended to port NixOS to systems where it doesn't control the whole stack. Ideally we'll eventually see existing module systems unified with that of NixOS via some kind of process management abstraction framework, and you'll be able to do NixOS-like things in more places with a shared codebase. Edited to add: there's nothing as simple as NixOS or Nix-Darwin, but you can use Disnix to deploy configured services via Nix on non-NixOS. Not something I'd go for on desktop, but it's there.
- licebmi__at__ 4y agoYou can rollback with plain home-manager: https://github.com/nix-community/home-manager/blob/master/docs/usage.adoc#rollbacks https://github.com/nix-community/home-manager/blob/master/do...
- SuperSandro2000 4y agoMy very personal recommendation: You don't, at least on a single user machine. Instead you use one of the many dotfile managers out there and for anything package related NixOS. home-manager makes the feedback loop for editing configs managed through it very long, which slowed me personally down a lot. One place where I would recommend home-manager is, if you are not using NixOS and only manage your packages through it.
- licebmi__at__ 4y agoa lot of software support including configuration files, so what I do is that my configuration has a permanent configuration and a temporary configuration through including a "local" file. This even helps as a workaround to managing secrets for some stubborn stuff to which you need to put some api key or password on a text file (shitty software exist). Otherwise, I haven't seen much problem with managing home with home-manager. I also can load the same config with the nixos and darwin modules.