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

Linux

48033 readers
1596 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?

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 3 points 1 year ago (11 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.

[–] [email protected] 1 points 1 year ago (10 children)

Declarative? Could you explain?

[–] [email protected] 3 points 1 year ago (7 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

[–] [email protected] 1 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?

[–] [email protected] 3 points 1 year ago (1 children)

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

[–] [email protected] 1 points 1 year ago

It’s also a proper functional programming languages with all bells ans whistles that brings

It's really not. It has no runtime for starters; it's a pure expression language. It can't i.e. read stdin, open a socket or do an arbitrary syscall.

The end result is always data. You could and can turn every sensible evaluation of Nix into JSON.

There are indeed side-effects but they're indirect; implied by the data that is the actual end result of an evaluation of Nix expressions. If your expression evals to a derivation (data), Nix will create a .drv file for you for example. They're well defined and not arbitrary though.

[–] [email protected] 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.

load more comments (4 replies)
load more comments (6 replies)
load more comments (6 replies)