Switch formatting to nixfmt-tree
All checks were successful
CI / build (push) Successful in 2m26s

This commit is contained in:
Fabian Hauser 2025-03-20 13:40:57 +02:00
parent 9088ef8a04
commit 778cb00a1f
3 changed files with 3 additions and 10 deletions

View file

@ -9,12 +9,7 @@
${system} = { ${system} = {
# Check project formatting # Check project formatting
format = pkgs.runCommand "nixfmt-check" { } '' formatter = self.formatter.${system};
set -euo pipefail
cd ${self}
${self.formatter.${system}}/bin/formatter . --check
mkdir $out
'';
#TODO(#29): Integration/System tests #TODO(#29): Integration/System tests

View file

@ -26,7 +26,7 @@
deploy-rs deploy-rs
nixVersions.git nixVersions.git
nixd nixd
nixfmt-rfc-style nixfmt-tree
nixos-anywhere nixos-anywhere
ssh-to-age ssh-to-age
pssh pssh

View file

@ -50,9 +50,7 @@
checks = import ./checks/default.nix importParams; checks = import ./checks/default.nix importParams;
deploy = import ./deploy/default.nix importParams; deploy = import ./deploy/default.nix importParams;
devShells = import ./dev-shells/default.nix importParams; devShells = import ./dev-shells/default.nix importParams;
formatter.${system} = pkgs.writeShellScriptBin "formatter" '' formatter.${system} = pkgs.nixfmt-tree;
${pkgs.findutils}/bin/find $1 -type f -name '*.nix' -exec ${pkgs.nixfmt-rfc-style}/bin/nixfmt ''${@:2} {} +
'';
nixosConfigurations = import ./nixos-configurations/default.nix importParams; nixosConfigurations = import ./nixos-configurations/default.nix importParams;
nixosModules = import ./nixos-modules/default.nix importParams; nixosModules = import ./nixos-modules/default.nix importParams;
packages = import ./packages/default.nix importParams; packages = import ./packages/default.nix importParams;