Enhances devshell configuration and extracts it to shell.nix
Removes dependency on flake-utils to reduce download size
Removes pre-commit hooks because they do not guarantee style enforcement. reduces download size too.
Adds treefmt-nix that unifies nix fmt and nix flake check and allows to use multiple formatters and linters with nix fmt at once.
Adds a github action that runs nix flake check on every pull request to ensure consistent styling, and perform all other checks defined in the flake should they be added in the future.
In my opinion nixfmt-rfc-style is better than alejandra because alejandra makes nix code look confusing, to switch to nixfmt just replace alejandra.enable with nixfmt.enable in treefmt.nix and execute nix fmt. You might also want to enable more formatters to format non-nix nix-topology code with nix fmt by adding prettier.enable or yamlfmt.enable to treefmt.nix for full list of supported formatters check treefmt-nix
shell.nix
nix fmt
andnix flake check
and allows to use multiple formatters and linters withnix fmt
at once.nix flake check
on every pull request to ensure consistent styling, and perform all other checks defined in the flake should they be added in the future.In my opinion nixfmt-rfc-style is better than alejandra because alejandra makes nix code look confusing, to switch to nixfmt just replace
alejandra.enable
withnixfmt.enable
intreefmt.nix
and executenix fmt
. You might also want to enable more formatters to format non-nix nix-topology code withnix fmt
by addingprettier.enable
oryamlfmt.enable
totreefmt.nix
for full list of supported formatters check treefmt-nix