this post was submitted on 19 Dec 2025
3 points (100.0% liked)
Nix / NixOS
2555 readers
2 users here now
Main links
Videos
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
The point of using Nix as opposed to something like flatpak (or apt) is that all of your packages are managed through a text file (aka "declaratively"). The benefit of this approach is that, if you ever install a package that breaks something, you can easily undo any installation or system setting by reverting it in that single location. You also don't get the problem where your computer slowly fills up with stuff you no longer need, because necessary programs would only be pulled in if they're needed by ones you defined. This is also very nice for developers because it makes a system environment easy to replicate.
By installing packages with that command, you're removing the main benefits of Nix, which is why it isn't recommended. The recommended way to do it is to edit your nix configuration file with the package you want, and then run the nix rebuild command which will actually download the package. (There's also a clean command which will fully remove previously installed programs no longer being used)
NixOS is a Linux distribution built entirely around this concept, where everything about the OS is managed by Nix. Since you're just installing Nix on a steam deck, the config file won't be under /etc/nixos, but a different location. I'm honestly not too sure where though because I've only ever used Nix on NixOS.