Commit Graph
9 Commits
Author SHA1 Message Date
LGUG2Z 49bdf41bfc refactor(schema): simplify defaults in static_config 2025-12-31 12:38:37 -08:00
LGUG2Z 27454c3186 refactor(config): pull theme structs from komorebi-themes
Centralized both KomorebiTheme and KomobarTheme in the komorebi-themes
module in komorebi for Windows.

This commit removes the duplicated references in komorebi for Mac and
just pulls in those; now we only have to update the docs in one place.

Regenerated all the schemas after pulling in the changes.
2025-12-27 22:24:07 -08:00
LGUG2Z b421043494 docs(schema): ensure all public-facing bar config opts have docstrings 2025-12-27 14:46:29 -08:00
LGUG2Z 93bdb327f0 chore(deps): bump komorebi-themes and regen docs 2025-12-27 13:45:59 -08:00
LGUG2Z 73ca25500b docs(config): ensure all public-facing static config opts have docstrings 2025-12-26 21:29:05 -08:00
LGUG2Z f290c7e037 docs(config): encode defaults of unwrapped options into schema
This commit ensures that the various default values that the different
Option<T> config properties can be unwrapped to are encoded by schemars
so that they can be picked up by docgen and nixgen.
2025-12-26 15:19:33 -08:00
LGUG2Z 4e66b46e87 docs(schema): clean up unused schema opts from windows
This commit removes some Windows-only schema opts from StaticConfig and
updates the justfile to start generating content for the new Starlight
documentation site.
2025-12-26 11:02:47 -08:00
LGUG2Z b51eb8aab2 feat(nix): add nix-darwin module
This commit adds a nix-darwin module for komorebi and komorebi-bar,
exposed via `darwinModules.default` and `darwinModules.komorebi`.

The module provides the following options:

* `services.komorebi.enable`: enables the komorebi launchd agent
* `services.komorebi.config`: typed Nix configuration (defaults to example
  config)
* `services.komorebi.configFile`: path to a JSON config file (validated
  against schema)
* `services.komorebi.logLevel`: log verbosity level
* `services.komorebi.applicationSpecificConfiguration`: fetches
  app-specific configs from remote GitHub repositories at pinned
  revisions

* `services.komorebi-bar.enable`: enables komorebi-bar launchd agent(s)
* `services.komorebi-bar.bars.<name>`: named bar instances, one per
  monitor
* `services.komorebi-bar.bars.<name>.config`: typed Nix configuration per
  bar
* `services.komorebi-bar.bars.<name>.configFile`: path to a JSON config
  file per bar

The applicationSpecificConfiguration option supports multiple sources,
allowing users to combine the upstream default from
LGUG2Z/komorebi-application-specific-configuration with their own
personal overrides from other repositories.

When configFile is specified, the JSON file is validated against the
flake's version of the schema before being passed to the binary.

A new flake check, `darwin-module-validation`, validates the module
options and exercises the configFile validation against the example
JSON files loaded into `komorebic` for the `quickstart` cmd.
2025-12-24 17:18:44 -08:00
LGUG2Z 23aca28267 build(nix): add generated module opts and validation
This commit adds NixOS module option generation for komorebi and
komorebi-bar configurations, along with a nix and JSONSchema validation
test harness that runs as part of `nix flake check`.

`schemars-nixgen` (same as `schemars-docgen`, not sure if I'm gonna
release this...) generates strongly-typed Nix option definitions from
the generated JSONSchema files, allowing users to write type-checked Nix
configurations that map directly to the config files.

This will eventually be plugged into a nix-darwin module which I have
yet to start writing.
2025-12-24 17:18:41 -08:00