this post was submitted on 16 Jun 2023
14 points (100.0% liked)

Linux

48165 readers
1172 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

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

Seems like this distro is getting a lot of traction recently. Has anyone tried it? Is it any good?

top 16 comments
sorted by: hot top controversial new old
[–] doomkernel@sopuli.xyz 2 points 1 year ago (1 children)

Being using it for almost 2 years. Was very weird at the beginning because of the "declarative" approach they used. But once you get used to it.. Its a life changer.

[–] JackOfAllTraits@lemmy.world 0 points 1 year ago (2 children)

Declarative? Could you explain?

[–] polite_cat@lemmy.world 4 points 1 year ago (2 children)

Your whole system is defined in a file called configuration.nix. This file describes everything about your system: all packages installed, which Desktop Environment / Window Manager to use, and also configuration for almost everything (e.g. zsh or neovim). When "switching" (which is basically installing/updating the system), Nix looks at the configuration and changes your system according to what you've declared in the configuration.nix, installing or uninstalling packages for instance.

So, the state of your system is "declared" in a single file, which can be tracked in git or backed up wherever. If you have mulitple systems, you can also share parts of your config between them, which makes configuring and customizing stuff a lot easier.

There are a lot of other aspects, but thats the basic gist of it

[–] saba@lemmy.ml 3 points 1 year ago* (last edited 1 year ago) (2 children)

Is it a big learning curve? Is this the emacs equivalent of OS configuration/installation?

edit: another question - Could I play around with it by installing in qemu and if I like that, take my configuration.nix from qemu and install it as my main OS?

[–] Atemu@lemmy.ml 1 points 1 year ago

Could I play around with it by installing in qemu and if I like that, take my configuration.nix from qemu and install it as my main OS?

Absolutely. That's how I got started ;)

If you install Nix (the package manager) on your current system, you can actually directly build a vm from a config file via nixos-rebuild build-vm.

[–] polite_cat@lemmy.world 1 points 1 year ago

I'd say it's a pretty steep curve unfortunately, and nixOS is also not perfect, mind you

  • The nix language (that is used for the configuration) itself has sometimes weird syntax. It's also a proper functional programming languages with all bells ans whistles that brings
  • The documentation is less than ideal (to put it mildley). Most of the times you need to search reddit (rip) and the forums to find how to do certain things.
  • Nix is not FHS compliant. Basically everything is a symlink to some file in the nix store, located in /nix. Packages installed with nix are patched to work that way, but things not installed with it might not run out of the box

As for trying it out, yeah copying the config from the vm should work (except for maybe some hardware-specific stuff). remember to backup your stuff just in case lol

[–] Hikiru@lemmy.ml 1 points 1 year ago (1 children)

That sounds really cool… so you could just take that file, do a clean install of nix, then put that file back and it’ll install all your old packages and stuff?

[–] polite_cat@lemmy.world 1 points 1 year ago

Basically yes

you could also go so far as to wipe your root partition (except for some selected dirs) on every boot, although I don't do that myself: https://github.com/nix-community/impermanence

[–] doomkernel@sopuli.xyz 2 points 1 year ago* (last edited 1 year ago)

Oh my bad. Yeah you can configure almost anything in a declarative way on the /etc/nixos/configuration.nix file:

services.xserver.enable = true;
services.xserver.displayManager.gdm.enable = true;

Or

services.xserver = {
  enable = true;
  display manager.gdm.enable = true;
};

You can define a lot more (programs, users) and then you build the config file to take effect. By default NixOS is immutable so you can't change anything in the root partition and if there is something that broke you can rollback to a previous build!

[–] Triton@lemm.ee 2 points 1 year ago (1 children)

I've been using it for around a year and really like it so far. It is however very different from almost every other linux distro, so I would think carefully about it before switching. If you're not prepared to invest significant time and/or don't really care about the advantages of NixOS, you should stay away from it.

Pros of NixOS:

  • Declarative configuration: This is probably the main selling point. The whole system configuration and installed packages are neatly in one place. Using home-manager, this can also replace config files for many programs. All of this is especially useful if you share that configuration between multiple devices.
  • System rollbacks: If something breaks, simply boot into the previous generation.
  • Very customizable system: You can freely choose your desktop environment & basic system packages.

Pros of Nix in general (you don't need to install NixOS for this):

  • Huge package repository (also very up-to-date if you want to use the unstable channel)
  • Consistent developer environments that can easily be shared

Cons of Nix & NixOS:

  • Very steep learning curve: You essentially have to learn (the basics of) the Nix programming language.
  • There are often many ways to do things without any clear recommendation: Channels / Flakes, whether nix-env should be used, etc.
  • The documentation isn't always great (although it is improving)
  • If something is not packaged in nixpkgs, it can be difficult to run it, since NixOS doesn't follow the Filesystem Hierarchy Standard. There are some tools to run flatpaks, appimages and arbitrary executables, but especially the later might not always work out of the box.
[–] zooterthepenguin@kbin.social 1 points 1 year ago

I hear you with the "many ways to do things". The flexibility in the language to get from input to outputs means every GIT I look at has differently constructed flakes. Finally, after pouring some time in these last couple of weeks i am grasping the basics. Zero to Linux https://zero-to-nix.com/ was the first time it came together for me.

[–] popshabang@kbin.social 1 points 1 year ago

I like Nix and used it for a year or so before kind of just getting tired of using a non-standard distro. Mostly just felt like it was trying to solve a bunch of problems that I never had.

Seems like it's targeting devops, only I can't really picture a devops situation where the powers that be would be interested in Nix...

[–] lukas@lemmy.haigner.me 1 points 1 year ago

Yes, and NixOS is the most frustrating Linux distro I ever tried, without a doubt. I love the concept, but the execution is hard. NixOS can't configure desktop environments, such as Gnome and KDE. NixOS is stable, so NixOS works best in server environments.

But in server environments, tools such as Ansible are orders of magnitudes more comprehensive to everyone who understands the Linux basics. NixOS is therefore dominant in neither desktop nor server environments, but it's a neat academic project.

I failed to find sources for what I'm about to say, but there was a point where the NixOS stable branch... broke. I'm not sure what went down, but I think that a manual merge train messed smth up. If that's correct, then NixOS is less stable than Debian.

There's also the situation where they store the entire package store in Amazon S3 because someone else paid for it. That someone disappeared, and they expect the community to stem the costs now. If they don't pay up, NixOS stability is once again dead.

I feel like the tooling is all over the place. There are many ways to do one thing, and you never know what's the right thing to do.

Overall a poor experience.

[–] Raphael@lemmy.world 0 points 1 year ago

NixOS: The Most Over-Engineered Linux Distribution

[–] Whooping_Seal@sh.itjust.works 0 points 1 year ago (1 children)

I feel like nix could be a good 'project' distro, but I would hesitate on installing it on my main computer until I was quite familiar with it and had a few months with it on another computer.

[–] saba@lemmy.ml 1 points 1 year ago* (last edited 1 year ago)

I agree, but I've decided to play with it in qemu for a while. I've also been looking at Chimera and have that in a vm too. Currently I use Void, btw

load more comments
view more: next ›