this post was submitted on 05 Aug 2023
187 points (97.5% liked)

Linux

48074 readers
1007 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
 

I'm currently running Arch and it's great, but I'm noticing I'm not staying on the ball in regards to updates. I've been reading a bit about Nix and NixOS and thinking of trying it as my daily driver. I've got a Lenovo x1 xtreme laptop, I don't do much gaming (except OSRS), use firefox, jetbrains stuff, bitwarden, remmina, obsidian, and docker.

Is anyone running NixOS as their daily? How are you liking it and are there any pitfalls / stuff you wish you knew before?

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 50 points 1 year ago (3 children)

Been daily for a while now, came over from Garuda, and a few other Arch derivative before that. NixOS is 99.9% fantastic. Lenovo carbon X1 Gen 6. Runs great. Newer custom build higher end desktop with AMD 7900RX GPU. Also runs great. I have a feeling it'll run great on pretty much anything.

The package store is amazing. The package store absolutely dwarfs the AUR. That being said, it seems a lot of the store packages are support / dependency packages that you wouldn't install standalone.
I always had a concern in the back of my mind with the AUR. Is the package trusted by multiple people?
I've not had to rollback much, but it's SUPER simple, and takes seconds for the most part. A reboot at the most.

Things I wish I knew: I run declarative for everything, rather than imperative. Therefore, small changes are a tiny bit more of a hassle. Example: changing the hosts file. Rather than a quick hosts file edit and done, it's a quick edit of the system configuration file, then a nixos-rebuild switch. Nearly any change is like this. (I've not moved to flakes yet.)

if you have any shell scripts, and they're hard-coded to the env: #!/bin/bash, #!/usr/bin/zsh, etc.. you'll need to port those over to #!/usr/bin/env

appimages are well supported, but I ran into an issue where a custom appimage that someone else wrote won't authenticate correctly because the browser isn't included in the environment. I could t-shoot it more, but just too damn lazy to care.

The local storage location for apps can get huge rather quickly, as each iteration/change is stored for rollback purposes. Make sure to setup a garbage collection schedule with whatever your comfortable with.

Would i recommend? Depends on your patience and prior experience. NixOs is VERY VERY different than arch or pretty much any other distro, even other immutable ones. It takes a bit to get your head wrapped around it.

I saw someone say start with Nix (the package manager) on your current distro, learn the ropes, add in pieces like Flakes and Home Manager as you learn. Learn the Nix language. And then move to NixOS. Probably good advice.

I ignored all of that. Jumped in head first. Lots of frustration in the beginning. But now... I won't be going back to a standard linux distro.

Immutability makes me warm and fuzzy. Being absolutely sure that I can easily recover from a boneheaded mistake. Beautiful. Hard drive shits the bed? Drop in a new one, apply my configs, and I'm right back where I was within 30 minutes, complete with all data, apps installed and configured? Priceless.

[–] dinckelman 14 points 1 year ago (1 children)

I attempted to use Nix as a daily driver recently, and while it ran great, and I loved the idea of what it's doing, I got absolutely destroyed by the config. Since we're in transition to nix-command right now, a lot of documentation is really confusing, and on top of that, home-manager was not as intuitive ad it sounds. I'll probably be giving it another shot later, but for now the time investment doesn't seem to be immediately worth it for my work flow

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

This is similar to my story. I installed it on a laptop. Got really frustrated with it, and went back to arco for a while. Took the full plunge a couple months later, and decided I'm just gonna do it, torpedoes be damned. no regrets now.

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

You made me very curious about NixOS and now I'll have to take a closer look at it. The second to last sentence did it. Thanks

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

Awesome. Welcome to the club. Be patient. It's VERY different. The more you learn Nix (the language) the better off you'll be. I'm still on that path myself.

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

I can understand how the system config can be back in that short amount of time. How does data backup and restore work in Nix? Is it different than other distros?

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

Data wise, it's mostly the same. i use syncthing to a couple different systems, one of which is essentially a storage server. The main difference for me is the app installations. apt install all the apps, then configure each. Kills a whole day for me. I'm sure it can be automated, maybe ansible / salt / . But the way I use it, Nix enforces that I always update my configs in a manner that is easily restorable.
Copy my backed up system into /etc/nixos/
Run nixos-rebuild boot. Reboot.
Setup syncthing. ? Profit

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

Instead of doing nixos-rebuid boot and rebooting, you can just do a nixos-rebuild switch and not reboot.

Of course, depending on what you're doing it mifht be a good idea to reboot, but if you're just adding a package to your config file, it doesn't matter.

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

Yeah, for the restore process, I install a couple drivers for some USB devices. So a reboot is required. Otherwise, I has an alias for switch.