this post was submitted on 06 Jan 2025
73 points (97.4% liked)

Nix / NixOS

1854 readers
84 users here now

Main links

Videos

founded 2 years ago
MODERATORS
 

After around 4 months of reading manuals, forums, watching tutorials and asking online, I've eventually managed to have an almost properly working NixOS installation on my pc and wiped the Win10 partition (I have win10 in a VM as a fallback mechanism)!

I started this journey initially wanting to switch to linux and I started my tests with Debian Stable. But the repo was really old (as expected), so I tried the Testing variant. But this repo had missing packages. I tried Unstable for a few moments too, but I crashed and didn't want to bother. I figured that I could make a script to (declaratively?) fetch and auto update packages from github, bypassing Debian Testing.

Then it was when I looked at NixOS and found out that the whole system kinda does what my script would do, but much much much better. Almost ever since then I tried to learn almost everything I needed and a few extra stuff to get it working. This is the configuration I've come up with so far (it's probably considered simple).

I also made a guide to keep track of what I was doing and what I would have to do once I took the decision to transition to Linux/NixOS, hopefully it might help others too:

https://codeberg.org/BlastboomStrice/LinuxPlan/src/branch/main/LinuxPlan.md

Finally I can be called a Linux user :)

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 15 points 2 days ago (2 children)

Use home manager + flakes immediately when you feel confident in using them, that's practically a requirement to make a good home config.

A good channel that got me off the right foot is vimjoyer on youtube, you should check his nixos guide.

Can't forget about the NixOS wiki :).

Good luck with nixos, it's 100% worth it.

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

@[email protected], I second starting out with Home Manager on your current Linux or Mac. It's a great way to learn all about Nix, while keeping the option to move back to a shell that is not managed by Nix and having the option to go back to a shell that is not managed by Nix (I had zsh in Nix, and Bash native) and still being able to boot your pc when you mess up in Nix.

The real advantage, as @[email protected] said, is in being able to use recent packages on any Linux and MacOS. Home Manager gives you that. I first started with a basic Home Manager config, then learned about the Nix language using some simole puzzles (the first Advent Of Code days), then the module system, finally flakes so I can use packages from 24.11 stable in Home Manager on top of other Linux OSes.

This way I could take it step by step instead of the rocket jump that OP did. Hats off btw @[email protected] , you provide amazing value with your nixos plan!

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

Hihi, you're welcome!🤭

[–] [email protected] 6 points 1 day ago* (last edited 1 day ago)

Strongly second this recommendation. One of the biggest benefits of nix is being able to use the package manager on Linux/MacOS. You can quite literally start out by simply porting whole config files into the nix store. Just copy the file into your nix configs repo and have nix create the symlink.

I personally play around with these via imports. Say I want to start configuring Firefox via home-manager. I could start with configuring Firefox manually, then storing my raw /home/luc/.mozilla/firefox/profiles.ini in my nix store by the method above via a file called firefox-native.nix. Then in firefox.nix I play around with parameters in the nix config. If I hit a wall and don't have time to figure out the "real" nix configs, I just switch my import over from:

# home.nix
imports = [ ./firefox.nix ]; # the nix way

to:

# home.nix
imports = [ ./firefox-native.nix ]; # fallback - known working native config file

Don't forget about the Discourse page! I've found folks there to be very friendly and helpful.

Other useful tools are: search.nixos.org - for seeing if a package exists. mynixos - for exploring options within a program/service configuration.