nixos-config/modules
2024-08-30 11:59:29 +08:00
..
flake-parts modules: update comments and description 2024-07-31 13:29:51 +08:00
home-manager home-manager/state: add packages suboption 2024-08-23 14:38:55 +08:00
nixos nixos/suites: add programs 2024-08-25 19:12:09 +08:00
nixos-generators nixos-generators/install-iso-graphical: fix module 2024-03-06 16:27:32 +08:00
nixvim nixvim/plugins/firenvim: remove 2024-08-15 12:50:51 +08:00
wrapper-manager wrapper-manager/dconf: add env-wide dconf options 2024-08-30 11:59:29 +08:00
README.adoc modules: restructure private modules directory 2024-01-20 17:16:02 +08:00

Table of Contents

These are various modules ranging from NixOS modules and home-manager modules.

Design constraints

While there are different environments we can make modules with, there are commonalities between these custom modules. Its better that we lay this out with a list of guidelines.

  • Custom modules are typically classified as private and public modules. Private (or internal) modules are simply modules meant to be used in this project and nowhere else. Public modules are meant to be used by others (but not necessarily mean we have to support or maintain these for them). For convenience, these private modules are stored in _private folder of each environment.

  • As such, public modules are not allowed to use the private library and modules. Only the private modules can. Public modules should strive to be usable without additional dependencies from this project at all.

  • Absolutely no reliance on third-party modules. This makes the custom modules easier to import whether its used with flakes or not. Instead, I recommend to make full use of environment-specific module structuring (such as host-specific modules on NixOS, user-specific modules on home-manager) on their respective environment configurations. As a bonus, this makes it easier to upstream them if we want to.

  • That said, custom modules can rely on other custom modules. Otherwise, were just limiting ourselves by forcing the modules to be standalone. Plus we could fix encountered issues with our own solution (and even upstream them if possible).

  • Follow the upstream module design as much as possible even for private modules. This makes it easier to design custom module extensions around them. (Also a bonus for easier time upstreaming the module if I want to.)