ryan4yin / nix-config

❄️ My nix config for both desktops(NixOS+macOS) and homelab servers(NixOS).
https://nixos-and-flakes.thiscute.world
MIT License
879 stars 51 forks source link

[Feature] Refactor the code to make it more maintainable and readable #83

Closed ryan4yin closed 6 months ago

ryan4yin commented 6 months ago

Why refactoring is needed?

My nix config was very simple at the beginning, but as I kept updating and adding new things, it became more and more complicated.

The current pain points of this project is:

  1. It's hard to read.
  2. It's hard to add a new host into the config, I have to edit several nix file very carefully.
  3. Every time I modified some shared configs, I have to deploy and test it on all my 20 hosts, which consumes energy and time.
  4. It's hard to refactor the config, nix's error message is obscure, and my poor project structure made it even worse.

The goal I want to achieve through refactoring

Sort by priority: