Skip to content

Instantly share code, notes, and snippets.

@bobvanderlinden
Created May 15, 2023 20:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bobvanderlinden/d75ff4abd93a01c31e1973a6e7e23d84 to your computer and use it in GitHub Desktop.
Save bobvanderlinden/d75ff4abd93a01c31e1973a6e7e23d84 to your computer and use it in GitHub Desktop.
devenv.yaml JSON Schema

Add to the top of devenv.yaml:

# yaml-language-server: $schema=<url/path to devenv.schema.json>
{
"$id": "https://example.com/devenv.schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "devenv.yaml schema",
"type": "object",
"properties": {
"inputs": {
"type": "object",
"description": "The Nix flake inputs to use.",
"additionalProperties": {
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "The URL for the input.\nFor example:\n\n- github:NixOS/nixpkgs/nixpkgs-unstable\n- path:./relative/path/to/a/flake\n- git+https://git.somehost.tld/user/path?ref=branch&rev=fdc8ef970de2b4634e1b3dca296e1ed918459a9e"
},
"overlays": {
"type": "array",
"items": {
"type": "string",
"description": "Which overlay names to use from the input."
}
},
"inputs": {
"type": "object",
"additionalProperties": {
"type": "object",
"properties": {
"follows": {
"type": "string",
"description": "The top-level input from this devenv.yaml to replace this input with."
}
}
}
}
}
}
},
"allowUnfree": {
"type": "boolean",
"description": "Whether to allow unfree packages in nixpkgs."
},
"imports": {
"type": "array",
"items": {
"type": "string",
"description": "Which directories (containing devenv.nix) to import."
}
}
},
"additionalProperties": false
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment