refactor: flake.nix
This commit is contained in:
39
flake.nix
39
flake.nix
@@ -6,27 +6,26 @@
|
|||||||
};
|
};
|
||||||
outputs = { nixpkgs, fenix, ... }:
|
outputs = { nixpkgs, fenix, ... }:
|
||||||
let
|
let
|
||||||
system = "x86_64-linux";
|
forAllSystems = nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed;
|
||||||
pkgs = import nixpkgs { inherit system; };
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
formatter.${system} = pkgs.nixpkgs-fmt;
|
devShells = forAllSystems (system:
|
||||||
devShells.${system}.default = pkgs.mkShell {
|
let pkgs = import nixpkgs { inherit system; }; in
|
||||||
packages = with pkgs; [
|
{
|
||||||
zsh
|
default = pkgs.mkShell {
|
||||||
(fenix.packages.${system}.complete.withComponents [
|
packages = with pkgs; [
|
||||||
"cargo"
|
zsh
|
||||||
"clippy"
|
(fenix.packages.${system}.complete.withComponents [
|
||||||
"rust-src"
|
"cargo"
|
||||||
"rustc"
|
"clippy"
|
||||||
"rustfmt"
|
"rust-src"
|
||||||
"rust-analyzer"
|
"rustc"
|
||||||
])
|
"rustfmt"
|
||||||
];
|
"rust-analyzer"
|
||||||
shellHook = ''
|
])
|
||||||
zsh & disown
|
];
|
||||||
exit
|
};
|
||||||
'';
|
}
|
||||||
};
|
);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user