377
submitted 4 months ago* (last edited 4 months ago) by demesisx@infosec.pub to c/programmerhumor@lemmy.ml

Am I out of touch?

No, it's the forward-thinking generation of software engineers that want elegant, reliable, declarative systems that are wrong.

top 50 comments
sorted by: hot top controversial new old
[-] null@slrpnk.net 49 points 4 months ago

NixOS is the most boring distro I've ever used.

I configured everything across multiple machines and now it just works.

[-] Telorand@reddthat.com 33 points 4 months ago

How, tho?

Seriously, how do you even get started? It's like the tutorials are all, "This is a basic 'Hello World' module/flake. Now, you are a master." I would love to figure it out, but I need a little more hand holding.

[-] demesisx@infosec.pub 20 points 4 months ago

I HIGHLY recommend forking a nix-config that uses flakes, home-manager, and whatever window manager you prefer. Since Nix is so versatile (and the documentation of flakes and home-manager are BAD), I found it absolutely crucial to reuse a well-architected config and slowly modify it in a VM to sketch out my config until it was stable enough to try on a real machine.

[-] jlow@beehaw.org 13 points 4 months ago

Yeah, I've had the same experience multiple times, people have been raving about it but I can't find a tutorial that is as noob-friendly as I'd need it.

[-] nullpotential@lemmy.dbzer0.com 13 points 4 months ago

Sure I guess if you can manage to get everything to work in the first place which involves following sixteen different guides across twenty-three different websites all of which with conflicting information.

[-] ikidd@lemmy.world 30 points 4 months ago

I went through a NixOS phase, and for a user that isn't trying to maintain a dev environment, it's a bloody lot of hassle.

I'm all behind immutable distros even though I don't particularly have the need for them, but declaritive OSs are kinda niche.

[-] demesisx@infosec.pub 11 points 4 months ago* (last edited 4 months ago)

for a user that isn’t trying to maintain a dev environment, it’s a bloody lot of hassle

I agree but I prefer it to things like ansible for sure. I'm also happy to never have to run 400 apt install commands in a specific order lest I have to start again from scratch on a new system.

Another place I swear by it is in the declaration of drives. I used to have to use a bash script on boot that would update fstab every time I booted (I mount an NFS volume in my LAN as if it were native to my machine) then unmount it on shutdown. With nix, I haven't had to invent solutions for that weird quirk (and any other quirks) since day one because I simply declared it like so:

{
  config,
  lib,
  pkgs,
  inputs,
  ...
}: {
  fileSystems."/boot" = {
    device = "/dev/disk/by-uuid/bort";
    fsType = "vfat";
  };

  fileSystems."/" = {
    device = "/dev/disk/by-uuid/lisa";
    fsType = "ext4";
  };

  swapDevices = [
    {device = "/dev/disk/by-uuid/homer";}
  ];

  fileSystems."/home/mrskinner/video" = {
    device = "192.168.8.130:/volume/video";
    options = ["x-systemd.automount" "noauto"];
    fsType = "nfs";
  };

  fileSystems."/home/mrskinner/Programming" = {
    device = "192.168.8.130:/volume/Programming";
    options = ["x-systemd.automount" "noauto"];
    fsType = "nfs";
  };

  fileSystems."/home/mrskinner/music" = {
    device = "192.168.8.130:/volume/music";
    options = ["x-systemd.automount" "noauto"];
    fsType = "nfs";
  };
}

IMO, where they really shine is in the context of declarative dev environments where the dependencies can be locked in place FOREVER if needed. I even use Nix to build OCI/Docker containers with their definitions declared right inside of my dev flake for situations where I have to work with people who hate the Nix way.

[-] ikidd@lemmy.world 3 points 4 months ago

No end of interesting shit you can do in Nix, at one point I had zfs and ipfs entries in one of my configs. I got away from it all before flakes started to get popular.

I tried it as a docker host; the declarative formatting drove me around the bend. I get a fair bit of disaster proofing on my docker host with git and webhooks, besides using Proxmox/ZFS to host it all and back it up.

[-] demesisx@infosec.pub 10 points 4 months ago

nd of interesting shit you can do in Nix, at one point I had zfs and ipfs entries in one of my configs. I got away from it all before flakes started to get popular.

I tried it as a docker host; the declarative formatting drove me around the bend. I get a fair bit of disaster proofing on my docker host with git and webhooks, besides us

