Skip to content

piegamesde/nixfmt

This branch is 5 commits ahead of, 313 commits behind NixOS/nixfmt:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

a12b708 · Jul 11, 2023
Mar 17, 2023
Jul 11, 2023
Feb 20, 2023
Aug 12, 2019
Apr 7, 2022
Nov 1, 2022
Feb 6, 2023
Feb 19, 2023
Aug 12, 2019
May 12, 2019
Nov 1, 2022
Aug 12, 2019
Aug 12, 2019
Feb 25, 2022
Feb 24, 2022
Feb 20, 2023
Feb 20, 2023
Nov 1, 2022
Feb 24, 2022
Jun 14, 2023

Repository files navigation

nixfmt

nixfmt is a formatter for Nix code, intended to easily apply a uniform style.

You are encouraged to test this out on your code and submit any undesirable formatting you find as an issue

Build Status Cachix

Installation

  • nixfmt is in nixpkgs master as of 2019-09-04:

    nix-env -iA nixpkgs.nixfmt
    
  • To get the most recent version, install from master:

    # Optional: use cachix to get cached builds even for master
    cachix use nixfmt
    nix-env -f https://github.com/serokell/nixfmt/archive/master.tar.gz -i
    
  • Nix with flakes

    nix profile install github:serokell/nixfmt
    

Development

With Nix

Haskell dependencies will be built by Nix.

  • Enter nix-shell
  • Build with cabal new-build

Without Nix

Haskell dependencies will be built by Cabal.

  • Build with cabal new-build

Usage

  • nixfmt < input.nix – reads Nix code form stdin, formats it, and outputs to stdout
  • nixfmt file.nix – format the file in place

For Contributors

We welcome issues and pull requests on GitHub.

About Serokell

nixfmt is maintained and funded with ❤️ by Serokell. The names and logo for Serokell are trademark of Serokell OÜ.

We love open source software! See our other projects or hire us to design, develop and grow your idea!

About

A formatter for Nix code

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Haskell 78.1%
  • Shell 10.0%
  • HTML 6.6%
  • Nix 5.3%