File tree Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -149,7 +149,8 @@ use nix
149149- [ deadnix] ( https://github.com/astro/deadnix )
150150- [ flake-checker] ( https://github.com/DeterminateSystems/flake-checker )
151151- [ nil] ( https://github.com/oxalica/nil )
152- - [ nixfmt] ( https://github.com/serokell/nixfmt/ )
152+ - [ nixfmt-classic] ( https://github.com/NixOS/nixfmt/tree/v0.6.0 )
153+ - [ nixfmt-rfc-style] ( https://github.com/NixOS/nixfmt/ )
153154- [ nixpkgs-fmt] ( https://github.com/nix-community/nixpkgs-fmt )
154155- [ statix] ( https://github.com/nerdypepper/statix )
155156
Original file line number Diff line number Diff line change 859859 } ;
860860 } ;
861861 } ;
862+ nixfmt-rfc-style = mkOption {
863+ description = "nixfmt (RFC 166 style) hook" ;
864+ type = types . submodule {
865+ imports = [ hookModule ] ;
866+ options . settings = {
867+ width =
868+ mkOption {
869+ type = types . nullOr types . int ;
870+ description = "Line width." ;
871+ default = null ;
872+ } ;
873+ } ;
874+ } ;
875+ } ;
862876 no-commit-to-branch = mkOption {
863877 description = "no-commit-to-branch-hook" ;
864878 type = types . submodule {
@@ -2868,6 +2882,14 @@ lib.escapeShellArgs (lib.concatMap (ext: [ "--ghc-opt" "-X${ext}" ]) hooks.ormol
28682882 entry = "${ hooks . nixfmt . package } /bin/nixfmt ${ lib . optionalString ( hooks . nixfmt . settings . width != null ) "--width=${ toString hooks . nixfmt . settings . width } " } " ;
28692883 files = "\\ .nix$" ;
28702884 } ;
2885+ nixfmt-rfc-style =
2886+ {
2887+ name = "nixfmt-rfc-style" ;
2888+ description = "Nix code prettifier (RFC 166 style)." ;
2889+ package = tools . nixfmt-rfc-style ;
2890+ entry = "${ hooks . nixfmt-rfc-style . package } /bin/nixfmt ${ lib . optionalString ( hooks . nixfmt-rfc-style . settings . width != null ) "--width=${ toString hooks . nixfmt-rfc-style . settings . width } " } " ;
2891+ files = "\\ .nix$" ;
2892+ } ;
28712893 nixpkgs-fmt =
28722894 {
28732895 name = "nixpkgs-fmt" ;
You can’t perform that action at this time.
0 commit comments