filament/flake.nix

67 lines
1.7 KiB
Nix
Raw Normal View History

2025-03-20 11:27:50 +08:00
{
inputs = {
devenv.url = "github:cachix/devenv";
2025-04-27 07:19:52 +08:00
espkgs.url = "github:mirrexagon/nixpkgs-esp-dev";
fenix.url = "github:nix-community/fenix";
2025-03-20 11:27:50 +08:00
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs-python.url = "github:cachix/nixpkgs-python";
};
outputs = inputs @ {
self,
devenv,
2025-04-27 07:19:52 +08:00
espkgs,
2025-03-20 11:27:50 +08:00
flake-utils,
nixpkgs,
...
}:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
2025-04-27 07:19:52 +08:00
espPkgs = espkgs.packages.${system};
2025-03-20 11:27:50 +08:00
in {
packages = {
devenv-up = self.devShells.${system}.default.config.procfileScript;
devenv-test = self.devShells.${system}.default.config.test;
};
devShells.default = devenv.lib.mkShell {
inherit inputs pkgs;
modules = [
{
2025-04-27 07:19:52 +08:00
env = {
LIBCLANG_PATH = "${pkgs.llvmPackages.libclang.lib}/lib";
};
2025-03-20 11:27:50 +08:00
git-hooks.hooks.alejandra.enable = true;
languages = {
nix.enable = true;
2025-04-27 07:19:52 +08:00
python.enable = true;
rust = {
enable = true;
channel = "nightly";
components = [
"cargo"
"clippy"
"rustc"
"rustfmt"
"rust-analyzer"
"rust-src"
];
mold.enable = false;
};
2025-03-20 11:27:50 +08:00
typst.enable = true;
};
2025-04-27 07:19:52 +08:00
packages = with pkgs; [
espflash
espPkgs.esp-idf-esp32c6
ldproxy
];
2025-03-20 11:27:50 +08:00
}
];
};
});
}