maniacally laughs while trying to avoid eye contact with 19k lines of nix config
- 1 Post
- 95 Comments
smiletolerantly@awful.systemsto Linux@lemmy.ml•Three Years of Nix and NixOS: The Good, the Bad, and the Ugly6·10 days agoThink about it like this:
-
with ansible, you are responsible for making sure that executing the described steps in the described order leads to the desired result
-
with nix, you describe what you want your system to look like, and then figuring out how to get there is nix’s problem (or rather, is obvious to nix thanks to nixpkgs)
-
smiletolerantly@awful.systemsto Technology@beehaw.org•Nudify app’s plan to dominate deepfake porn hinges on Reddit, docs show10·12 days agoNo but you see those are people
smiletolerantly@awful.systemsto Technology@beehaw.org•Nudify app’s plan to dominate deepfake porn hinges on Reddit, docs show5·12 days agoYeah but they can at least buy their bullshit, i.e. “we help gut overspending and Make America Great Again”. What’s the supposed mission here? “We help you fap to people that don’t want to he fapped to”?
smiletolerantly@awful.systemsto Technology@beehaw.org•Nudify app’s plan to dominate deepfake porn hinges on Reddit, docs show9·12 days agoOh god I had not even thought about the last part.
Their staff is either 100% male, or a disaster waiting to happen. Probably both. I would not feel safe there that’s for sure.
smiletolerantly@awful.systemsto Technology@beehaw.org•Nudify app’s plan to dominate deepfake porn hinges on Reddit, docs show19·12 days agothe Wernher von Braun club
LMAO. Except even dumber, they’re the von Brauns of the “fake illegal nude” world
smiletolerantly@awful.systemsto Technology@beehaw.org•Nudify app’s plan to dominate deepfake porn hinges on Reddit, docs show10·12 days agoFor some people, definitely. But finding an entire startup worth of those people is (IMO) more difficult/unlikely than at least some of those starting there and talking themselves into not feeling guilty (if not for us, someone else would do it; we are not being as terrible as those others would be; it’s a tool, it’s not our fault people are applying it to minors etc.!; …)
smiletolerantly@awful.systemsto Technology@beehaw.org•Nudify app’s plan to dominate deepfake porn hinges on Reddit, docs show30·12 days agoI can not imagine the mental gymnastics of people working for Clothoff
smiletolerantly@awful.systemsto Linux@programming.dev•Linux suffers from a lot of unaddressed security problems.71·15 days agoKDE, GNOME and Sway are the only functional Desktop Environments/Window Managers that support Wayland all, while the Other DEs are not even close to shipping with Wayland.
What
smiletolerantly@awful.systemsto Linux@programming.dev•I wish there was a right click install button for deb files2·16 days agoYay, new Cult Member! 😄🎉
But seriously, awesome, have fun with it! Feel free to comment/message me if questions come up, but beside that, I have to mention that the NixOS forums are very active and friendly!
(And I actually did type that out yesterday, but I’ll definitely be copy-pasting it going forward 😄)
smiletolerantly@awful.systemsto Linux@programming.dev•I wish there was a right click install button for deb files2·17 days agoSorry for not answering sooner - got bogged down with work yesterday. I see you already got a response, but thought I’d write up what I had in mind anyways :)
The benefits
I want a computer that just works, to the extent that that’s possible. I’ll fix stuff that needs fixing, but ideally I don’t need to do much.
That’s great, and good news, this is very easy to achieve with NixOS.
As the other commenter said, rather than (imperatively) running commands like
apt install
, you configure the entire system through your “nix config”. In the simplest scenario, that’s just a single file which gets auto-generated when you install NixOS, and if all you need/want is to add some packages, then that’s enough (I’ll get to different approaches below). In other words, NixOS is declarative rather than imperative: you use the config file to “declare” what the system should look like, and it’s Nix’s job to ensure that your system adheres to this.I need to emphasize though, that this is not just about packages, but about every single piece of configuration you could possibly touch on your system. I am currently managing 30+ NixOS machines from a single centralized config, and I have not once edited or even opened a single config files on any of these machines, ever.
Nix comes with a vast package repository:
, but just as importantly, with a vast collection of “modules”. Think of modules as an abstraction for all the little things you would need to configure to get something running.
Let’s take everyone’s nightmare configuration as an example, getting Nvidia GPUs to function properly. This is the ArchWiki article on how to do so, and the Debian Wiki does not make it look any simpler. For NixOS, it should be as simple as adding this to your nix configuration file:
hardware.nvidia.enable = true; hardware.nvidia.open = true; # use the open source drivers; set to false if you want the proprietary ones hardware.nvidia.nvidiaSettings = true; # optional - will enable the Nvidia settings menu
Of course, all the same complicated steps as with any other distro are necessary “under the hood”, it’s just that with NixOS, someone else already has “declared” what the system needs to look like for Nvidia GPUs to work, and abstracted it behind these easy-to-use config options. There’s currently more than 20.000 such configs options defined, which sounds intimidating, but you only need to use those you actually want to use. For example, let’s say you want to install and configure a jellyfin server.
Again, all that is necessary to be up and running is
services.jellyfin.enable = true;
but if you want to customize the install, you can simply search for all available options. Also note that if you ever disagree with how a package/module is built/installed/configured, you can just overwrite the “official” way, though at least in my experience, that is basically never necessary.
OK, back to you.
Let’s say you have successfully configured the system as you want it to be - KDE5 installed, your favorite packages installed, Steam configured with
programs.steam.enable = true;
. Now the worst case happens, and your SSD hits the shitter; it’s dead, completely unrecoverable.Good news: as long as you have a copy of that
configuration.nix
file, you can be up and running with the a new harddrive and exactly your same, old system in a matter of minutes.Another scenario, let’s say you manage to brick your install (somehow). No sweat, reboot your PC, the previously used NixOS configuration is available as a grub (or systemd-boot) entry. Does not matter if you ripped out all the drivers, switched from KDE to Gnome in the mean time or anything else.
Essentially, disaster recovery is easy in NixOS, even if it is necessary very, very rarely, because nix will already warn you “yeah this doesn’t work” when you are building the system.
The Nix language
You have already seen some of it above. Most people say NixOS is not a beginner distro, and that opinion is mostly due to the Nix language. It’s… not pretty, but its learning curve is not bad if you just want to do “basic” stuff like configuring your system in the way shown above. For more advanced topics, there is a steep, but not very long learning curve. If that is worth it is up to you; there is no need for it, but it does allow you to write your own modules, and to leverage a full turing-complete programming language inside your configuration. But IMO, just learn as you go, no need to try and study the language just to use NixOS.
Going wild
For a single machine, the single
configuration.nix
file is perfectly fine. If yo only have a single machine anyways, I’d say stick with that.As soon as it’s 2 or more machines though, it makes sense to move the configuration elsewhere, in a single project which you can back up (usually, via git). This also allows you to reuse parts of your config - for example, if your user is always the same, and KDE should always be there,…, you can define that once and then import that into the inidividual machine’s config. You then simply tell nix “build this config on that machine”.
There are a ton of awesome projects in the “nix ecosystem”, so to speak, which you can also leverage: for example, you can add
home-manager
to your config, and then use your existing configuration but extend it with config for inidividual users’ environments, like customizing KDE itself, configuring git, ssh, your terminal,… You said you are not a customizer, so this probably does not apply to you that much, but it’s still good to know that it is easily possible.Other projects add capability for secure secrets management, for things like turning Nix into a very good approximation of SteamOS,…
TL;DR:
NixOS makes tedious things simple, and disaster recovery trivial. It offers more (and fresher) packages then even the allmighty AUR, while being stable as a rock.
You will never have to re-solve a problem, no matter how long ago you originally solved it.
smiletolerantly@awful.systemsto Linux@programming.dev•I wish there was a right click install button for deb files3·18 days agoNice!
How much do you know of nix? (Just gauging where I should start in my propaganda script :D)
smiletolerantly@awful.systemsto Linux@programming.dev•I wish there was a right click install button for deb files5·18 days agoAh, understandable.
May I talk to you about our lord and savio, NixOS? (Only kinda /s)
smiletolerantly@awful.systemsto Linux@programming.dev•I wish there was a right click install button for deb files81·18 days agoIs this really a common occurrence for you, that the package isn’t available via apt?
smiletolerantly@awful.systemsto linuxmemes@lemmy.world•Proprietary software's inferiorities, such as this control center downgrade, remind me of that one Dhar Mann video where kids enjoy homemade food and insult what the "award winning pastry chef" made.3·1 month agoHow good is it with background activities?
About the only thing holding me back is that my phone runs a continuous glucose monitor, constantly connecting with a small sensor in my arm. That all quietly dying in the background would just… not be an option.
smiletolerantly@awful.systemsto Asklemmy@lemmy.ml•Ahoy, what's the most unhinged wierd shower curtain I can put in a shower.2·1 month agoA photo of yourself, naked, in that very shower. With your dick enlarged to a comical size. (Or shrunk.) (Yes this is a gender neutral suggestion.)
From NixOS? Nothing, unless it’s compatible with my nix config in a way that I can simply replace nixpkgs’ flake input URL
smiletolerantly@awful.systemsto Asklemmy@lemmy.ml•What episode/season/movie do you consider as the ending in an otherwise long running franchise, and Why?2·2 months agoSadly, we won’t see a second season, because some “fans” on the internet got mad that women, people of color and - very shocking - queer people exist in the Star Wars universe.
It sucks that these people exist, for many reasons. One of these reasons (surely not the worst one, but the one I want to focus on) is that it muddies all criticism of a project. Your comment implied that this was the sole, or main, reason that The Acolyte was canceled, so I want to jump in here to say:
Having more women, people of color, and queer characters was the only refreshing thing about The Acolyte, and I wish more Star Wars projects took notice. Other than that though, the show is an utter disaster. It was incompetently written and directed, its story and characters make no sense, and the effects can be jarring.
Characters either have no defined motivations, or their motivations flip flop at the drop of a hat. Scenes dealing with the Jedi order and the republic fuck with established lore and do lasting damage to the Jedi order (not in the sense that they are shown as morally gray, but in that they are utterly incompetent and seemingly don’t remember the appearance of the Sith during living memory, for example).
Speaking of which, yes, the show tries to portray Jedi/Sith as a gray area, but
a) that has been done to death at this point, seriously, every other SW project tries to do a “ooooh but maybe Jedi not completely good!”, and b) The Acolyte is probably the most incompetent version of that I have seen (so far!).
I hope I have demonstrated that this show can be critiqued bar any bigotry, and I think it should be acknowledged that that, together with the giant sum of money it ate, are the reasons it got canceled - I am sure Disney also does not like the bigotry, but sadly, they get that with every project, even those that do not get canceled…
In any case, there is no comparison to Andor to be made, SMH.
You misunderstand! It has also turned into basically a hobby (and recently, a job, lol) to manage nix configs.
Those 19k lines are clean, well-structured and DRY, and do describe every little thing about ca. 30 machines.