this post was submitted on 29 Apr 2025
724 points (97.9% liked)

linuxmemes

24670 readers
1390 users here now

Hint: :q!


Sister communities:


Community rules (click to expand)

1. Follow the site-wide rules

2. Be civil
  • Understand the difference between a joke and an insult.
  • Do not harrass or attack users for any reason. This includes using blanket terms, like "every user of thing".
  • Don't get baited into back-and-forth insults. We are not animals.
  • Leave remarks of "peasantry" to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
  • Bigotry will not be tolerated.
  • 3. Post Linux-related content
  • Including Unix and BSD.
  • Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of sudo in Windows.
  • No porn, no politics, no trolling or ragebaiting.
  • 4. No recent reposts
  • Everybody uses Arch btw, can't quit Vim, <loves/tolerates/hates> systemd, and wants to interject for a moment. You can stop now.
  • 5. 🇬🇧 Language/язык/Sprache
  • This is primarily an English-speaking community. 🇬🇧🇦🇺🇺🇸
  • Comments written in other languages are allowed.
  • The substance of a post should be comprehensible for people who only speak English.
  • Titles and post bodies written in other languages will be allowed, but only as long as the above rule is observed.
  • 6. (NEW!) Regarding public figuresWe all have our opinions, and certain public figures can be divisive. Keep in mind that this is a community for memes and light-hearted fun, not for airing grievances or leveling accusations.
  • Keep discussions polite and free of disparagement.
  • We are never in possession of all of the facts. Defamatory comments will not be tolerated.
  • Discussions that get too heated will be locked and offending comments removed.
  •  

    Please report posts and comments that break these rules!


    Important: never execute code or follow advice that you don't understand or can't verify, especially here. The word of the day is credibility. This is a meme community -- even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don't remove France.

    founded 2 years ago
    MODERATORS
     
    you are viewing a single comment's thread
    view the rest of the comments
    [–] [email protected] 34 points 13 hours ago (1 children)
    [–] [email protected] 3 points 2 hours ago (1 children)

    How the hell do you learn to use nix. I'm not a programer but figured out how to run gentoo just fine with the guide. nixOS feels like I'm in a mirror maze in the dark and the room is rotating.

    [–] [email protected] 1 points 57 minutes ago* (last edited 51 minutes ago)

    Well, Nix is a programming language, so there’s no getting around having to learn basic principles of coding.

    That said, I feel like coming into Nix with a lot of programming experience actually worked against me at first, because I made a lot of assumptions that weren’t true and basically had to “unlearn” certain things.

    The main things being:

    • Lazy evaluation is trippy as hell sometimes
    • The language truly does not allow for side-effects. Everything you might think is a side-effect is really executed from outside the language runtime itself
    • It might be more accurate to think of Nix as a database, where the keys are the parameters of what to build and the values are directories full of the built artifacts

    What really made it click for me was seeing how a derivation object is basically equivalent to a path. So if I do ”${pkgs.foo}/bar”, that’s the exact absolute path (plus /bar) where Nix will end up storing the output of the pkgs.foo derivation. Even without actually building the derivation, you can know where it will end up.

    Anyway, the documentation is pretty shitty, so you basically have to scour every community resource you can find and read way more of it than it seems like you should have to. Discord/Matrix servers help a lot too. And learning to navigate the source code for nixpkgs.

    Also: Don’t start with NixOS, imo. Start with dumb throwaway stuff where you make a derivation that downloads a file and unzips it and runs a single command. Once you understand that, do something that requires understanding a bit of nixpkgs, like using overlays. Then you can use NixOS. Otherwise, there’s too much going on all at once.

    Edit:

    • Nix pills is good
    • Vimjoyer is amazing