• fraichu@lemmy.ml
    link
    fedilink
    arrow-up
    0
    ·
    8 months ago

    Since I’m already a NixOS user, I thought to check out Series 4. One of the steps was “install flatpak”

    My disappointment is immeasurable and my day is ruined.

    • callyral [he/they]@pawb.social
      link
      fedilink
      English
      arrow-up
      0
      ·
      8 months ago

      “install flatpak”

      why would someone do that in NixOS? nix has a lot of packages and using flatpaks imperatively would lead to less reproducibility

      • null@slrpnk.net
        link
        fedilink
        arrow-up
        0
        ·
        edit-2
        8 months ago

        My usecase is that I want to build a rock-solid workstation laptop for my non-tech-savvy family member.

        I configure all the basics in .nix files, and then from there, they can install Flatpak from the software center, like they are used to doing.

        Then I can just do a rebuild switch when I see them, make sure it’s all working, and then trust that they probably won’t break the system in-between.

        Edit: to be clear, in my own config, if it’s not reproducible, I’m actively working to fix that.

        • Laser@feddit.de
          link
          fedilink
          arrow-up
          0
          ·
          8 months ago

          I mean why would you be fully against flatpak? I use NixOS without it and always packaged natively on Arch, but especially when upstream offers flatpak, it makes sense to enable it. Keeps the user-facing programs up to date and somewhat sandboxed while you can have a stable release beneath it. Especially if the system’s actual users aren’t that tech-savvy.

          Stuff on unstable tends to break, especially electron-dependent derivations. Stable doesn’t always have the latest and greatest. Flatpak seems like a good compromise for desktop applications in some cases.

          • null@slrpnk.net
            link
            fedilink
            arrow-up
            0
            ·
            8 months ago

            Well the only real reason when it comes to Nix is that they aren’t declarative. For a lot of Nix users, the ability to describe every bit of software and all their settings in one giant config file is the draw. Not necessarily anything against Flatpaks themselves.

            But I agree, I like being able to mix the two where it makes sense.

            • Laser@feddit.de
              link
              fedilink
              arrow-up
              0
              ·
              8 months ago

              NixOS itself by default isn’t fully declarative anyways, nix-env for example is imperative and very comparable to flatpak regarding applications.

              I welcome the efforts to move away from all imperative bits in NixOS though. My point was rather not to dismiss an article on NixOS for mentioning flatpaks.

              • null@slrpnk.net
                link
                fedilink
                arrow-up
                0
                ·
                8 months ago

                Flakes takes care of a lot of the imperative bits, but some people are wary of them since they’re marked experimental.

                • Laser@feddit.de
                  link
                  fedilink
                  arrow-up
                  0
                  ·
                  edit-2
                  8 months ago

                  I don’t think flakes can do much more declarative than “legacy” nix, rather they increase reproducibility and purity. Also their tooling doesn’t offer imperative stuff by default, but I’m not sure they cover use cases previously solved imperatively. E.g. I don’t think you can install user software through a flake. Sure you can create shells with software available, but that is also possible without flakes.

                  Maybe my understanding here is wrong though.

  • blotz@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    9 months ago

    What’s up with the ux design of nix? I get it’s made for advanced users but still. I’m reading through this guide and man it’s convoluted.

    The different ways of installing packages. Either through editing the configuration.nix or running a command. The weird inconsistency of nix commands. nix-env -iA to install and nix-env --uninstall to uninstall. Then updating uses nix-channel --update but upgrade uses nixos-rebuild switch --upgrade. All this to use the package manager. Also haven’t even mentioned flakes or home manager.

    It’s a cool OS, but the UX really needs work imo.

    [Edit] I do wanna add something else too because I feel like my point isn’t getting across.

    It’s okay to have a complicated ui. Especially if your target audience are tech-savvy. But even tech-savvy people have to start as new users. A tech-savvy new user isn’t going to know what the best practices are. Being able to anticipate the steps for installing a package is important for ux. If the commands for installing packages isn’t cohesive/intuitive, then the user has to spend more time looking for guides and learning how to use the software.

    People also mentioned a new command in the works. This is great! However, these current commands are being recommended through blogs and nix. New users won’t know about this new command.

    • CrabAndBroom@lemmy.ml
      link
      fedilink
      English
      arrow-up
      0
      ·
      8 months ago

      I’ve read so many things that try to explain what flakes are, and for the life of me I still don’t understand what they are or what they’re for lol.

      • Laser@feddit.de
        link
        fedilink
        arrow-up
        0
        ·
        8 months ago

        They’re not that different from the classic nix files. Their main difference is that their inputs are always well-defined (as opposed to a channels registry, i.e. you can get totally different systems by reapplying a configuration when you change channels which doesn’t change your nix file at all). A configuration is always exactly described by a flake.nix and flake.lock.

        I mean there is more to it, but this is the primary motivation. What you would normally put into use case specific nix files goes into a flake’s output section. The stuff in your input sections is what you can use in there.