• beeb@lemm.ee
    link
    fedilink
    English
    arrow-up
    39
    arrow-down
    2
    ·
    edit-2
    9 months ago

    NixOS users be like : meh, just rolling back

    • tb_@lemmy.world
      link
      fedilink
      English
      arrow-up
      15
      ·
      edit-2
      9 months ago

      I keep seeing comments about NixOS. As a relative newby just messing around for themselves, is there anything stopping me from/I should know about taking the plunge?

      I’ve only dipped my toe in Ubuntu.

      • As someone who’s using it daily:

        It’s pretty cool. But it’s not a “best” solution. It, like anything, has upsides and downsides.

        So let me quickly summarize NixOS for you:

        you will have to learn new how to configure your system. You can’t go into your Settings App anymore (well, you still can, but then you could just stay on Ubuntu, that’s the whole Point of NixOS) but instead you’ll have a file in /etc/nixos/configuration.nix everything System goes into that Config File. Then you can also use home-manager to customize your user. i.e. you want to use a special ssh setting. Home-Manager is (in my opinion) only useful if you have multiple Computers and sync your Config Files between them (in my case via Git) as any change made on one Computer will be synced to the other.

        so you have a lot more effort upfront. You have to relearn how to do stuff and you have to use a complicated File instead of a simple GUI.

        BUT:

        Once you did that effort, it is done. forever. You can just copy that Config file anywhere and you’re back on the exactly same system. Have two Computers and want to sync them? NixOS is the absolute best Option for that imo.

        Spinning up a lot of Servers/VMs that you want to be pre-configured and ready for use? NixOS. Servers you always want the same way? NixOS. you can also already declare public keys you use for SSH Authentications.

        so, you see, NixOS isn’t for everyone. It certainly is for me, but if you only ever use one Computer and prefer GUIs, stay away.

        • ag10n@lemmy.world
          link
          fedilink
          English
          arrow-up
          5
          ·
          9 months ago

          How is this any different than skeletons and using up ansible, salt or chef? Also hear a lot about Nix but don’t see the OS of NixOS

          • Ansible is more like a bash script, NixOS is a Config File

            If i remove a line from Ansible, nothing happens.

            If i remove a Line from my NixOS Config, it resets that Setting to its Default / uninstalls the Package / whatever.

            • You can always be sure that your NixOS is exactly like in the Config, since most of the OS is Read-Only. You can basically debug your entire OS in the Config Files.

            • some other Comfort Features. Better Readability of NixOS Configs, better integration, and obviously the nixpkgs package manager which is just chefs kiss

            Edit: sorry, didn’t see the last part.

            The difference between Nix and NixOS:

            Nix refers to the Nix Packege Manager. Its Packages are called Nixpkgs

            Nixpkgs are a new way to package packages without dependencies overwriting each other. Each package gets a uuid. So if one package needs dependency-x version 1.2 and another needs version 3.5, you can have both installed at the same time, since they’re installed in folders like “hansfhanazavdialavsislbajsknsvsjsksbhalvsja-dependency-x-1.2” instead of both trying to install into /etc/dependencyx (i know they don’t belong into /etc, this is for demonstration purposes)

            This is pretty cool and solves the dependency-hells you otherwise deal with. Many tout this as the real alternative Solution to Snaps and Flatpaks, although i personally don’t see it that way since i think we need to move towards a sandboxed package-format and nixpkgs isn’t that. So i personally use nixpkgs for system-applications and install user-applications via flatpak.

            Then there’s NixOS:

            NixOS isn’t a Fork of any Distro. Those madlads decided to take the nixpkgs and the Linux Kernel and just create a new Distro from thin air. And it somehow worked.

            NixOS uses the Nix-Daemon to read your configuration, install your packages, link them (from /nix/hwghaajvshkavahakaj-bash to /etc/bin/bash etc) and to configure your System (i.e. what ssh keys are allowed to connect)

            This way NixOS has become a declarative Distro on top of the Nix Package Manager

      • SidewaysHighways@lemmy.world
        link
        fedilink
        English
        arrow-up
        5
        ·
        9 months ago

        I keep wanting to dabble with nixOS as it almost seems like the docker compose of OS’s

        But every now and then someone comments and acts like it’s really hard or something.

        I so scared

        • null@slrpnk.net
          link
          fedilink
          English
          arrow-up
          7
          ·
          9 months ago

          If you can wrap your head around docker compose, you can handle nix.

          That is to say, I’d sounds like you aren’t afraid of tinkering and looking at other people’s solutions until you get your setup right. That’s what NixOS is all about.

          Solve that problem once, you’ve solved it forever. You don’t need to remember how you did it next time.

        • GreyBeard@lemmy.one
          link
          fedilink
          English
          arrow-up
          2
          ·
          9 months ago

          I daily drive it on 2 machines. Overall, it is super simple, if you know how to ready json or yml, you will understand the config file instantly. However, it is a unique OS, and works different than most other distros. As a result, any guide made for other Linux distros needs to be thrown out the window. It also doesn’t natively support most self executing packages like app image. All that said, it is fun and easy, just make sure when you look for support, you are looking for NixOS support.

      • beeb@lemm.ee
        link
        fedilink
        English
        arrow-up
        3
        ·
        edit-2
        9 months ago

        Neon explained it better than I ever could! I hope their answer satisfies you

      • KillingTimeItself@lemmy.dbzer0.com
        link
        fedilink
        English
        arrow-up
        3
        ·
        9 months ago

        nixos is like the hyper power user OS i think. Think of it like unixporn, if you like spending hundreds of hours perfecting your rice, you will love nixos (probably) if not, and you dont really care (like me) go use debian or arch or something else instead.