You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When choosing to use a formatter, the formatter is only added to the devShells:
# Flake outputs that other flakes can useoutputs={self,flake-schemas,nixpkgs}:
let# Helpers for producing system-specific outputssupportedSystems=["x86_64-linux""aarch64-linux"];forEachSupportedSystem=f: nixpkgs.lib.genAttrssupportedSystems(system: f{pkgs=importnixpkgs{inheritsystem;};});in{# Schemas tell Nix about the structure of your flake's outputsschemas=flake-schemas.schemas;# Development environmentsdevShells=forEachSupportedSystem({pkgs}: {default=pkgs.mkShell{# Pinned packages available in the environmentpackages=withpkgs;[nixpkgs-fmt];};});};
It would be better to add it to the formatter output instead (or in addition to).
# Flake outputs that other flakes can useoutputs={self,flake-schemas,nixpkgs}:
let# Helpers for producing system-specific outputssupportedSystems=["x86_64-linux""aarch64-linux"];forEachSupportedSystem=f: nixpkgs.lib.genAttrssupportedSystems(system: f{pkgs=importnixpkgs{inheritsystem;};});in{# Schemas tell Nix about the structure of your flake's outputsschemas=flake-schemas.schemas;# Formatter for nix files (run `nix fmt`)formatter=forEachSupportedSystem({pkgs}: pkgs.nixpkgs-fmt);# Development environmentsdevShells=forEachSupportedSystem({pkgs}: {default=pkgs.mkShell{# Pinned packages available in the environmentpackages=withpkgs;[nixpkgs-fmt];};});};
The text was updated successfully, but these errors were encountered:
Problem
When choosing to use a formatter, the formatter is only added to the devShells:
It would be better to add it to the
formatter
output instead (or in addition to).The text was updated successfully, but these errors were encountered: