Skip to content

DeterminateSystems/flake-schemas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flake schemas

Note

Flake schemas are not yet supported in Nix. You can track ongoing work in this pull request against the upstream project. Until that merges, you can experiment with flake schemas using a candidate version of Nix.

This Nix flake provides a set of schema definitions for commonly used flake output types. It's used by default for flakes that do not have a schemas output.

It supports the following flake output types:

Experimenting with flake schemas

Flake schemas are not yet supported in Nix. To experiment with them, you can use the version of Nix from the pull request to upstream. Below are some example commands.

Warning

The first time you run one of the commands, you will build Nix in its entirety, which is resource instensive and could take a while.

# Display the flake schema for this repo
nix run github:DeterminateSystems/nix-src/flake-schemas -- \
  flake show "https://flakehub.com/f/DeterminateSystems/flake-schemas/*"

# Display the flake schema for this repo as JSON
nix run github:DeterminateSystems/nix-src/flake-schemas -- \
  flake show --json "https://flakehub.com/f/DeterminateSystems/flake-schemas/*"

# Display the flake schema for Nixpkgs
nix run github:DeterminateSystems/nix-src/flake-schemas -- \
  flake show "https://flakehub.com/f/NixOS/nixpkgs/*"

# Display the flake schema for Nixpkgs as JSON
nix run github:DeterminateSystems/nix-src/flake-schemas -- \
  flake show --json "https://flakehub.com/f/NixOS/nixpkgs/*"

Read more