diff --git a/flake.nix b/flake.nix index 228bfa3..617e3d7 100644 --- a/flake.nix +++ b/flake.nix @@ -46,6 +46,17 @@ }; }; + formatter.${system} = nixpkgs.legacyPackages.${system}.alejandra.overrideAttrs { + passthru.tests.version = {}; + postPatch = '' + substituteInPlace src/alejandra/src/builder.rs \ + --replace '2 * build_ctx.indentation' '4 * build_ctx.indentation' + substituteInPlace src/alejandra/src/rules/string.rs \ + --replace 'format!(" {}", line)' 'format!(" {}", line)' + rm -r src/alejandra/tests + ''; + }; + devShells.${system}.default = pkgs.mkShell { packages = [pkgs.sops]; }; diff --git a/modules/home/vscode.nix b/modules/home/vscode.nix index a43562f..e2af4e3 100644 --- a/modules/home/vscode.nix +++ b/modules/home/vscode.nix @@ -7,21 +7,7 @@ options.myConfig.vscode.enable = lib.mkEnableOption ""; config = lib.mkIf config.myConfig.vscode.enable { - home.packages = let - alejandra4 = pkgs.alejandra.overrideAttrs { - passthru.tests.version = lib.mkForce {}; - postPatch = '' - substituteInPlace src/alejandra/src/builder.rs \ - --replace '2 * build_ctx.indentation' '4 * build_ctx.indentation' - substituteInPlace src/alejandra/src/rules/string.rs \ - --replace 'format!(" {}", line)' 'format!(" {}", line)' - rm -r src/alejandra/tests - ''; - }; - in [ - pkgs.nil - alejandra4 - ]; + home.packages = [pkgs.nil]; programs.vscode = { enable = true;