From 29972bf2d8f0d008de9244cd7f47842fad9352e4 Mon Sep 17 00:00:00 2001 From: Myned Date: Wed, 11 Sep 2024 18:15:35 -0500 Subject: [PATCH] nix: switch to alejandra formatter Signed-off-by: Myned --- flake.in.nix | 4 +++- options/custom/programs/vscode.nix | 2 +- options/custom/settings/packages.nix | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/flake.in.nix b/flake.in.nix index c1c8267..a76279f 100644 --- a/flake.in.nix +++ b/flake.in.nix @@ -101,8 +101,10 @@ outputs = inputs: { # TODO: Use forAllSystems + # FIXME: nixd always uses nixfmt when importing flakes # https://nix.dev/manual/nix/2.18/command-ref/new-cli/nix3-fmt - formatter.x86_64-linux = inputs.nixpkgs-unstable.legacyPackages.x86_64-linux.nixfmt-rfc-style; + # https://github.com/kamadorueda/alejandra/blob/main/STYLE.md + formatter.x86_64-linux = inputs.nixpkgs-unstable.legacyPackages.x86_64-linux.alejandra; nixosConfigurations = let diff --git a/options/custom/programs/vscode.nix b/options/custom/programs/vscode.nix index a64e6c6..bafdf25 100644 --- a/options/custom/programs/vscode.nix +++ b/options/custom/programs/vscode.nix @@ -67,9 +67,9 @@ in home = { # Extension dependencies packages = with pkgs; [ + alejandra # nix-ide blueprint-compiler # blueprint-gtk nixd # nix-ide - nixfmt-rfc-style # nix-ide shfmt # shell-format ]; diff --git a/options/custom/settings/packages.nix b/options/custom/settings/packages.nix index b85fe55..2bccc02 100644 --- a/options/custom/settings/packages.nix +++ b/options/custom/settings/packages.nix @@ -26,11 +26,11 @@ in # CLI applications config.boot.kernelPackages.cpupower # Install for current kernel + alejandra fd fzf jq lm_sensors # sensors - nixfmt-rfc-style # nixfmt nix-output-monitor # nom nix-tree nmap