105
submitted 7 months ago by savbran@feddit.it to c/linux@lemmy.ml
you are viewing a single comment's thread
view the rest of the comments
[-] fraichu@lemmy.ml 29 points 7 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.

[-] null@slrpnk.net 15 points 7 months ago

My disappointment is immutable

[-] callyral@pawb.social 6 points 7 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 7 points 7 months ago* (last edited 7 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 3 points 7 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 1 points 7 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 1 points 7 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 1 points 7 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 1 points 7 months ago* (last edited 7 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 2 points 7 months ago* (last edited 7 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 1 points 7 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 1 points 7 months ago* (last edited 7 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 1 points 7 months ago* (last edited 7 months ago)

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

[-] null@slrpnk.net 1 points 7 months ago

Oh gotcha, sorry.

For what it's worth, I'm still reasonably new to NixOS (but not Linux) so it's entirely possible I'm way off base.

[-] lambda@programming.dev 1 points 7 months ago

I thought about doing that but updating nixos confuses me. Does nixos-rebuild switch pull new packages? To my understanding there is a file that saves all currently installed versions of packages and switch only adds new things but wouldn't update packages.

Like, if I want to update Google Chrome. Doing switch wouldn't change anything if the config hasn't changed, right?

[-] null@slrpnk.net 3 points 7 months ago* (last edited 7 months ago)

I believe that's correct -- if nothing has changed from your last generation, then the new generation will be identical. But if something has changed, it will do a bunch of duplicating and remapping symlinks in the Nix store to ensure that everything plays nicely together and that you can rollback to a previous generation if needed.

So if you do a rebuild switch regularly, you will end up with gigs worth of old "copies" of things that aren't being referenced in your current generation.

That's what nix-collect-garbage handles -- once you know your current generation is working well, you collect the garbage and recover that space, at the expense of not being able to roll back.

That's why I think building a core system with NixOS and then having user software come from Flatpak is a nice combo for simple workstation that won't update and bork itself, leaving my grandpa without a laptop until I can come take a look.

Edit: To clarify, nixos-rebuild-switch won't update your Flatpaks at all -- just the Flatpak service

[-] lambda@programming.dev 1 points 7 months ago* (last edited 7 months ago)

That makes a lot of sense. I can setup their computer with nixos and stuff that needs to be updated regularly (like a web browser) can be flatpak which should be more stable too.

Then flatpak update would get them updated without rebuilding the whole OS.

My grandparents have been rocking Linux Mint for a few years. I have managed Chrome through Flatpak since I discovered that was possible on Mint. I've been flirting with the idea of having NixOS instead so I don't have to remember what I've configured in the past. I'm not 100% sure now though :-P

[-] null@slrpnk.net 1 points 7 months ago

Exactly right. Throw in Plymouth and set the bootloader timeout to 0 and you've got a noob-friendly workstation.

[-] lambda@programming.dev 1 points 7 months ago
[-] null@slrpnk.net 2 points 7 months ago* (last edited 7 months ago)

It's a graphical boot screen.

Just helps eliminate all the bootloader noise you see when booting up or powering off that make scare off less tech-savvy folks

[-] lambda@programming.dev 1 points 7 months ago

Oh cool. My grandparents don't have any idea that scrolling text isn't normal on startup. Neat project though!

[-] lemmy_user_838586@lemmy.ml 4 points 7 months ago* (last edited 7 months ago)

Ahh, itsfoss.com. they had some article on "being a supercharged Joplin user" or some nonsense and suggestion 3 or 4 was "Create a notebook".... Really being a power user when you're utilizing the most basic functionality the app was created for....

this post was submitted on 24 Jan 2024
105 points (95.7% liked)

Linux

47298 readers
1387 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS