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.

you are viewing a single comment's thread
view the rest of the comments
[-] 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.

[-] Swedneck@discuss.tchncs.de 1 points 4 months ago

i mean, provided that the OS has a proper graphical configurator (like most normie OSes), isn't being declarative just a straight upgrade? Configure everything once when installing and then you never have to repeat that process again.

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

I think your "proper graphical configurator" is doing some heavy lifting there. Of course, there's no such thing right now, so you're dealing with the coding yourself in a pretty oddly designed syntactical language, and the terrible official documentation that is the current state of affairs to do it with.

Other than that, sure, a declaritive and atomic OS would be the way to go.

[-] Swedneck@discuss.tchncs.de 1 points 4 months ago

the thing is that distros like fedora and ubuntu have had them for ages

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

I thought you meant for a declarative OS like Nix. Which does not have a GUI configurator, nor does any comparable declarative OS. Isn't that what we've been talking about this entire thread?

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