• rozodru@piefed.social
    link
    fedilink
    English
    arrow-up
    12
    ·
    2 天前

    I got started on NixOS on a whim really. I distro hopped every so often and like a month ago I wanted to try something different. Already used Arch, Fedora, Ubuntu, Debian, etc but figured I’d give NixOS a shot.

    At first I hated it and it just confused the hell out of me. Then when someone told me I should use flake for my config so I could through it in a repo it just clicked. Once you figure it out and “get it” it just becomes so easy. I’m still a noob at it but I absolutely love NixOS. It just makes everything so easy when you got everything in a flake with a config and home nix. Even backups are easy as you literally can just put it in your config to run. I even have it how where it’ll toss out old generations after 10 days automatically.

    Plus the fact I can just use stuff without actually installing it is awesome. as a Dev NixOS is brilliant for that.

    • Clay_pidgin@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      2
      ·
      2 天前

      Can you explain to me what a flake is? I’ve read the guides but I didn’t really get it.

      I’m using home-manager but that’s about as complicated as I’ve gotten.

      • Euphoma@lemmy.ml
        link
        fedilink
        English
        arrow-up
        2
        ·
        1 天前

        Its like a project configuration for a nix lang project (can be stuff from nixos config to nix packages or a collection of nix packages). It configures inputs to that project (other nix flakes, online tar files, git repos) and the version of that input, to stay the same unless you nix flake update.

        • Clay_pidgin@sh.itjust.works
          link
          fedilink
          English
          arrow-up
          2
          ·
          1 天前

          So it’s both to lock packages to a certain version, and to allow you to add stuff to your system that isn’t in the NIX or AUR repos?

          • rozodru@piefed.social
            link
            fedilink
            English
            arrow-up
            1
            ·
            1 天前

            yeah basically it locks it to your current build/system.

            So for example I use it for my overall system config. I have a flake, a configuration.nix, and a home.nix all of which are tied to my git repo. I make a change to the system be it installing a package or modifying something or other I can then push that to my git repo. Say I want to take my system as is and put it on another pc/laptop I can then go on the new machine, clone my nix repo, and build it now that new machine is exactly the same setup as my main machine. Like a few weeks ago I put Arch on my main machine for a couple weeks and then went back to nix. It took less than 10minutes to install NixOS and get my machine back to where it was exactly prior to putting Arch on it.

            For Dev work flakes allows you to bypass the whole “well it works on my machine” since you develop in flakes you can take that development environment anywhere and it’ll always work regardless of what machine you put it on.

            Think of it sort of like a Docker container.

            • Clay_pidgin@sh.itjust.works
              link
              fedilink
              English
              arrow-up
              1
              ·
              15 小时前

              Does having a flake lock the versions of everything, or just the packages mentioned in the flake? (I assume the latter)

              I had a flake for a minute but since I had no idea what I was doing, I was more comfortable nursing that stuff into my config.nix.

                • Clay_pidgin@sh.itjust.works
                  link
                  fedilink
                  English
                  arrow-up
                  0
                  ·
                  12 小时前

                  Sorry, I’m not certain which way your answer goes. Nixpkgs would be all packages in the system, even if installed in config.nix or home.nix?

  • hellmo_luciferrari@lemmy.zip
    link
    fedilink
    arrow-up
    1
    ·
    2 天前

    I’ve wanted to give NixOS a shot, but I have very little reason to switch away from Arch. I have my install tailored to be exactly what I want. No fuss in maintaining it either.

    • hisao@ani.social
      link
      fedilink
      English
      arrow-up
      7
      ·
      2 天前

      It’s a horrible distro for trying to run your desktop.

      Why? Do you know any other distro that lets you swap your default kernel to a number of real-time gaming-optimized kernels in few lines of configs at any moment without any risks? Also, just install toolbox/distrobox/homebrew into it for minor stuff that you don’t mind being reproducible enough to justify bloating the config.

      • Overspark@piefed.social
        link
        fedilink
        English
        arrow-up
        4
        arrow-down
        1
        ·
        2 天前

        This particular example isn’t very good, just install multiple kernels (or compile one yourself) on your distro of choice and boot into the one you want with your bootloader of choice. Once set up you don’t even have to change any configs any more, just use an interactive menu on boot. So even easier than NixOS? There are plenty of valid use-cases for Nix, this isn’t one of them.

        • hisao@ani.social
          link
          fedilink
          English
          arrow-up
          4
          ·
          2 天前

          just install multiple kernels (or compile one yourself) on your distro of choice and boot into the one you want with your bootloader of choice

          That’s way more complicated than adding a single line of text in a single text file and also having guaranteed way back if anything goes wrong.

    • priapus@piefed.social
      link
      fedilink
      English
      arrow-up
      6
      arrow-down
      1
      ·
      2 天前

      Thats just not true. Nix and NixOS are not the same thing. Nix is meant for CI/CD. NixOS is an OS designed for both desktop and server use. Why would there even be so many desktop environments and desktop software packages if it wasnt designed to be used on a desktop?

    • rycee@lemmy.world
      link
      fedilink
      arrow-up
      7
      arrow-down
      2
      ·
      2 天前

      Its not for everyone but I’ve been using NixOS as my desktop OS for nearly 10 years and I am honestly pretty satisfied with the experience.

  • hisao@ani.social
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    2
    ·
    2 天前

    niche exotic distro nobody knows about

    the only one of its kind based around the idea of config-driven reproducible immutable builds

    Is NixOS Just Hype?

    Pretty sure it’s not “hype” at all, but if it was it wouldn’t be “just hype”.

    • priapus@piefed.social
      link
      fedilink
      English
      arrow-up
      6
      arrow-down
      1
      ·
      2 天前

      It has 9k contributors and 20k stars. Just because you havent heard of it doesnt mean nobody has.

      Also Guix is doing the exact same thing.