Commit Graph
5 Commits
Author SHA1 Message Date
Chris Scutcher d6aea26c5b Merge branch 'master' of https://github.com/nix-community/disko into FORMAT-WITH-STATIX-OPTIONS 2023-02-09 16:23:52 +00:00
Chris Scutcher ff5127ea0a style: Re-apply style normalisation
Originally this was manually applied with;

```sh
nixpkgs-fmt **.nix && statix fix
```

but I overlooked the fact that `**.nix` would only expand to files in
the root (I should have used `**/*.nix`).

Previous commit adds `nix fmt` support which passes `.` to `nixpkgs-fmt`
(if no other path is explicitly specified when running `nix fmt`).

This commit includes the changes made by running `nix fmt`.
2023-02-07 15:56:08 +00:00
Chris Scutcher a393654c3b style: Define formatter in flake to allow nix fmt
Noticed this was an option to codify the agreed style/pattern
auto-normalise discussed in [#143]

[#143]: https://github.com/nix-community/disko/pull/143
2023-02-07 15:51:33 +00:00
Chris Scutcher 4ba8181319 style: Disable inherit pattern check in statix
As discussed in [this
comment](https://github.com/nix-community/disko/pull/143#discussion_r1097912402),
as a blanket rule converting everything possible to `inherit` like
statements can hurt readability.

Add config file for statix to disable these checks and fixes, then rerun
the autofix with these options.
2023-02-07 15:37:12 +00:00
Chris Scutcher 08435eec4b style: Apply nixpkgs-fmt and fix
Apply standard formatting and some statix conventions using;

```sh
nixpkgs-fmt **.nix && statix fix .
```

With the intent of making contribution a bit easier and reducing mental
load in hand formatting (in the same vein as [black]).

[black]: https://github.com/psf/black#the-uncompromising-code-formatter
2023-02-06 14:24:34 +00:00