McMahon reaction meme depicting increasing satisfaction. Descriptions read as follows:

  1. “You discover a new app”
  2. “It’s in Nixpkgs”
  3. “It has a NixOS module”
  4. “It has a Home Manager module”
  5. “It has a Stylix module which makes it look awesome”
      • mogoh@lemmy.ml
        link
        fedilink
        arrow-up
        5
        ·
        3 months ago

        You use the word “declare” a lot. I am not sure, but in Nix I declare the desired state of installed packages and configurations in an obscure language and the package manger takes care of that, right?
        Now the module declare reasonable default configurations? Like http server starts on system start and serves on port 80?
        Now you lost me at the Home-Manger. I can declare stuff in my home folder. OK, so for user-wide configuration? For packages and configuration in the user space? Or what?

        • Justin@lemmy.jlh.name
          link
          fedilink
          arrow-up
          5
          ·
          3 months ago
          1. Yes.
          2. Yes, and if you want custom configuration, you can include your configuration in-line in the same file that installs the http server and sets up systemd for it. Or you can even write your own module that drops configuration files in the same file.
          3. Home-manager modules are modules that run stuff exclusively in ~, doing things like configuring browsers or dotfiles. As opposed to NixOS modules which configure system-level daemons.
        • Ephera@lemmy.ml
          link
          fedilink
          English
          arrow-up
          2
          ·
          3 months ago

          I am not sure, but in Nix I declare the desired state of installed packages and configurations in an obscure language and the package manger takes care of that, right?

          The package manager is only one (very important) component of the system that applies your configuration, but otherwise this is a good description, yeah.

          Now the module declare reasonable default configurations? Like http server starts on system start and serves on port 80?

          Obviously, it depends on each individual module, but so far, I’ve mostly been fine with the defaults. Typically, it doesn’t modify the configuration, unless you explicitly specify a configuration value, therefore using the defaults that the software normally uses.

          Now you lost me at the Home-Manger. I can declare stuff in my home folder. OK, so for user-wide configuration? For packages and configuration in the user space? Or what?

          It’s for user-wide configuration, so what would generally be stored in dotfiles. For example, you can configure the search engines in Firefox. Or the panel layout in KDE.

          Home-Manager can also install packages, which is useful, because it can also be used standalone on other distributions. And in particular, you usually want to declare that a package should be installed and what user configuration it should use, all in one place…

  • grrgyle@slrpnk.net
    link
    fedilink
    arrow-up
    17
    ·
    3 months ago

    I’ve been maining Linux for a decade and I’m completely lost. I think I need to catch up

  • juipeltje@lemmy.world
    link
    fedilink
    arrow-up
    7
    ·
    3 months ago

    While i like NixOS as an entire OS as well, at the moment i’m experimenting with just using nix + home manager on top of whatever distro i want, and i just had the realization that in the rare case that a package is not in nixpkgs, if you make your own derivation for it to build it from source, you can take that with you anywhere as well and don’t have to make another package for different distros you might be running. Pretty cool.