diff --git a/README.md b/README.md index 25c0c52..1bfa35a 100644 --- a/README.md +++ b/README.md @@ -293,7 +293,9 @@ So here are some Guidelines. ## Coding style and linting. If you run `nix flake check` there are automated checks in place, please make sure to pass them. -There is also a code autoformatter (`alejandra`) incorporated into those. You can also install +There is also a code autoformatter (`alejandra`) incorporated into those. If you want to run +it you can do so over the development shell or by running `nix fmt`. +You can also install them into your local git repository as pre-commit hooks, and setting up a shell that has even more tooling by running `nix develop`. That will give you a bash in which you can run all the checks manually `pre-commit run -a`. This will also run the autoformatter. diff --git a/flake-module.nix b/flake-module.nix index 8584c3d..b1d1d42 100644 --- a/flake-module.nix +++ b/flake-module.nix @@ -26,7 +26,6 @@ ]; in { check.enable = true; - pkgs = inputs'.nixpkgs.legacyPackages; settings = { # for some reason statix takes it config differently than all the other hooks. settings.statix = { @@ -45,6 +44,8 @@ }; }; + formatter = pkgs.alejandra; + # Per-system attributes can be defined here. The self' and inputs' # module parameters provide easy access to attributes of the same # system.