72 lines
1.9 KiB
Nix
72 lines
1.9 KiB
Nix
{
|
|
inputs = {
|
|
devenv.url = "github:cachix/devenv";
|
|
espkgs.url = "github:mirrexagon/nixpkgs-esp-dev";
|
|
fenix.url = "github:nix-community/fenix";
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
nixpkgs-python.url = "github:cachix/nixpkgs-python";
|
|
rust-overlay.url = "github:oxalica/rust-overlay";
|
|
};
|
|
|
|
outputs = inputs @ {
|
|
self,
|
|
devenv,
|
|
espkgs,
|
|
flake-utils,
|
|
nixpkgs,
|
|
...
|
|
}:
|
|
flake-utils.lib.eachDefaultSystem (system: let
|
|
pkgs = import nixpkgs {
|
|
inherit system;
|
|
config.allowUnfree = true;
|
|
};
|
|
espPkgs = espkgs.packages.${system};
|
|
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 = [
|
|
{
|
|
env = {
|
|
LIBCLANG_PATH = "${pkgs.llvmPackages.libclang.lib}/lib";
|
|
};
|
|
git-hooks.hooks = {
|
|
alejandra.enable = true;
|
|
taplo.enable = true;
|
|
};
|
|
languages = {
|
|
nix.enable = true;
|
|
python.enable = true;
|
|
rust = {
|
|
enable = true;
|
|
channel = "nightly";
|
|
components = [
|
|
"cargo"
|
|
"clippy"
|
|
"rustc"
|
|
"rustfmt"
|
|
"rust-analyzer"
|
|
"rust-src"
|
|
];
|
|
mold.enable = false;
|
|
};
|
|
typst.enable = true;
|
|
};
|
|
packages = with pkgs; [
|
|
espflash
|
|
espPkgs.esp-idf-full
|
|
ldproxy
|
|
opencode
|
|
sops
|
|
];
|
|
}
|
|
];
|
|
};
|
|
});
|
|
}
|