this post was submitted on 25 Jun 2023
18 points (95.0% liked)

Linux

5280 readers
591 users here now

A community for everything relating to the linux operating system

Also check out [email protected]

Original icon base courtesy of [email protected] and The GIMP

founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] msage 7 points 1 year ago (5 children)

So how useful it is in practice?

How do updates work?

Can it play Crysis?

[–] ericjmorey 4 points 1 year ago

So how useful it is in practice?

It can replace the need for docker.

Replit.com uses it for its VM environments. See: https://blog.replit.com/nix

[–] [email protected] 2 points 1 year ago* (last edited 1 year ago)

I've been on nix for only 2-3 days so take what I say with a grain of salt. I think it's pretty useful. Back in Arch/EOS, I always find ways to mess up the system (I switched to Nix because of a failed system update on EOS). On Nix, it's so easy to roll back and you don't even need to use the terminal.

sudo nixos-rebuild switch --upgrade

There are (afaik) 3 channels you can choose: stable, unstable, and small(?). I'm staying on stable for now. Package manager is slower than pacman, imo, and it's not as straightforward as Arch. Some programs (like kde connect) need to have service enabled in config.

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

It is, ment to reply to you here

[–] uthredii 1 points 1 year ago* (last edited 1 year ago) (2 children)

So how useful it is in practice?

It's useful for quite a few things in practise:

  • You can be sure software that is packaged with nix will behave the same on different computers.
  • You can avoid dependency conflicts.
  • You can automate some things that would otherwise take multiple (mostly manual steps) on other systems.

This video shows off some of the cool things you can do with nix: https://youtube.com/watch?v=6Le0IbPRzOE&feature=share9

How do updates work?

You update a programming by specifying the latest version of a program in config and rebuilding.

You update the OS by pointing to the channel you want to use and rebuilding.

You can time travel back to a previous state if anything goes wrong.

Can it play Crysis?

I expect so, some people.do use nix for gaming.

[–] msage 2 points 1 year ago (1 children)

Oh yeah, and how do you handle kernels?

[–] uthredii 7 points 1 year ago* (last edited 1 year ago) (1 children)

You specify the kernal in the config and rebuild, reboot.

Here are the docs if you're interested: https://nixos.wiki/wiki/Linux_kernel

[–] msage 4 points 1 year ago (1 children)

Sweet, thanks. If I can configure kernel and modules, that is good enough to start with.

How long does it take for you to rebuild?

[–] uthredii 3 points 1 year ago

Rebuilding after adding a single program doesn't take too long (depends on the program but often less than a minuet).

Rebuilding after upgrading the channel takes longer on my slow internet as many programs have version upgrades that need to be downloaded. I think it took 30-60mins last time. I imagine it would be faster with better internet.

[–] msage 1 points 1 year ago (3 children)

You can be sure software {...} will behave the same

never had that issue before, as long as they have the same version and config

avoid dependency conflicts

I have those on Gentoo sometimes, possibly because I overloaded USE too much, but that's not something I have to deal with on Debian/Mint.

You can time travel back to a previous state

wasn't that possible before with snapshotting (btrfs/lvm)?

If it allowed me to avoid systemd, I would be willing to give it a go. Perhaps I will try it in a VM, but it's not going on any baremetal for now.

[–] jim_stark 4 points 1 year ago* (last edited 1 year ago)

You can be sure software {…} will behave the same

never had that issue before, as long as they have the same version and config

Pure:

If you uninstall a software it might still have residues. If you install a faulty driver, even if you uninstall it, it might still permanently mess the system configuration.

But with nix if you uninstall something it's like it never existed in your system.

Reproducible:

With nix all the apps in your OS are configure using a single or a few config file(s). So if you want to setup another system the same way you don't have to go hunting for dotfiles.

avoid dependency conflicts

that’s not something I have to deal with on Debian/Mint.

Because you are recommended to use only software present in the repositories. If you are the kind of person who doesn't need software outside of your OS repositories then of course you might never need to worry about dependencies. Other people are doing the job for you.

But if you want to software not in the repos and even if you want to package it for your OS you might run into dependency issues. Never with nix. It's more for people who don't mind packaging software for themselves (and the community) and don't want to deal with nasty dependency issues.

[–] uthredii 0 points 1 year ago

never had that issue before, as long as they have the same version and config

Then you are very lucky. "It worked on my machine" is a meme for a reason.

wasn’t that possible before with snapshotting (btrfs/lvm)?

I haven't used snapshotting with those before. I guess the difference is that with nix it is done by the package manager by default, with btrfs/lvm you would have to set that up independently (please correct of this is not the case).

[–] philm 1 points 1 year ago