How does it stack up against traditional package management and others like AUR and Nix?

  • Guenther_Amanita@feddit.de
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    That all sounds great, thanks!
    Do you have any tips for an “easy” start, where everything is already pre-configured?

    • Shareni@programming.dev
      link
      fedilink
      arrow-up
      3
      ·
      edit-2
      1 year ago

      Nope, and that’s the worst part of nix. I’m actually planning on writing a short startup guide, but I need to solve a few more issues first.

      But, this should help you out until then:

      The home.nix should be automatically generated, and that’s where you put all of your packages. I left a few as an example.

      NixGL is needed to use openGL (nixGL lutris for example). It works in most cases, but I couldn’t get alacritty or kitty to work. There are some ways to have packages automatically use it, but I still haven’t tried them out.

      Flake allows you to select the correct nix repo (stable/unstable), appropriate home-manager version, and add outside packages like nixgl. It’s technically not necessary, but I wouldn’t go without it. Here I’m using the unstable repository, check the relevant docs if you want to go with releases instead.

      The equivalent of apt update && apt upgrade is nix flake update && home-manager switch --impure. I like cd-ing into the nix dotfile directory (all of the files are in there and symlinked to ~/.config/ locations), but you can also use command line arguments to point to the flake.

      nix flake update updates the package definitions to what’s in the repo

      home-manager switch install them, and also updates any configs it’s managing. The --impure is only needed if you’re using nixgl (bad build commands depend on system time).

      Comment if you need help

      • Guenther_Amanita@feddit.de
        link
        fedilink
        arrow-up
        1
        ·
        edit-2
        1 year ago

        Thanks! I saved the comment for later.

        What advantage do you see in Nix compared to Distrobox?
        I personally enjoy DB because of its simplicity.
        I just open BoxBuddy, create a new container from the dropdown-list, and then just start using my Debian or Arch container on top of Fedora Atomic for example.

        The two main benefits I see in Nix are the reproducibility and the big repo. But in case of the repository size, Debian and Arch (+ AUR) are extremely big aswell.
        Are there any other big benefits, that I can’t get with Distrobox, but with Nix?
        Just as a small side note, I’m no power user and tend to use my PC more like a casual guy.