I suspect that the whole Docker thing will improve exponentially now that Nix is on the Docker's radar. I found the OCI implementation to be superior to the actual Docker implementation in Nix.....at least for now. I think the way that Docker isolates things to layers is the biggest barrier to them working together seamlessly at the moment....but I think they'll start to converge technolgically over the coming 10 years to the point where they might work together as a standard someday.

[-] Prunebutt@slrpnk.net 6 points 4 months ago* (last edited 4 months ago)

They're the bee's knees if you have a homelab, though.

[-] ikidd@lemmy.world 6 points 4 months ago* (last edited 4 months ago)

Maybe homelab stuff that you mess with a lot and need to revert or stand up a multitude? I tried it for self-hosted apps and frankly a docker host is way easier. JB guys were pushing it for Nextcloud and it was a nightmare compared to the Docker AIO. I guess you could stand it up as a docker host OS, but I just use Debian, it's pretty much bulletproof and again, less hassle.

[-] Prunebutt@slrpnk.net 3 points 4 months ago

I recently switched to nixos, because my ACME image was failing all of a sudden and I didn't know enough what was going on under the hood to fix it.

It was a steep learning curve, but the infrastructure as code approach just works too well for me, since I just forget too much what I did three years ago, when doing things imperatively.

load more comments (4 replies)
[-] h0bbl3s@lemmy.world 13 points 4 months ago

My main OS (debian) ssd started throwing Io errors this Friday night and I had to work Saturday, only image I had laying around was Fedora Kinoite. So that's what I'm running until I order a new drive. I'm getting my wife a new laptop soon and was considered silverblue (she's a Mac user but very quick with tech in general).

Anyway after using it a few days, I think when I get my new drive I might just go ahead and put Kinoite on it. I'm used to running my dev stuff in containers anyway and toolbox makes it super easy. Rpm-ostree is a breeze (though it takes a minute to build on this ancient USB hdd, I'm replacing my dieing SSD with an nvme so I don't foresee the ostree builds as being an issue).

I think immutable is absolutely the way forward, especially for less computer literate folks. It will keep them more protected and if they do mess up something the rollback is a breeze.

[-] chunkystyles@sopuli.xyz 5 points 4 months ago

Why Kinoite over Aurora or Bluefin?

[-] Carighan@lemmy.world 10 points 4 months ago

Are we back in time 30 years when resettable systems were a new thing and controversial?

[-] kbal@fedia.io 16 points 4 months ago

Not really. Now they're old and controversial.

[-] demesisx@infosec.pub 8 points 4 months ago

Perhaps! I'm a big fan of immutable distros. This meme was inspired by being called an asshole for agreeing with another commment, calling it a skill issue when this one commenter flat out refused to acknowledge ANY of the positive aspects of them.

[-] stingpie@lemmy.world 48 points 4 months ago

So you made a meme about how your opponent is completely irrational and you are a paragon of logic and reason, and then proceeded to declare yourself the winner?

[-] PeriodicallyPedantic@lemmy.ca 9 points 4 months ago

Congratulations, you've learned how memes are created!

[-] demesisx@infosec.pub 8 points 4 months ago

I really didn't declare myself the winner. IMO, I won't have to when the software will do that when this way of working usurps container-style development as the de-facto standard.

As an actual old man who was able to adapt, I simply pointed out that OP sounds like an old man, unable to acknowledge an obvious trend where immutable systems are clearly gaining popularity and are seen by many as the correct way to provision a mission-critical system.

[-] HakFoo@lemmy.sdf.org 8 points 4 months ago

I suspect the tooling isn't quite there yet for desktop use cases.

If I were to try to replicate my current desktop in an immutable model, it would involve a lot of manual labour in scripting or checkpointing every time I installed or configured something, to save a few hours of labour in 2 years time when I get a new drive or do a full install.

The case is easier for defined workload servers and dev environments that are regularly spun up fresh.

[-] demesisx@infosec.pub 7 points 4 months ago

to try to replicate my current desktop in an immutable model, it would involve a lot of manual labour in scripting or checkpointing every time I installed or configured something, to save a few hours of labour in 2 years time when I get a new drive or do a full install.

If you have only one system, you might find the benefits not to be worth the bikeshedding effort.

However, I suspect that you'd be surprised with how easy it can be using home-manager. I have literally nothing that I need to do to a newly compiled NixOS system from my config because EVERYTHING is declared and provided inside of that config.

