2023-11-15 10:55:14 +01:00
|
|
|
{
|
|
|
|
inputs = {
|
2024-01-10 23:21:33 +01:00
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
2023-11-15 10:55:14 +01: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";
|
|
|
|
};
|
|
|
|
|
2024-04-11 03:23:03 +02:00
|
|
|
outputs = {
|
|
|
|
self,
|
|
|
|
nixpkgs,
|
|
|
|
devenv,
|
2024-04-12 20:55:55 +02:00
|
|
|
fenix,
|
2024-04-11 03:23:03 +02:00
|
|
|
systems,
|
|
|
|
...
|
|
|
|
} @ inputs: let
|
|
|
|
forEachSystem = nixpkgs.lib.genAttrs (import systems);
|
|
|
|
in {
|
|
|
|
devShells =
|
|
|
|
forEachSystem
|
|
|
|
(system: let
|
|
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
2024-04-12 20:55:55 +02:00
|
|
|
toolchain = with fenix.packages.${system};
|
|
|
|
combine [
|
|
|
|
default.toolchain
|
|
|
|
rust-analyzer
|
|
|
|
];
|
2024-04-11 03:23:03 +02:00
|
|
|
in {
|
|
|
|
default = devenv.lib.mkShell {
|
|
|
|
inherit inputs pkgs;
|
|
|
|
modules = [
|
|
|
|
({
|
|
|
|
pkgs,
|
|
|
|
config,
|
|
|
|
...
|
|
|
|
}: {
|
2024-04-12 20:55:55 +02:00
|
|
|
# languages.rust = {
|
|
|
|
# enable = true;
|
|
|
|
# channel = "nightly";
|
|
|
|
# components = [
|
|
|
|
# "rustc"
|
|
|
|
# "cargo"
|
|
|
|
# "clippy"
|
|
|
|
# "rustfmt"
|
|
|
|
# "rust-src"
|
|
|
|
# "rust-analyzer"
|
|
|
|
# ];
|
|
|
|
# };
|
2023-11-20 12:59:32 +01:00
|
|
|
|
2024-04-11 03:23:03 +02:00
|
|
|
pre-commit.hooks = {
|
2024-04-12 01:02:07 +02:00
|
|
|
clippy.enable = false;
|
2024-04-11 03:23:03 +02:00
|
|
|
rustfmt.enable = true;
|
|
|
|
};
|
2024-01-18 20:29:41 +01:00
|
|
|
|
2024-04-11 03:23:03 +02:00
|
|
|
packages = with pkgs; [
|
|
|
|
just
|
|
|
|
nushell
|
|
|
|
ripgrep
|
|
|
|
typst
|
|
|
|
typst-lsp
|
|
|
|
mold
|
|
|
|
cargo-nextest
|
|
|
|
cargo-watch
|
2024-04-12 20:55:55 +02:00
|
|
|
toolchain
|
2023-11-15 10:55:14 +01:00
|
|
|
];
|
2024-04-11 03:23:03 +02:00
|
|
|
})
|
|
|
|
];
|
|
|
|
};
|
|
|
|
});
|
|
|
|
};
|
2023-11-15 10:55:14 +01:00
|
|
|
}
|