Looking for a modern, usable Linux OS preferably immutable
I have been trying some of the immutable linux OSes because from what I understand they are more modern and feature better security and reliability. What I have found so far is shocking. Half of these don't support my laptop (probably because it's nvidia optimus). Some I tried like guix were very difficult to install, configure, and use with sprase documentation. Good luck trying to use KDE, wayland, or pipewire for example. BlendOS was notably better and could at least run on my laptop but chocked with nvidia driver issues.
I have switched to pop os on my laptop for now but looking at alternatives and what to install on my desktop.
Compared to guix NixOS is significantly ahead. "difficult" is to each their own. For me, NixOS is the easiest to do certain things. But those things are what i use a computer for and might not match what you do.
It has terrible documentation, no doubt about it. However, depending on your setup requirements, the installation procedure can be quite acceptable. It should finally have a graphical installer.
If you're not doing anything complicated like programming, hosting your own services, or planning on using rare software that you yourself have to package, it can be a very low maintenance OS.
My single biggest tip: before installing something, check if it has an "option"
For example, if you want to use KDE as your desktop environment, you need the services.xserver.desktopManager.plasma5.enable option. Use the option search. It's often easier than listing the individual packages manually and writing their configuration manually.
The reason for this is that nixos doesn't have "meta" packages. Those are packages that just contain other packages. Most package only has the absolute minimum it needs to be built - not run. The KDE desktop environment requires many packages to run.
Additionally, package configuration normally happens outside of the package in a declarative manner. You don't write /etc/network.d/111_startup.sh. That's either in an option environment.etc"network.d/111_startup.sh" or (making this up) networking.startupScripts which puts a value in to environment.etc"network.d/{script.name}.
Do no be afraid to ask for help. The nix community is aware of the documentation disaster it has on its hands.
I'm not sure how good a suggestion this is for you and your optimus usecase, but have you checked out the uBlue spins of Fedora Silverblue/Kinoite/etc? They pre-include stuff that Fedora won't ship, like non-free codecs and nvidia drivers.
I'm prepping a swap from Arch Linux to my own Silverblue image based on their DIY guide at the moment, mainly to see how the whole immutable aspect feels day-to-day. The image-based updates in the background are just a bonus.
TL;DR: If I were to choose an immutable OS to run on my propriety graphics cards I'd choose an immutable distribution with rolling releases or hardware enablement packages, which tend to do a better job of keeping these graphics libraries up-to-date for new hardware.
I don't have a recommendation but I just learned about immutable Linux OSes from this post. I could see benefits of immutable OS files, but I've been skeptical about package distribution like flatpak and snap, at least in their current state.
Dont get me wrong, the workflow of flatpack is great, but in my experience, apps from flatpack typically ship with their own runtime and don't rely on system runtimes (likely why you have GPU driver issues). As a software developer, I obviously prefer to ship with all dependencies and runtimes so I don't have to rely on the system to be updated but this comes with downsides:
A major problem with alternate runtimes is drivers. New graphics hardware needs new graphics libraries which have a ton of dependencies. Mesa depends on LLVM for compiling shaders. The NVidia driver depends on a kernel module whose version must exactly match that of the library. All of these libraries have their own transitive dependencies like libdrm, libstdc++ and glibc. If you want new hardware to work, you need to be using new versions of all of these libraries.
Linux distributions, especially those with rolling releases or hardware enablement packages, do a great job of keeping these libraries up-to-date for new hardware. Bundled runtimes do not.Source.
I'd recommend checking out that article I linked as source. There are also security concerns of using apps, some of which are mitigated by having an immutable filesystem, but there are more points and this comment is long enough as it is.
EDIT: I reread my comment and it comes off as "immutable bad, blah blah". Truth is I don't know much about these OSes but I wanted to point out that distributing apps in containers comes with its own challenges; which I gather is necessary for immutable OSes. So my TL;DR is to narrow down to a distribution that is immutable and has a rolling release or distributes hardware enablement packages.
Flatpak is by design more secure - not less. Not everything runs in a flatpak anyway thanks to distrobox, podman, and rpm-ostree.
My GPU issues were related to the host as well as the GPU drivers quit working their two. It refused to load the correct kernel module. I have since found immutable OSes with Nvidia support OOB. I haven't tried any on that machine yet but am playing with one of my desktop.
I agree that by design Flatpak aims to provide a secure environment through sandboxing; in practice, the implementation has gaps that can lead to security risks, particularly when apps are granted extensive filesystem access. This can undermine the effectiveness of the sandbox and potentially expose systems to vulnerabilities. HOWEVER, being on an immutable system, these risks are mitigated to some degree.
I'm particularly hopeful for Flatpak's promise of fine grained permissions. Flatpak is developing a fine-grained permission system with portals for external interactions, BUT this system relies on integration with toolkits like GTK, rather than app-specific APIs, complicating its implementation. There is more info in the linked article in the previous post, and here it is again.
Admittedly I'm not familiar with distrobox, but my caution is for any approach that distributes containerized programs with their own runtimes; they proved to be a real headache on my "mutable" system and my nvidia GPU until I switched to rolling OS.
I'm glad you found some candidates to potentially resolve your issue. What distro did you end up using? I'm curious to give it a go next chance I have some free time. Cheers.
Optimus is such a pain. Definitely not a good start for a linux laptop. Maybe you can turn it off in the bios or set the primary GPU to prefer the integrated. Or maybe boot with nomodeset in the kernel options and install the Nvidia drivers. And I don't know if you have a G05 or better Nvidia card, but if you do it should work with Wayland. Who knows, though! Personally, I would sooner sell the laptop and get one that is compatible without all the hackery.
It's just easy mode for keeping your computer up to date without having to do anything beyond the initial setup. You can read about it here.