this post was submitted on 14 Feb 2024
101 points (97.2% liked)
Linux
48033 readers
1058 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
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Thanks for the detailed response.
I can't remember the exact details of the whole issue, but that part was for a desktop entry. If I remember correctly, in the end I had to create a system service and there were no readily available examples like for the packages. After days of researching in my spare time, I had to ask in the irc for a snippet from someone's config.
Oh, it seems really cool. I'll need to look into it.
That's definitely an improvement, but the default config is still far better IMO.
Replacing stow with home-manager has the same issues as replacing a regular distro with nixos. If I can stow all of my dotfiles, why would I use home-manager to handle them instead? In most cases it's just going to be harder to configure anything, and you also need to rebuild your home every time you want to update a config.
What benefits does it have over just using a shell script?
I guess it's also great for programs that aren't following the standards like firefox.
It's probably a skill issue, but that ties into another problem I've had when messing around with home-manager: the only source of options I found was mynixos. So to configure anything I had to first guess potential keywords to search for the option I'm interested in. And that's after learning about it from some video on youtube, because google left me high and dry.
Can you give me some examples, what issues will I face running MX + nix that I wouldn't if I ran nixos?
As someone who works with terraform, I understand the benefits of being forced to keep a single source of truth instead of remembering to update my post-installation script and keep things synced across devices. But on the other hand this is everything I need to do to get a fresh install to where I'm currently at:
It's definitely not a lot to maintain, and the issues are either obvious and easy to solve, or just a small waste of space. For example if I forget to remove the debian version of git, it's still going to automatically source the nix one first. Home-manager with just a list of packages makes the hardest part of that process a breeze, while still being really easy to set up.
The main problem was getting started from 0, so I'm considering writing a post about it when I get a bit more comfortable. Trying to learn nix declarative package management from the nix manual is a bad idea, and almost all of the resources are on nixos. A quickstart guide with a few commands and examples would've had me up and running in 10 minutes instead of days.
Oh for sure, a home-manager gui that let's you customize every package from a single place while automatically updating your config would be a complete game changer. But I'm talking about the current state of things. In that regard, currently every linux user can enjoy simple declarative package management with stable and bleeding edge sources. Yet I never see it mentioned, while even beginner threads are being spammed with nixos recommendations. Imagine if casuals could open their software center or discover and install nix packages instead of flatpaks.
Yes, yes indeed. That's why my dotfiles are still in a git repo (don't get the point of stow), not in home-manager.
If you do in fact need home-manager's features for some of your dotfiles though, it can effectively act as a stow superset for the rest.
Declarative stateless configuration rather than imperative stateful configuration.
With a bash script, you'd have to meticulously craft together the i3config file using shell script syntax and remember to run that every time you change something. home-manager just does all of that for you with high-level data types and frameworks specifically made for that purpose.
Yeah, it's not great. https://search.nixos.org/options? is really useful for NixOS.
You have to either use your browser's dumb search on https://nix-community.github.io/home-manager/options.xhtml or your pager's dumb search in
man home-configuration.nix
.All the issues which declarative immutable stateless system configuration solves such as atomic updates, configuration rollback in case you messed something up and trivial recovery. I'm sure I'm forgetting some since I'm so used to having them.
Yeah, docs are a pain point. If you think that section is bad (I think so too), everyone will thank you for rewriting it. Feel free to shoot a PR to Nixpkgs and ping a few people from the docs team if you're motivated.
I don't get it either. NixOS is the best thing since sliced bread for a certain kind of person (experienced hacker who has felt the pain points which NixOS relieves) but I'd never recommend it to an inexperienced user in its current state.