If you don't mind, can you give me an example of something in your config that you think is impossible or difficult to port to the Nix style? I'd be happy to attempt to Nixify it to prove my point. I've pretty much figured out how to do everything in the Nix way.

and I don't mind if I end up being incredibly wrong on this point and promise to be intellectually honest about it if I am indeed wrong. It just sounds like a fun exercise for me.

[-] HakFoo@lemmy.sdf.org 2 points 4 months ago* (last edited 4 months ago)

I guess the assumption is more that for me, a fresh install is often about decluttering as much as anything-- the five Wayland compositors, three music players, and six pseudo-IDEs I tried and didn't like don't need to follow me to the next build.

In a conventional install, that just means "don't check the checkbox in the installer next time". In a Nix-style system, this is a conscious process of actively deciding to remove things from the stored configuration, no?

I suppose the closest I've gotten was recently migrating my setup from a desktop to a new laptop. Mostly copying over some config from my home directory, but even then, I wanted enough different stuff-- removing tools I don't use on the laptop, adding things like battery monitoring and Wi-Fi control-- that it involved some reconfiguration.

[-] demesisx@infosec.pub 8 points 4 months ago

I’d actually argue the opposite in regards to clutter. If I switch to a new config without the software I don’t want anymore, that software goes away entirely when I do a garbage collect and there’s nothing left over like there might be in ‘’~/.config’’ on a non-immutable system.

IMO, the actual realization of Dolstra’s dream is flakes and home manager. They allow you to boil your whole config down to a git repo where you can track changes and rollback the lock file if needed.

I find it nice to open my config in an IDE and search by string inside of my config where I can comment out whatever I don’t need. Laziness also makes that pretty convenient too. Nix will only attempt to interpret what is accessible in code. If I comment out an import, that whole part of the config seamlessly shuts off. It’s quite elegant.

I’m even more envious of the atomicity of GUIX but IMO, it’s a little too much building the world from scratch for a newb like me.

[-] herrvogel@lemmy.world 9 points 4 months ago

What skill? This is not a fucking game lmao. I don't use an immutable distro because I have better things to do with my time than to try and climb a steep learning curve using some very questionable documentation. I can acknowledge the benefits, but I also acknowledge it's gonna take me time to get there. And I judge that the time investment is not worth it.

[-] demesisx@infosec.pub 8 points 4 months ago* (last edited 4 months ago)

Clearly, it’s not a skill issue with you but with the dude that inspired this, my assessment was that he was flat out unwilling to learn and flat out unwilling to acknowledge that there are clearly some benefits to this style. Seems like you already grasp it but don’t feel like committing the time. I respect that much more than the blind dismissal that inspired my meme. ✌️

[-] evatronic@lemm.ee 6 points 4 months ago

RFC 1925(11)


(11) Every old idea will be proposed again with a different name and a different presentation, regardless of whether it works.

https://datatracker.ietf.org/doc/html/rfc1925

[-] Valmond@lemmy.world 9 points 4 months ago

Okay so now I have heard of those immutable OS kind of regularly, but what is it and why is it so much better?

Thank you!

[-] demesisx@infosec.pub 14 points 4 months ago* (last edited 4 months ago)

I think some of these replies have perhaps missed the powerful idea that made me fall in love with Eelco Dolstra's idea. Here's what won me over.

For example: THE main feature is that you could have a different version of say Python (for the sake of this example) installed for each dependency in your system. Let's say you had Brave working with one version of Python and another piece of software needed a previous version of Python. In an FHS style system, this would be challenging and you'd have to manually patch things to make sure the dependencies didn't step on eachother. When you updated, your patches would likely have to be changed as well. So, system administration and updating can really break things.

In a Nix store where things can be content-addressed and linked by symlinks to their specific dependencies, they would just work alongside each other due to their unique, hash based folder locations. Each folder in the Nix store is named based on the sha256 hash of that piece of software's ENTIRE dependency graph, which has powerful implications.

Because of this hash, they’re effectively hermetically sealed from each other and cannot step on each other. The software in the Nix store talks to eachother through symlimks that were made upon compilation of the system.

This is the very definition of Nix and taken far enough to define a whole OS is SUPER powerful concept.

[-] ruse8145@lemmy.sdf.org 9 points 4 months ago

As far as I can tell it separates the base os from user changes which could break things by forcing you to use containers by annoying you to death any time you're trying to permanently install a package.

It's fine but it seems better for servers than users.

[-] PotatoesFall@discuss.tchncs.de 7 points 4 months ago

