StackPanel
Internal DocsModulesGo

go-app.proto.nix

Unified field definitions for Go app configuration.

Unified field definitions for Go app configuration.

This is the SINGLE SOURCE OF TRUTH for Go module per-app options. It defines SpFields that simultaneously serve as:

1. Proto fields → GoAppConfig message (for Go/TS codegen)
2. Nix option source → go/module.nix uses asOption to create lib.mkOption
3. UI panel source → go/ui.nix uses fields for auto-generated panels

Usage from module.nix:

let goSchema = import ./schema.nix { inherit lib; };
in { options.go.mainPackage = sp.asOption goSchema.fields.mainPackage; }

Usage from ui.nix:

let goSchema = import ./schema.nix { inherit lib; };
in panelsLib.mkPanelFromSpFields { fields = goSchema.fields; ... }

Proto generation:

goSchema.protoFile → rendered .proto file with GoAppConfig message