particle-os-modules/modules/brew/brew.tsp
xyny 46b1070110
docs: improve examples, remove docs superseded by typespec docstrings (#279)
* chore(bling): uncomment example options

* refactor(brew): remove duplicate "configuration options" setting in README, improve TSP docs

* fix(chezmoi): make example an example and not a doc of the configuration options

* chore(rpm-ostree): remove fake example

examples should be runnable

* fix(rpm-ostree): add replacing packages to typespec schema

* fix(rpm-ostree): actually install the packages the repos are added for

* feat(rpm-ostree): showcase installing from URL and using optfix in example

* fix(rpm-ostree): add optfix to typespec

* fix(systemd): real-world example instead of configuration docs duplicate
2024-07-16 17:09:00 +00:00

42 lines
No EOL
2.3 KiB
Text

import "@typespec/json-schema";
using TypeSpec.JsonSchema;
@jsonSchema("/modules/brew.json")
model BrewModule {
/** The brew module installs Homebrew / Linuxbrew at build time and ensures the package manager remains up-to-date.
* https://blue-build.org/reference/modules/brew/
*/
type: "brew";
/** Whether to auto-update the Brew binary using a systemd service. */
"auto-update"?: boolean = true;
/** Defines how often the Brew update service should run. The string is passed directly to `OnUnitInactiveSec` in systemd timer. (Syntax: ['1d', '6h', '10m']). */
"update-interval"?: string = "6h";
/** Time delay after system boot before the first Brew update runs. The string is passed directly to `OnBootSec` in systemd timer. (Syntax: ['1d', '6h', '10m']). */
"update-wait-after-boot"?: string = "10min";
/** Whether to auto-upgrade all installed Brew packages using a systemd service. */
"auto-upgrade"?: boolean = true;
/** Defines how often the Brew upgrade service should run. The string is passed directly to `OnUnitInactiveSec` in systemd timer. (Syntax: ['1d', '6h', '10m']). */
"upgrade-interval"?: string = "8h";
/** Time delay after system boot before the first Brew package upgrade runs. The string is passed directly to `OnBootSec` in systemd timer. (Syntax: ['1d', '6h', '10m']). */
"upgrade-wait-after-boot"?: string = "30min";
/** Whether to increase nofile limits (limits for number of open files) for Brew installations.
* When set to true, it increases the nofile limits to prevent certain "I/O heavy" Brew packages from failing due to "too many open files" error.
* However, it's important to note that increasing nofile limits can have potential security implications for malicious applications which would try to abuse storage I/O.
* Defaults to false for security purposes.
*
* https://serverfault.com/questions/577437/what-is-the-impact-of-increasing-nofile-limits-in-etc-security-limits-conf
*/
"nofile-limits"?: boolean = false;
/** Whether to enable Brew analytics.
* The Homebrew project uses analytics to anonymously collect the information about Brew usage & your system in order to improve the experience of Brew users.
*/
"brew-analytics"?: boolean = true;
}