this post was submitted on 23 May 2025
20 points (100.0% liked)

Nix / NixOS

2212 readers
28 users here now

Main links

Videos

founded 2 years ago
MODERATORS
 

I think it's about time I improved a bit on my Nix and NixOS knowledge, and I guess the best way is having someone more experienced critique my monstrosity of a setup.

Maybe it's too modular? Not modular enough? Convoluted? Complete garbage altogether?

Go to the repo and find out! Just be sure to let me know after.

top 12 comments
sorted by: hot top controversial new old
[โ€“] lelgenio@lemmy.ml 5 points 2 days ago (2 children)
[โ€“] fullovellas@lemm.ee 4 points 1 day ago (1 children)

I read your issue and you left some great advice. Thank you for taking the time to write something thoughtful! As you probably guessed I really had barely any idea of how the module system worked, but it's nice seeing it's a bit similar to Rust's. I will look into the switch script, which will be convenient, and apply your suggestions, since I basically agree with all of them ๐Ÿ™Œ

[โ€“] lelgenio@lemmy.ml 2 points 1 day ago
[โ€“] thejevans@lemmy.ml 2 points 2 days ago (1 children)

recursiveMerge

Can you explain how you would use this here? Would this make files like this in my config unnecessary?

[โ€“] lelgenio@lemmy.ml 3 points 2 days ago (1 children)

I wasn't very clear in how I wrote those points, I think you got it backwards.

My points was that OP was using recursiveMerge, and I think that is not a very common or useful pattern to follow, because you evade the module system, for no good reason(?).

I think you are already following the most common pattern out there. If you would like to, there are ways to avoid having a default.nix file for each module, but in my opinion that only makes it harder for other people to understand your modules.

[โ€“] thejevans@lemmy.ml 2 points 2 days ago

Okay thanks I was very confused bc I had never seen that as advice anywhere haha

[โ€“] MadhuGururajan@programming.dev 5 points 2 days ago (1 children)

Includes Gnome

LOL, LMAO even.

(PS. since you said please. But I think it's cool. (I guess? I am too much of a grandpa to care so: That's lovely, my dear))

[โ€“] fullovellas@lemm.ee 3 points 2 days ago (1 children)

It's a bit LMAO-worthy, yes. I have it mostly out fear some sofware might break on Hyprland at a bad time, and because I'm too lazy to look for some basic utilities separately.

[โ€“] MadhuGururajan@programming.dev 1 points 2 days ago (1 children)

No I am in the same camp. I hate complexity. There's too many crumbs of utilities to reassemble into the entire loaf of functionality. Hence I haven't tried installing arch in a long while (I use endeavorOS as my daily) and I haven't tried running nix. The need has not arisen yet.

[โ€“] fullovellas@lemm.ee 6 points 2 days ago (2 children)

You're missing out man, I've been daily driving NixOS for almost two years now and I can't go back. It's not that complex to set up and it's great knowing most of what's on your system at a glance by looking at a config file.

[โ€“] axEl7fB5@lemmy.cafe 2 points 8 hours ago

The learning curve is high when you're starting out so expect to scratch your head in your first week. Once it clicks in, it'll be smooth sailing after.

I was waiting for the itch to get worse so i can scratch it off.. but you have convinced me enough to give it a go. Here's hoping i don't create an abomination!