From 1395a620b46d11ae33952b0e19b5ad8fd7355ac8 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Mon, 19 Aug 2024 10:14:21 +0200 Subject: [PATCH] style: avoid final newlines in secrets/* format using nixfmt-rfc-style --- .editorconfig | 8 ++++++++ flake.nix | 2 ++ treefmt.toml | 3 ++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.editorconfig b/.editorconfig index 91e0b45f..f1969cc2 100644 --- a/.editorconfig +++ b/.editorconfig @@ -20,6 +20,14 @@ indent_style = unset indent_size = unset [{.*,secrets}/**] +end_of_line = false +insert_final_newline = false +trim_trailing_whitespace = unset +charset = unset +indent_style = unset +indent_size = unset + +[*.rom] end_of_line = unset insert_final_newline = unset trim_trailing_whitespace = unset diff --git a/flake.nix b/flake.nix index c150028a..0cbeac5f 100644 --- a/flake.nix +++ b/flake.nix @@ -102,6 +102,8 @@ }; flake = { + formatter."x86_64-linux" = inputs.unstable.legacyPackages."x86_64-linux".nixfmt-rfc-style; + deploy.nodes = self.lib.deploy.mkDeployNodes self.nixosConfigurations { #example = { # hostname = "example.com:22"; diff --git a/treefmt.toml b/treefmt.toml index 41ee3051..1807bde5 100644 --- a/treefmt.toml +++ b/treefmt.toml @@ -1,5 +1,6 @@ [formatter.nix] -command = "alejandra" +command = "nix" +options = ["fmt"] includes = ["*.nix"] excludes = ["pkgs/_sources/generated.nix"]