From c7b743e4dd245836540d255b82a1cf330a602850 Mon Sep 17 00:00:00 2001 From: Pablo Ovelleiro Corral Date: Sun, 28 Apr 2024 17:36:45 +0200 Subject: [PATCH] Add official formatter to flake Allows running `nix fmt`, which will format using the official style as agreed upon in nixpkgs --- .editorconfig | 3 ++- flake.nix | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.editorconfig b/.editorconfig index 916b2b3..21409c4 100644 --- a/.editorconfig +++ b/.editorconfig @@ -6,7 +6,8 @@ end_of_line = lf insert_final_newline = true trim_trailing_whitespace = true charset = utf-8 -indent_style = tab +indent_style = space +indent_size = 2 # Ignore diffs/patches [*.{diff,patch}] diff --git a/flake.nix b/flake.nix index 32e9c60..5ffdbc0 100644 --- a/flake.nix +++ b/flake.nix @@ -85,7 +85,11 @@ { inherit username; - checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) inputs.deploy-rs.lib; + checks = builtins.mapAttrs ( + system: deployLib: deployLib.deployChecks self.deploy + ) inputs.deploy-rs.lib; + + formatter."x86_64-linux" = inputs.unstable.legacyPackages."x86_64-linux".nixfmt-rfc-style; deploy.nodes = self.lib.deploy.mkDeployNodes self.nixosConfigurations { nachtigall = {