this post was submitted on 24 Jan 2024
105 points (95.7% liked)

Linux

48216 readers
1351 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
you are viewing a single comment's thread
view the rest of the comments
[–] null 1 points 9 months ago (1 children)

Flakes takes care of a lot of the imperative bits, but some people are wary of them since they're marked experimental.

[–] Laser@feddit.de 1 points 9 months ago* (last edited 9 months ago) (1 children)

I don't think flakes can do much more declarative than "legacy" nix, rather they increase reproducibility and purity. Also their tooling doesn't offer imperative stuff by default, but I'm not sure they cover use cases previously solved imperatively. E.g. I don't think you can install user software through a flake. Sure you can create shells with software available, but that is also possible without flakes.

Maybe my understanding here is wrong though.

[–] null 2 points 9 months ago* (last edited 9 months ago) (1 children)

They cover a few things -- most notably they replace channels, which are imperative.

Unless I'm way off, you can also install user software through flakes if you add them as inputs. That's what I'm doing with Musnix.

You can also pull a repo and 'nix run .#software' from the command-line, without entering a shell. That's how I'm using NixifiedAI.

[–] Laser@feddit.de 1 points 9 months ago (1 children)

They cover a few things -- most notably they replace channels, which are imperative.

True. I never considered channels imperative, but rather a purity issue. But I guess this is a matter of perspective.

Unless I'm way off, you can also install user software through flakes if you add them as inputs.

I don't know about this, but that doesn't mean anything.

You can also pull a repo and 'nix run .#software' from the command-line, without entering a shell.

True, though this by default only runs the default binary, and you're probably in a shell anyways, so it doesn't save that much. Also that output is, to my knowledge, not protected by garbage collection. But my knowledge of any imperative stuff is minimal, so I don't know if that's the case there.

[–] null 1 points 9 months ago* (last edited 9 months ago) (1 children)

I don't know about this, but that doesn't mean anything.

Why doesn't it mean anything? You add the flake as an input (declarative) and then add the software to your config (also declarative).

I'm not arguing that it's better, or saves time, just that it takes things that were done imperatively, and makes them declarative.

[–] Laser@feddit.de 1 points 9 months ago* (last edited 9 months ago) (1 children)

I meant that just because I don't know about it doesn't mean that it isn't possible.

[–] null 1 points 9 months ago

Oh gotcha, sorry.

For what it's worth, I'm still reasonably new to NixOS (but not Linux) so it's entirely possible I'm way off base.