nix: added alejandra for formatting

This commit is contained in:
Fiscal Velvet Poet 2022-07-07 13:57:44 +10:00
parent dbb8e6def5
commit 5c79bcb896
Signed by: fiscalvelvetpoet
GPG key ID: D8EBFD58B023BD47

View file

@ -1,15 +1,20 @@
{ sources ? import ./nix/sources.nix {
, system ? builtins.currentSystem sources ? import ./nix/sources.nix,
, crossSystem ? null system ? builtins.currentSystem,
, config ? {} crossSystem ? null,
}@args: with import ./nix args; { config ? {},
alejandraUnstable ? (import sources.nixpkgsUnstable {}).alejandra,
} @ args:
with import ./nix args; {
shell = mkShell { shell = mkShell {
inherit (import sources.niv {}) niv; inherit (import sources.niv {}) niv;
buildInputs = [ buildInputs = [
alejandraUnstable # The Uncompromising Nix Code Formatter
niv 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}"; NIXOPS_DEPLOYMENT = "${globals.deploymentName}";
}; };
} }