From 5c79bcb896468e9ed403ca465a96b7e8310bb703 Mon Sep 17 00:00:00 2001 From: Fiscal Velvet Poet Date: Thu, 7 Jul 2022 13:57:44 +1000 Subject: [PATCH] nix: added alejandra for formatting --- default.nix | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/default.nix b/default.nix index 4e83b98..e309c7a 100644 --- a/default.nix +++ b/default.nix @@ -1,15 +1,20 @@ -{ sources ? import ./nix/sources.nix -, system ? builtins.currentSystem -, crossSystem ? null -, config ? {} -}@args: with import ./nix args; { +{ + sources ? import ./nix/sources.nix, + system ? builtins.currentSystem, + crossSystem ? null, + config ? {}, + alejandraUnstable ? (import sources.nixpkgsUnstable {}).alejandra, +} @ args: +with import ./nix args; { shell = mkShell { inherit (import sources.niv {}) niv; buildInputs = [ + alejandraUnstable # The Uncompromising Nix Code Formatter niv - nixopsUnstable # work around for issue #127423 + nixopsUnstable # work around for issue #127423 + treefmt # one CLI to format the code tree ]; - NIX_PATH = "nixpkgs=${path}"; + NIX_PATH = "nixpkgs=${sources.nixpkgs}"; NIXOPS_DEPLOYMENT = "${globals.deploymentName}"; }; }