183
NixOS is the best operating system I absolutely cannot recommend to anyone - Anurag Singh
(www.xda-developers.com)
A community for everything relating to the GNU/Linux operating system (except the memes!)
Also, check out:
Original icon base courtesy of lewing@isc.tamu.edu and The GIMP
Seems like there's now an option for that in Home-Manager: https://nix-community.github.io/home-manager/options.xhtml#opt-wayland.windowManager.sway.config.keybindings
But yeah, if you tried to use it when Sway wasn't yet well-supported, or just want to use some obscure software in general, then yeah, things can get more complicated...
Well thanks, so NixOS is not for me then.
Oof, I was just talking about making things declarative there. If you want to configure it the old-fashioned way, like you would on other distros, then those difficulties don't apply.
In more general terms, though, it's a bit of a double-edged sword. The Nix package repository has more packages than other package managers: https://repology.org/repositories/graphs
So, the chance of finding an obscure software, that's already packaged, is rather high.
Here's the online package search, if you want to check the availability of some of the obscure software you use: https://search.nixos.org/packages
But then, yeah, the flipside is that, from what I understand, you can't just download a random executable off of the internet and run it, because of the Filesystem Hierarchy Standard not being adhered to, as the post also mentions.
You can set up Flatpaks, and I believe AppImages would work, because those also live in their own FUSE filesystem. Well, and there is ways to emulate the FHS layout to get normal applications to run, too.
But yeah, way out of my field of expertise there. I have only one software installed which isn't packaged for Nix, which is a program I wrote myself.
And to get sufficient FHS emulation for that, I just needed this line in my config:
More complex programs will need a bit of extra configuration: https://wiki.nixos.org/wiki/Nix-ld
(I could also add a
flake.nixfile into my software's repository, though, which would make it so it could be installed straight from my repo, as if it was packaged.)This module is actually a bit of a pet peeve of mine and a big reason I soured on Home Manager in general...
You inevitably end up writing chimera configurations like this:
and in exchange for this you get:
home.file/extraConfigescape hatches)Alternatively you could just use a dotfile manager like rcm or stow or chezmoi like everyone not on NixOS+HM and not have to deal with any of this.
Well, is it like that using home manager?
I remember home-manager integrated with flakes being a nightmare for my potato laptop because I defined even the bash alias and such stuffs in it and even if I had to change/add a simple alias I had to rebuild the whole system lol, I could have just used home-manager standalone to be honest(I forgot to do this) but I just switched to using the old way of managing dotfiles with stow.
So for me I defined it in the .config/sway/config file like this:
Maybe I will come back to using standalone home-manager one day.
Yeah, I can understand the frustration. IMHO the Home-Manager way of doing things has some merits:
That last point is one that's particularly relevant for me, because KDE Plasma's configuration files are largely terrible. Home-Manager, together with Plasma-Manager, is the only sane way I know of, to automate the panel configuration in KDE.
But yeah, if you don't use software with terrible configuration files, then I can certainly understand preferring dumb templating. I have also decided against using the Home-Manager-specific modules in places, or might only translate into the Home-Manager-specific module when I actually want to vary configuration values between two machines.
Just to give a quick impression of how terrible the KDE panel configuration is, this is a snippet out of the fittingly-called
plasma-org.kde.plasma.desktop-appletsrcfile:Ah sorry, that doesn't actually show any of the panel configuration, because KDE mixes configuration for the panel and desktop widgets and the Activities feature (like workspaces, but with separate wallpapers and widgets for each Activity) all into the same file.
So, here's a snippet that actually shows the panel configuration, from just a few lines below the first snippet:
What those numbers in e.g.
[Containments][1807][Applets][1812]are? Ah, they just count those from 0 to infinity, whenever you add a widget through the UI.And in case you were wondering since when INI allows for nesting section keys via
[multiple][brackets]: It doesn't. That's a custom extension of the INI format, specifically in use by KDE.Like, man, I love KDE for its features, but this is the stuff of nightmares.
Does Home Manager not just have a dot file manager built in? On Guix, I just have my Waybar config. get moved to the appropriate location that Waybar will expect it.
Some services will even allow you to specify files to get injected into the config.; like the Bash service so I can write some definitions out in a .sh file and the service inserts that contents after the boilerplate it provides into my
.bashrc.It does, that's the
home.fileescape hatch I mentioned. But then you end up paying 10-30 seconds eval for a "config" that looks like this:I suppose there are fringe use cases where Nix attrset merging behaviour is useful, but in the general case I just don't see much value here.