63 lines
1.6 KiB
Nix
63 lines
1.6 KiB
Nix
{
|
|
description = "CL L2 V0";
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
|
|
rust-overlay.url = "github:oxalica/rust-overlay";
|
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
|
git-hooks-nix.url = "github:cachix/git-hooks.nix";
|
|
git-hooks-nix.inputs.nixpkgs.follows = "nixpkgs";
|
|
treefmt-nix.url = "github:numtide/treefmt-nix";
|
|
treefmt-nix.inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
outputs = inputs:
|
|
inputs.flake-parts.lib.mkFlake {inherit inputs;} {
|
|
imports = [
|
|
./nix/rust.nix
|
|
inputs.git-hooks-nix.flakeModule
|
|
inputs.treefmt-nix.flakeModule
|
|
];
|
|
flake = {
|
|
# Put your original flake attributes here.
|
|
};
|
|
systems = [
|
|
# systems for which you want to build the `perSystem` attributes
|
|
"x86_64-linux"
|
|
# ...
|
|
];
|
|
perSystem = {
|
|
self',
|
|
config,
|
|
inputs',
|
|
pkgs,
|
|
lib,
|
|
system,
|
|
...
|
|
}: {
|
|
treefmt = {
|
|
projectRootFile = "flake.nix";
|
|
flakeFormatter = true;
|
|
programs = {
|
|
prettier = {
|
|
enable = true;
|
|
settings = {
|
|
printWidth = 80;
|
|
proseWrap = "always";
|
|
};
|
|
};
|
|
alejandra.enable = true;
|
|
rustfmt.enable = true;
|
|
};
|
|
};
|
|
pre-commit.settings.hooks.treefmt.enable = true;
|
|
_module.args.pkgs = import inputs.nixpkgs {
|
|
inherit system;
|
|
overlays = [
|
|
inputs.rust-overlay.overlays.default
|
|
];
|
|
config = {};
|
|
};
|
|
};
|
|
};
|
|
}
|