190
you are viewing a single comment's thread
view the rest of the comments
[-] Neon@lemmy.world 14 points 7 months ago* (last edited 7 months ago)

Ansible is more like a bash script, NixOS is a Config File

If i remove a line from Ansible, nothing happens.

If i remove a Line from my NixOS Config, it resets that Setting to its Default / uninstalls the Package / whatever.

  • You can always be sure that your NixOS is exactly like in the Config, since most of the OS is Read-Only. You can basically debug your entire OS in the Config Files.

  • some other Comfort Features. Better Readability of NixOS Configs, better integration, and obviously the nixpkgs package manager which is just chefs kiss

Edit: sorry, didn't see the last part.

The difference between Nix and NixOS:

Nix refers to the Nix Packege Manager. Its Packages are called Nixpkgs

Nixpkgs are a new way to package packages without dependencies overwriting each other. Each package gets a uuid. So if one package needs dependency-x version 1.2 and another needs version 3.5, you can have both installed at the same time, since they're installed in folders like "hansfhanazavdialavsislbajsknsvsjsksbhalvsja-dependency-x-1.2" instead of both trying to install into /etc/dependencyx (i know they don't belong into /etc, this is for demonstration purposes)

This is pretty cool and solves the dependency-hells you otherwise deal with. Many tout this as the real alternative Solution to Snaps and Flatpaks, although i personally don't see it that way since i think we need to move towards a sandboxed package-format and nixpkgs isn't that. So i personally use nixpkgs for system-applications and install user-applications via flatpak.

Then there's NixOS:

NixOS isn't a Fork of any Distro. Those madlads decided to take the nixpkgs and the Linux Kernel and just create a new Distro from thin air. And it somehow worked.

NixOS uses the Nix-Daemon to read your configuration, install your packages, link them (from /nix/hwghaajvshkavahakaj-bash to /etc/bin/bash etc) and to configure your System (i.e. what ssh keys are allowed to connect)

This way NixOS has become a declarative Distro on top of the Nix Package Manager

this post was submitted on 22 Mar 2024
190 points (93.6% liked)

Technology

59374 readers
3766 users here now

This is a most excellent place for technology news and articles.


Our Rules


  1. Follow the lemmy.world rules.
  2. Only tech related content.
  3. Be excellent to each another!
  4. Mod approved content bots can post up to 10 articles per day.
  5. Threads asking for personal tech support may be deleted.
  6. Politics threads may be removed.
  7. No memes allowed as posts, OK to post as comments.
  8. Only approved bots from the list below, to ask if your bot can be added please contact us.
  9. Check for duplicates before posting, duplicates may be removed

Approved Bots


founded 1 year ago
MODERATORS