nixify the project

This commit is contained in:
Chris Kruining 2025-09-18 09:25:20 +02:00
parent 33aaf78f7d
commit 35f95fcac1
No known key found for this signature in database
GPG key ID: EB894A3560CCCAD2
10 changed files with 5508 additions and 1 deletions

38
flake.nix Normal file
View file

@ -0,0 +1,38 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-unstable";
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
bun2nix = {
url = "github:baileyluTCD/bun2nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs@{ flake-parts, ... }: flake-parts.lib.mkFlake { inherit inputs; } {
systems = [
"x86_64-linux"
"aarch64-linux"
"aarch64-darwin"
"x86_64-darwin"
];
imports = [
./nix/devShells/flake-module.nix
./nix/packages/flake-module.nix
];
perSystem = { lib, self', ... }: {
checks =
let
packages = lib.mapAttrs' (n: lib.nameValuePair "package-${n}") self'.packages;
devShells = lib.mapAttrs' (n: lib.nameValuePair "devShell-${n}") self'.devShells;
in
packages // devShells;
};
};
}