feat: joel voice

This commit is contained in:
eric
2026-02-05 14:07:58 +01:00
parent 172c5decd3
commit 24b4c12e7d
19 changed files with 627 additions and 18 deletions

64
flake.nix Normal file
View File

@@ -0,0 +1,64 @@
{
description = "A very basic flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
git-hooks.url = "github:cachix/git-hooks.nix";
};
outputs =
{ self, nixpkgs, ... }@inputs:
let
supportedSystems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
in
{
# Run the hooks with `nix fmt`.
formatter = forAllSystems (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
config = self.checks.${system}.pre-commit-check.config;
inherit (config) package configFile;
script = ''
${pkgs.lib.getExe package} run --all-files --config ${configFile}
'';
in
pkgs.writeShellScriptBin "pre-commit-run" script
);
checks = forAllSystems (system: {
pre-commit-check = inputs.git-hooks.lib.${system}.run {
src = ./.;
hooks = {
nixfmt.enable = true;
};
};
});
devShells = forAllSystems (
system:
let
pkgs = import nixpkgs { inherit system; };
inherit (self.checks.${system}.pre-commit-check) shellHook enabledPackages;
in
{
default = pkgs.mkShell {
packages = with pkgs; [
ffmpeg
bun
gitlint
];
inherit shellHook;
buildInputs = enabledPackages;
};
}
);
};
}