103
submitted 9 months ago by savbran@feddit.it to c/linux@lemmy.ml
you are viewing a single comment's thread
view the rest of the comments
[-] blotz@lemmy.world 36 points 9 months ago* (last edited 9 months ago)

What's up with the ux design of nix? I get it's made for advanced users but still. I'm reading through this guide and man it's convoluted.

The different ways of installing packages. Either through editing the configuration.nix or running a command. The weird inconsistency of nix commands. nix-env -iA to install and nix-env --uninstall to uninstall. Then updating uses nix-channel --update but upgrade uses nixos-rebuild switch --upgrade. All this to use the package manager. Also haven't even mentioned flakes or home manager.

It's a cool OS, but the UX really needs work imo.

[Edit] I do wanna add something else too because I feel like my point isn't getting across.

It's okay to have a complicated ui. Especially if your target audience are tech-savvy. But even tech-savvy people have to start as new users. A tech-savvy new user isn't going to know what the best practices are. Being able to anticipate the steps for installing a package is important for ux. If the commands for installing packages isn't cohesive/intuitive, then the user has to spend more time looking for guides and learning how to use the software.

People also mentioned a new command in the works. This is great! However, these current commands are being recommended through blogs and nix. New users won't know about this new command.

[-] rutrum@lm.paradisus.day 7 points 9 months ago

They have resolved this exact problem. There is an "experimental" cli tool that fixes a lot of your complaints about nix-env, nix-channel, etc. Itcs wrapped together with "flakes". This newer feature is a little different, and working with or without flakes segments the community AND the types of articles about nix, like this one.

As far as I know though, nixos related thing still have a bizarre set of commands, and even with flakes "nixos-rebuild switch --upgrade" is still how you switch configs.

And as far as installation goes, using nix-env -iA really is a bad practice. Thats installing something ad hoc like you would in any other package manager. That defeats the point of nixos, where your configuration file explicitly defines all the packages you need installed, and nothing else. Nix will remove any packages you didnt specify.

[-] blotz@lemmy.world 6 points 9 months ago* (last edited 9 months ago)

Oh that's good that they are addressing those issues with a new command. Hopefully it gets into stable soon.

Might be that nix-env -iA is bad practice! I'm strictly talking about ux design here and nix-env -iA is being recommend by blogs and nix themselves. (Nixpkgs tells you how to install using nix-env -iA)

A new user isn't going to know what bad practice is.

[-] MaliciousKebab@sh.itjust.works 2 points 9 months ago* (last edited 9 months ago)

It actually recommends using nix-env -i, which is even worse because with that command it searches the whole repository instead of just getting the correct attribute on nixpkgs. It takes half a minute to run the command, it's insane.

[-] lambda@programming.dev 1 points 9 months ago

What is this experimental tool called so I can read more about it?

[-] rutrum@lm.paradisus.day 1 points 9 months ago

Add this to your nix.conf: experimental-features = nix-command flakes

Then check out nix --help.

load more comments (20 replies)
this post was submitted on 24 Jan 2024
103 points (95.6% liked)

Linux

48179 readers
1042 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS