iowo/flake.nix

50 lines
1.3 KiB
Nix
Raw Normal View History

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";
};
outputs = { self, nixpkgs, devenv, systems, ... } @ inputs:
let
forEachSystem = nixpkgs.lib.genAttrs (import systems);
in
{
devShells = forEachSystem
(system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
default = devenv.lib.mkShell {
inherit inputs pkgs;
modules = [
2023-11-20 12:59:32 +01:00
({pkgs, config, ...}: {
languages.rust = {
enable = true;
channel = "nightly";
};
pre-commit.hooks = {
clippy.enable = true;
rustfmt.enable = true;
};
2024-01-11 00:36:58 +01:00
packages = with pkgs; [
2024-01-11 10:39:03 +01:00
just nushell
typst typst-lsp
2024-01-11 00:36:58 +01:00
mold
];
2023-11-20 12:59:32 +01:00
})
2023-11-15 10:55:14 +01:00
];
};
});
};
}