u/Leading-Toe3279

▲ 2 r/NixOS

learning modules to make it esay but now even more confused

So some of you might know I shared a AI written config couple days ago and it turned out to be bad so I decided that I would rewrite on my own .I read about modules and now trying to migrate my config so that it uses modules instead of just splitting code into different files ...

I already have my nixos config that i wrote when i installed nixos for first time, I came across nixos modules
https://wiki.nixos.org/wiki/NixOS_modules
https://youtu.be/vYc6IzKvAJQ?si=zm3yvPqySKOD-_v5

so I moved modules directory which atm only had normal nix function and not really module out of hosts into separate module dir .

however now I am confused on which things should I extract out into a separate module and which not to . kind of like which file to keep where and what things to extract out into separate module .

for example https://github.com/devnchill/dotNix/blob/enhancement/rewrite/modules/os/services/default.nix is file containing almost all of my services, I moved it outside host but now what things should i move out and make modules and what things not to ?

for reference this is how my old/current config looks : https://github.com/devnchill/dotNix
this is how it's lookin now WIP : https://github.com/devnchill/dotNix/tree/enhancement/rewrite

Reminder: SECRETS ARE GIT ENCRYPTED USING GIT CRYPT AND YES I WILL SOON SWITCH TO SOPS.NIX , THAT IS GOAL OF THIS REWRITE TOO ...

reddit.com
u/Leading-Toe3279 — 21 hours ago
▲ 0 r/Nix+1 crossposts

Ai rewrote my nixos config....

Hello everyone, I started using nixos couple month ago. At that time i wrote the config what felt right to me at that time. however i recieved some suggestions such as move modules out of host to avoid duplication , I came across this repo which I really liked and took inspiration from it. his dotfiles ...

Since I am newbie to nix,I decided to vibecode a rewrite. would help me test how good AI can do it and if it is good,would save me some time.

this is dotfiles written by me
this is dotfiles written by AI

I would be really thankful if you could take a look and see how well/terrible it's done.

Thanks

EDIT -> I really appreciate people dm out of concern for private keys. Those are encrypted throught git crypt and no they are not added by AI, if you look at git history, it's been there since I installed nixos and wrote config on my own ... So yeah those keys are safe to publish . Again thanks for the all the folks who notified me out of concern

u/Leading-Toe3279 — 3 days ago