Flakes: Difference between revisions

Malix (talk | contribs)
m Input schema: format
X10an14 (talk | contribs)
m Updated nix flake schema's `apps` definition & formatter suggestions.
 
Line 298: Line 298:


</translate>
</translate>
<syntaxHighlight lang=nix>
<syntaxhighlight lang="nix">
{ self, ... }@inputs:
{ self, ... }@inputs:
{
{
Line 311: Line 311:
     type = "app";
     type = "app";
     program = "<store-path>";
     program = "<store-path>";
    meta = {description = "..."; inherit otherMetaAttrs; };
   };
   };
   # Executed by `nix run . -- <args?>`
   # Executed by `nix run . -- <args?>`
   apps."<system>".default = { type = "app"; program = "..."; };
   apps."<system>".default = { type = "app"; program = "..."; meta = {description = "..."; inherit otherMetaAttrs; }; };


   # Formatter (alejandra, nixfmt or nixpkgs-fmt)
   # Formatter (alejandra, nixfmt, treefmt-nix or nixpkgs-fmt)
   formatter."<system>" = derivation;
   formatter."<system>" = derivation;
   # Used for nixpkgs packages, also accessible via `nix build .#<name>`
   # Used for nixpkgs packages, also accessible via `nix build .#<name>`
Line 344: Line 345:
   templates.default = { path = "<store-path>"; description = ""; };
   templates.default = { path = "<store-path>"; description = ""; };
}
}
</syntaxHighlight>
</syntaxhighlight>
<translate>
<translate>