this post was submitted on 07 Jun 2023
18 points (100.0% liked)

Operating Systems

3799 readers
1 users here now

All things operating system related, from Windows to Mac to Linux distros and the more obscure.

Subcommunity of Technology.


This community's icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.

founded 1 year ago
MODERATORS
 

I've been thinking about trying NixOS for a while. I think the concepts are elegant, and I have been finding Nix flakes to be very nice for software development. I'm about to get a new machine so I'm ready to take the plunge. Any advice before I dive in?

I'd like to set up Gnome with some extensions. One of the things I especially want to learn is how to set up graphics drivers, Vulkan, and Lutris.

For anyone who hasn't heard of it, Nix is a "declarative" package manager. Each package is stored with a hash that encodes its exact source, build script, dependencies, etc. You can have packages installed with mutually-incompatible library dependencies, and Nix makes it just work. For purposes of setting up per-project dependencies Nix does what Docker does, but faster, with more cache hits, and without emulation / containerization. If you want to deploy Docker images, Nix can build images that are more efficient than what you get from dockerfiles.

You can use Nix as an additional package layer in Linux, MacOS, or Windows with WSL. Think of it as an alternative to Homebrew.

NixOS is a Linux distro that uses Nix as its primary package manager, and uses Nix principles to manage configuration. Instead of running commands to install things, and then later forgetting what you installed or why, packages are listed in config files. The system installs and links packages as necessary. Anything you remove from your config is unlinked. When you want to reclaim space you can garbage-collect unused packages.

top 14 comments
sorted by: hot top controversial new old
[–] Demonstrable_Legume@beehaw.org 9 points 1 year ago (2 children)

I'm a huge fan of nixos. I have my whole home lab using it now. I learned everything I know from reading other's configurations. I also use the nix search site for finding configuration options.

Here is my config and others I've used as inspiration:

[–] ericjmorey@beehaw.org 5 points 1 year ago (1 children)

I'm about to try NixOS for the first time on a dedicated server to host a Lemmy instance. I can use all the help I can get.

Awesome! It looks like there's already a nixos module for lemmy too!

[–] hallettj@beehaw.org 3 points 1 year ago

Thanks! I expect I'll be taking advantage of these resources

[–] pkulak@beehaw.org 6 points 1 year ago (1 children)

Best of luck! I've started and stopped on Nix a couple times. It always ends up being too much work. At some point I need my OS to get out of my way.

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

Oh that is funny because for me I guess I've hit the tipping point where now my NixOS setup is the one that "gets out of my way". I sometimes play around with new releases of other distros but always go back to my NixOS setup because I can just restore my nix config and it's back exactly how it was before.

[–] pkulak@beehaw.org 5 points 1 year ago

Yeah, totally fair. I guess my comment was a bit back handed. I’m 100% on board with immutable, reproducible OSes.

[–] aedyr@beehaw.org 5 points 1 year ago

I have not deployed NixOS, but I hear about it all the time from the guys on Linux Unplugged. They seem to be big fans. Good luck with it!

[–] harky@beehaw.org 5 points 1 year ago* (last edited 1 year ago)

I've been looking into immutable OS and Nix as well for a little while now. I haven't reached a tipping point where I want it enough to spend the time on it.

It is very exciting to see development of distros go in that direction.

Good luck! Let us know how it goes

[–] cavemeat@beehaw.org 5 points 1 year ago

Huh, it sounds like a unique concept. My best wishes, I've been comfortable with linux mint as of late, but I like looking at new stuff.

[–] uthredii@beehaw.org 4 points 1 year ago

I have been thinking of trying NixOS too.

I knew you could create docker files with Nix but I didn't know they could be more efficient.

[–] Animortis@beehaw.org 2 points 1 year ago

I am not a coder, so I frequently worked with Bing AI and ChatGPT to get my configuration.nix and home.nix files where I wanted them.

[–] BigDaddyRAAB@beehaw.org 0 points 1 year ago (1 children)

I have a fully declarative NixOS system running GNOME on Wayland here: https://github.com/THERAAB/nix-dotfiles. You would be surprised how easy things like graphics drivers, extensions, etc. Are in NixOS once you've learned the nix way.

[–] hallettj@beehaw.org 1 points 1 year ago

Just what I'm looking for, thanks! It looks nice!

Yes, I'm finding that everything just works. I'm enjoying some details like setting up a version-controlled config to manage Gnome extensions, key bindings, and settings that I didn't have a good way to manage before.

load more comments
view more: next ›