I like your dotfiles! I can tell you’re getting a bit burnt out of the initial setup, so let me preface this:
Yeah, it can be somewhat of a chore to migrate to NixOS. The result will be a breeze to maintain, and you’ll never be tempted to reinstall your systems again, but until you get there you need to learn how it all works and why what you’re doing at the moment is problematic in the first place.
I like comparing nix to rust - it puts limitations on you, not in terms of what can be achieved, but in how you can get there. But in so doing, it enables giving you guarantees and automated tooling that would be impossible or very hard to achieve in the traditional model.
You’ll run into a lot of these problems with home-manager on another distro, too, except there will be more complex edge cases caused by different versions of software intermingling. It’s best to start with a simple config on NixOS, and work from there.
I personally use my dotfiles on many distros, usually when I’m forced to use ubuntu because a customer wants me to, it’s possible. It just takes knowing nix well enough to deal with the problems, or minimizing the config to just a few applications (starting with your WM is probably not a good idea, browser or editor/IDE configuration is usually a good starting point, since it’s both complicated and yet achievable enough, and doesn’t leave you with a non-working system if you don’t instantly get it right).
I made the switch from gentoo to NixOS some 2-3 years ago now, I know exactly what the motivations and blockers are. Let’s see how we can get you comfortable enough to try things out!
I’m going to need a bit more info to help, though. It’d be easiest if you could share the NixOS config you used in your VM
- How exactly did you install the fonts in your NixOS config?
- How did you install polybar? Did you use services.polybar.config?
- I think the home-manager config also expects you to use services.polybar.script to launch your polybars - did you do that?
- Did you use the home-manager service to start x or manually run
Note that you can supply a file path to
services.polybar.config, and you can read your current script into
builtins.readFile - so you don’t actually need to rewrite your config to work with home-manager, just put it where home-manager can, well, manage it.
These are somewhat important details - there’s a fair bit of bespoke environment setup with fonts to get them to work on any distro, if you don’t play by the distro’s rules it will often break.
Yep, that’s somewhat expected. I’d love to see what “wont work at all” means exactly, and what the script is. It’s possible you just need to use a different shebang (and you can quite easily write one that works on all distros). Personally I tend to write little downstream derivations (read: packages): dotfiles/system-update.nix at 36a78efeed8291da16c932aefbea71c6b47d580b · TLATER/dotfiles · GitHub