Basically the idea is to separate your system packages and your applications.

The system packages are installed and updated "atomically" i.e. in transactions. If a transaction fails, results in a broken system, or you just don't like it, you can rollback anytime.

Applications on the other hand are usually installed in a containerized form. Basically, flatpak. You should avoid installing applications through the system package manager.

CLI apps is where it all gets interesting, and usually people use distrobox, docker/podman or toolbx to run stuff in containers. Although the universal blue project comes with brew prepackaged for when you want CLI apps installed system-wide without juggling containers.

The benefit is that your OS and your apps are separate. No dependencies breaking or conflicting. And if something does break, well just roll back.

[-] ssm@lemmy.sdf.org 9 points 4 months ago* (last edited 4 months ago)

Shoving your entire system config into a couple DSL files is elegant? Sorry, I'll stick to OpenBSD's ports system and periodic rsync backups, that give me all the same benefits without the mountain of XY problems. Gentoo would also like a word, but they're too busy recompiling all of llvm with one build flag changed to give input. Hope you never have to use anything other nix, since you've spent all your time learing to configure an abstraction layer instead of interfacing with the real underlying tooling.

[-] NicolaHaskell@lemmy.world 6 points 4 months ago

all your time learing to configure an abstraction layer instead of interfacing with the real underlying tooling

Bro it's state machines all the way down and expressions up top

[-] Hexarei@programming.dev 2 points 4 months ago

I'm not familiar with ports, does it provide an easy way to install packages of a particular version? Is it OpenBSD only, or just a system of installing things?

I've got no dog in the race as of yet, I've bounced off of nixos a few times because of the general lack of consistency from one package to the next in terms of configuration options made available in the Nix language.

Genuinely curious about how it compares. The nix package manager seems fairly promising, even on non-Nix systems, if I could ever convince myself I needed it

[-] ssm@lemmy.sdf.org 1 points 4 months ago* (last edited 4 months ago)

I’m not familiar with ports, does it provide an easy way to install packages of a particular version? Is it OpenBSD only, or just a system of installing things?

OpenBSD's ports are just a collection of perl scripts and makefiles managed by a VCS (usually CVS though there are mirrors). Due to how recursive CVS works, you can easily update any part of the tree to a different commit/tag.

$ cd ${PORTSROOT}/games/stone-soup
$ cvs up -CPd -D 'some date_spec' #or -r some_tag
$ make install
$ヽ༼ຈل͜ຈ༽ノ enjoy your old or backported videos games

very scriptable, should be easy to figure out how to automate this should you need to.

[-] lugal@sopuli.xyz 7 points 4 months ago

No, it's the AI enthusiasts that are wrong.

[-] jungle@lemmy.world 7 points 4 months ago

It seems to me that almost all native English speakers got principal and principle backwards. I'm actually surprised when I see them used correctly (which is not the case here).

[-] demesisx@infosec.pub 8 points 4 months ago

Doh! Ps. Thanks for the correction.

[-] hedgehogging_the_bed@lemmy.world 5 points 4 months ago

As a child in the US I was taught "The Principal is you 'pal'." which is not true but helpful when spelling it. Like "dessert" has more 's' than "desert" because it's something you want more of.

[-] electricprism@lemmy.ml 3 points 4 months ago

You want shit to JustWork? No! /s

[-] DAMunzy@lemmy.dbzer0.com 3 points 4 months ago* (last edited 4 months ago)

I'm testing out Immutable Gentoo right now. 😜

carbonOS looks nice. Might have to try that out.

[-] muntedcrocodile@lemm.ee 3 points 4 months ago

I'm suprised I havnt seen people using nix for docker images more.

[-] demesisx@infosec.pub 11 points 4 months ago

It’s still fairly challenging and the documentation is probably, at best, dogshit (if I may be so blunt) at the moment.

OCI is probably a more worthy goal anyway, IMO. And it is unsurprisingly much more well-supported.

[-] muntedcrocodile@lemm.ee 2 points 4 months ago

Huh seems cool if i had the bandwidth and time I'd convert my things over but i really couldn't be bothered tbh.

[-] LarkinDePark@lemmygrad.ml 2 points 4 months ago
[-] amanneedsamaid@sopuli.xyz 1 points 4 months ago

Using Fedora Sway Atomic has been the most consistent Linux experience I've had.

load more comments
view more: next ›
this post was submitted on 04 Aug 2024
377 points (93.7% liked)

Programmer Humor

32707 readers
167 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS