nix-module-wrapper-manager-fds/modules/wrapper-manager
Gabriel Arazas c2625afbff
Some checks failed
Check test suite / Check outputs (push) Has been cancelled
Deploy documentation site / Build website (push) Has been cancelled
Deploy documentation site / Deploy website (push) Has been cancelled
Update Nix dependencies / update-nix-deps (push) Has been cancelled
chore: reformat codebase
2025-01-12 17:58:39 +08:00
..
base.nix chore: reformat codebase 2025-01-12 17:58:39 +08:00
build.nix chore: reformat codebase 2025-01-12 17:58:39 +08:00
default.nix wrapper-manager-fds/modules: init files option 2024-09-17 18:18:59 +08:00
extra-args.nix wrapper-manager-fds: init 2024-07-01 15:14:48 +08:00
files.nix chore: reformat codebase 2025-01-12 17:58:39 +08:00
locale.nix wrapper-manager-fds: reformat codebase 2024-07-31 21:51:40 +08:00
README.adoc wrapper-manager-fds/docs: update project overview and add design notes to modules 2024-08-03 16:47:08 +08:00
xdg-desktop-entries.nix wrapper-manager-fds: reformat codebase 2024-07-31 21:51:40 +08:00
xdg-dirs.nix wrapper-manager-fds/modules: add suffix and prefix for setting envvars 2024-08-03 16:45:48 +08:00

This is the module set of the wrapper-manager module environment. Just take note that were following the runtime shell of nixpkgs which is GNU Bash as of 2024-06-30.

Also, take note of several design decisions when making the modules.

  • Typically, several options are designed around one option. The most prominent example of this is wrappers.<name>.makeWrapperArgs where we basically create those makeWrapper arguments from other options.

  • Another common design here is most of the interaction happens around in individual wrappers so individual-wrapper-wide options are typically accompanied with a environment-wide version of that option. An example of that is environment.variables and environment.pathAdd where its basically a global set/list of variables and search paths to be put in each wrapper (that is, wrappers.<name>.env and wrappers.<name>.pathAdd).

  • When constructing modules with a listOf <type> that is going to be set some other options, typically it is better to have them set in the individual wrapper and nothing else. An example of that can be seen in xdg.dataDirs and wrappers.<name>.xdg.dataDirs implementation. This is designed like that so the user can override the entire thing if they choose.