this post was submitted on 19 Jun 2023
40 points (95.5% liked)

Linux

48389 readers
1056 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
 

Hi everyone!

I saw that NixOS is getting popularity recently. I really have no idea why and how this OS works. Can you guys help me understanding all of this ?

Thanks !

(page 3) 50 comments
sorted by: hot top controversial new old
[–] JSens1998@lemmy.ml 1 points 1 year ago (1 children)

Hmm, I've never heard of NixOS. Is it suppose to be like blendOS or CurtainOS? A blend of different desktop environments?

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

It's unlike most other Linux systems I've ever used. The central idea is declarative structures. So your entire operating system, all of the apps and systems services and other custom things you need, are declarative in one place and hopefully easy to activate.

So instead of flatpak install, you add the program to a 'text file' and rebuild your system.

Everything is using the nix package manager which has been around since long before the distro nixos.

That's only the start of the rabbit hole, but if anything sounds interesting i encourage you to check it out!

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

Hmm, a very interesting approach indeed.

When you say rebuild, does it have to rebuilt everything? If so, is it quick to do so?

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

It checks everything that has changed since last build and it changes only what is needed, I'd say 30 seconds or less normally. When updateing, you can end up updating all of the packages on your system at once, which of course is dependent on your network speed / sometimes compile time, but for me it can take around 10-15 minutes in that case. On a slow network, with a laptop CPU.

But you get atomic rollbacks so any breaking changes can be rolled back just by rebooting and selecting a different build.

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

I will switch as soon as I can get proprietary Nvidia drivers to work on my laptop.

[–] Speedmaster@lemmy.ml -1 points 1 year ago

That is the main reason I can't use my laptop with linux. It has a 3060 in it. I work as a dev and need to use 2-3 external displays with my laptop. The driver combined with x or wayland is atrocious, I tried 20 distros and I can't get it to work. The saddest thing is that none of the tech is exotic in any way. It's just HDMIs and AOC 24 inch monitors...

[–] curtismchale@lemmy.ca 0 points 1 year ago (3 children)

I've been looking at it after numerous times I update Fedora only to have some tool break that I use daily. Then I spend a chunk of the day getting Virtualbox working again so I can do my job (write code for websites).

I haven't made the jump, but it looks very interesting.

load more comments (3 replies)
[–] 20gramsWrench@lemmy.dbzer0.com 0 points 1 year ago* (last edited 1 year ago) (8 children)

I'm really not sure of where this would be anymore usefull than a simple bash script to install all packages you need since it doesn't do configs and that rollbacks are supported by some filesystems already. Also Having version specific dependencies is already a thing for flatpacks and such

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

There is a world of difference between a bash script and something like NixOS. The most important difference is that with NixOS something that you don't specify won't be there. Whereas a bash script (or other config management tools like Puppet, Chef or Ansible) only mutate things listed.

So it is very easy to write a script like:

ensure_installed python3
write_file /etc/foo.cfg 'thing = 7'
chgrp users /mnt/backups

But if you remove ensure_installed python3 it will stay installed. You can try to be very careful and always add ensure_not_installed python3 but this is both error prone and dead code as soon as you run it. I used to have a script like this and I used each of configuration management tools mentioned above and always ran into these issues. The exact error flow would be something like this:

  1. Enable/setup some service A that pulls in package X.
  2. Disable service A or remove package X because it isn't needed anymore.
  3. Write configuration for service B.
  4. Forget to add ensure_installed X but it works anyways because X is still installed from step 1.

Now you have a non-reproducible config because if you try to re-install or setup service B on a new machine it won't work because X isn't present. This may sound like a niche problem but I ran into it almost every time I tried to bring up a new machine using my config.

It is still possible to do this in NixOS as it isn't completely reproducible (you can have mutable state) but in general it is much harder because any configuration that isn't specified doesn't exist. As soon as you remove package X or service Y from your config it is removed from your system. I've been using NixOS for 8 years now and this problem is mostly gone. It is definitely more reproducible than bash scripts and it has a tangible effect on my workflow.

I wrote a blog post about it a long time ago but the core is still relevant: https://kevincox.ca/2015/12/21/service-management-with-nixos/.

load more comments (7 replies)
[–] bloodfart@lemmy.ml 0 points 1 year ago

They don’t know about Debian stable.

[–] blackstrat@lemmy.fwgx.uk 0 points 1 year ago (3 children)

All I year about from the linux community is NixOS and btrfs, neither of which I have any interest in. It almost feels like someone with an agenda is promoting these two with how prevelant they are.

load more comments (3 replies)
[–] authed@lemmy.ml 0 points 1 year ago

Never tried NixOS but I think I will try Qubes-Whonix next: https://www.whonix.org/wiki/Qubes

[–] hyperspace@kbin.social 0 points 1 year ago (8 children)

What about Nix's financial issues? Have they been resolved yet?

load more comments (8 replies)
[–] joneskind@lemmy.world -1 points 1 year ago* (last edited 1 year ago)

I don’t know NixOS. My Linux machine runs Pop_OS and Manjaro.

What are the pros and cons of NixOS ?

load more comments
view more: ‹ prev next ›