iowo/flake.nix

66 lines
1.5 KiB
Nix
Raw Permalink Normal View History

2023-11-15 09:55:14 +00:00
{
inputs = {
2024-01-10 22:21:33 +00:00
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
2023-11-15 09:55:14 +00:00
systems.url = "github:nix-systems/default";
devenv.url = "github:cachix/devenv";
fenix.url = "github:nix-community/fenix";
};
nixConfig = {
extra-trusted-public-keys = "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=";
extra-substituters = "https://devenv.cachix.org";
};
outputs = {
self,
nixpkgs,
devenv,
2024-04-12 18:55:55 +00:00
fenix,
systems,
...
} @ inputs: let
forEachSystem = nixpkgs.lib.genAttrs (import systems);
in {
devShells =
forEachSystem
(system: let
pkgs = nixpkgs.legacyPackages.${system};
2024-04-12 18:55:55 +00:00
toolchain = with fenix.packages.${system};
combine [
complete.toolchain
2024-04-12 18:55:55 +00:00
];
in {
default = devenv.lib.mkShell {
inherit inputs pkgs;
modules = [
({
pkgs,
config,
...
}: {
pre-commit.hooks = {
clippy.enable = false;
rustfmt.enable = true;
};
2024-01-18 19:29:41 +00:00
env = {
RUST_BACKTRACE = 1;
};
packages = with pkgs; [
just
nushell
ripgrep
typst
typst-lsp
mold
cargo-nextest
cargo-watch
2024-04-12 18:55:55 +00:00
toolchain
2023-11-15 09:55:14 +00:00
];
})
];
};
});
};
2023-11-15 09:55:14 +00:00
}