69 lines
1.8 KiB
Nix
69 lines
1.8 KiB
Nix
{
|
|
description = "CL L2 V0";
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
|
|
rust-flake.url = "github:juspay/rust-flake";
|
|
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 = [
|
|
inputs.rust-flake.flakeModules.default
|
|
inputs.rust-flake.flakeModules.nixpkgs
|
|
inputs.git-hooks-nix.flakeModule
|
|
inputs.treefmt-nix.flakeModule
|
|
];
|
|
systems = [
|
|
"x86_64-linux"
|
|
];
|
|
perSystem = {
|
|
self',
|
|
config,
|
|
inputs',
|
|
pkgs,
|
|
lib,
|
|
system,
|
|
...
|
|
}: {
|
|
devShells.default = pkgs.mkShell {
|
|
inputsFrom = [
|
|
self'.devShells.rust
|
|
config.pre-commit.devShell
|
|
];
|
|
shellHook = ''
|
|
echo 1>&2 "Welcome to the development shell!"
|
|
${config.pre-commit.installationScript}
|
|
export DATABASE_URL="sqlite:./db/cll2v0.db";
|
|
export CLL2V0_KEYS="db/keys";
|
|
'';
|
|
name = "cardano-lightning";
|
|
packages = with pkgs; [
|
|
];
|
|
};
|
|
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;
|
|
};
|
|
flake = {
|
|
};
|
|
};
|
|
}
|