• Laser@feddit.de
    link
    fedilink
    arrow-up
    3
    ·
    9 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
      1
      ·
      9 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
        1
        ·
        9 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
          1
          ·
          9 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
            1
            ·
            edit-2
            9 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.

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

              They cover a few things – most notably they replace channels, which are imperative.

              Unless I’m way off, you can also install user software through flakes if you add them as inputs. That’s what I’m doing with Musnix.

              You can also pull a repo and ‘nix run .#software’ from the command-line, without entering a shell. That’s how I’m using NixifiedAI.

              • Laser@feddit.de
                link
                fedilink
                arrow-up
                1
                ·
                9 months ago

                They cover a few things – most notably they replace channels, which are imperative.

                True. I never considered channels imperative, but rather a purity issue. But I guess this is a matter of perspective.

                Unless I’m way off, you can also install user software through flakes if you add them as inputs.

                I don’t know about this, but that doesn’t mean anything.

                You can also pull a repo and ‘nix run .#software’ from the command-line, without entering a shell.

                True, though this by default only runs the default binary, and you’re probably in a shell anyways, so it doesn’t save that much. Also that output is, to my knowledge, not protected by garbage collection. But my knowledge of any imperative stuff is minimal, so I don’t know if that’s the case there.

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

                  I don’t know about this, but that doesn’t mean anything.

                  Why doesn’t it mean anything? You add the flake as an input (declarative) and then add the software to your config (also declarative).

                  I’m not arguing that it’s better, or saves time, just that it takes things that were done imperatively, and makes them declarative.

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

                    I meant that just because I don’t know about it doesn’t mean that it isn’t possible.