this post was submitted on 01 Jun 2024
48 points (92.9% liked)

Nix / NixOS

1743 readers
3 users here now

Main links

Videos

founded 1 year ago
MODERATORS
 

I recently tried switching from Arch to NixOS and the experience I had can best be described as apalling. I have not had a new user experience this bad since my first dip into Ubuntu dependency hell back in 2016. I'd like to preface this by saying I've been a Linux user in one form or another for almost half my life at this point, and in that time this may well be the most I've struggled to get things to work.

Apparently they have this thing called home-manager which looks pretty cool. I'd like to give that a shot. Apparently I have to enable a new Nix channel before I can install it. I'm guessing that's the equivalent of a PPA? Well, alright. nix-channel --add ..., nix-channel --update (oh, so it waits until now to tell me I typo'd the URL. Alright), and now to run the installation command and... couldn't find home-manager? Huh?? I just installed it. I google the error message and apparently you have to reboot after adding a new nix-channel and doing nix-channel --update before it will actually take effect, and the home-manager guide didn't tell me that. Ah well, at least it works now.

I didn't want to wait for KDE and its 6 morbillion dependencies to download, so I opted for Weston. It wasn't a thing in configuration.nix (programs.weston.enable=true; threw an error and there was no page for it on the NixOS wiki), but it was available in nix-env (side note: why does nix-env -i take upwards of 30 seconds just to locate a package?), so I installed it, tried to run it, and promptly got an inscrutable "Permission denied" error with one Google result that had gone unresolved. Oh well, that's alright, I guess that's not supported just yet -- I'll install Sway instead. Great, now I have a GUI and all I need is a browser. nix-env -i firefox gave me the firefox-beta binary which displayed the crash reporter before even opening a browser window. Okay, note to self: always use configuration.nix. One programs.firefox.enable=true; and one nixos-rebuild switch later, I'm off to the races. Browser is up and running. Success! Now I'd like to install a Rust development environment so I can get back to work. According to NixOS wiki, I can copy paste this incantation into a shell.nix file and have rustup in there. Cool. After resolving a few minor hangups regarding compiler version, manually telling rustc where the linker is, and telling nix-shell that I also need cmake (which was thankfully pretty easy), I'm met with a "missing pkg-config file for openssl" error that I have absolutely no idea how to begin to resolve.

I'm trying to stick with it, I really am -- I love the idea that I can just copy my entire configuration to a brand new install by copying one file and the contents of my home directory and have it be effectively the same machine -- but I'm really struggling here. Surely people wouldn't rave about NixOS as much as they do if it was really this bad? What am I doing wrong?

Also unrelated but am I correct in assuming that I cannot install KDE without also installing the X server?

you are viewing a single comment's thread
view the rest of the comments
[–] gramgan@lemmy.ml 9 points 5 months ago* (last edited 5 months ago) (4 children)

Hey friend,

My recommendation is to keep things dead simple as you start out—no fancy channels or flake inputs and such, at least not where not necessary. I’ve found a lot of success in going slow, and not feeling rushed to do everything the NixOS way at first (for example, I still manage my dotfiles with GNU stow instead of home-manager). I started off with a very simple flake and basically just using my configuration.nix to declare packages, gradually learning more from there. The Nix ecosystem is as extremely powerful as it is poorly documented—it unfortunately sometimes takes a while to (as you’ve noted) even just find information.

I’ve linked below two sites I found unbelievably helpful in my journey—the first one helps you get up and running with a very simple flake (and, yes, you will want to use a flake, even if it isn’t obvious right now why), and the second one is a huge search engine of all NixOS options, the first place I check when I’m putting something new on my system.

Good luck!

https://nixos-and-flakes.thiscute.world/

https://mynixos.com/

[–] xylazineDream@lemmy.dbzer0.com 1 points 5 months ago

This is the one, make it work, then slowly make it fancy

Besides, the dynamic nature of how many NixOs configurations work, is our only defense against the coming ai menace lol

load more comments (3 replies)