From 9f7df7ca071de7e859e712bdb866f56271e949a3 Mon Sep 17 00:00:00 2001 From: Noah S-C Date: Wed, 3 May 2023 13:56:44 +0100 Subject: [PATCH] nix: set formatter & use nil instead of rnix-lsp (#51409) Allows formatting everything with `nix fmt` [nil](https://github.com/oxalica/nil) appears more maintained and higher quality than rnix-lsp ## Test plan N/A, nix stuff --- flake.nix | 2 ++ shell.nix | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index ea2499096a9..bfed3876727 100644 --- a/flake.nix +++ b/flake.nix @@ -17,6 +17,8 @@ } ); + formatter = genAttrs defaultSystems (system: nixpkgs.legacyPackages.${system}.nixpkgs-fmt); + # Pin a specific version of universal-ctags to the same version as in cmd/symbols/ctags-install-alpine.sh. overlays.ctags = (import ./dev/nix/ctags.nix { inherit nixpkgs utils; inherit (nixpkgs) lib; }).overlay; diff --git a/shell.nix b/shell.nix index 17619f80de2..6121f3a3677 100644 --- a/shell.nix +++ b/shell.nix @@ -77,7 +77,8 @@ pkgs.mkShell { # The packages in the `buildInputs` list will be added to the PATH in our shell nativeBuildInputs = with pkgs; [ - rnix-lsp + # nix language server + nil # Our core DB. postgresql_13