feat: move to a flake-parts based flake where templates import flake modules from the root flake

This commit is contained in:
2026-04-26 00:44:51 -05:00
parent f3d81b82f0
commit b1a2a8d97b
3 changed files with 206 additions and 73 deletions
+21 -6
View File
@@ -1,12 +1,27 @@
{
description = "A collection of templates for various programming languages";
outputs = {self}: {
templates = {
rust = {
path = ./rust;
description = "A rust flake with crane and templates for command args and configs";
};
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
treefmt-nix = {
url = "github:numtide/treefmt-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
crane.url = "github:ipetkov/crane";
};
outputs = {flake-parts, ...} @ inputs:
flake-parts.lib.mkFlake {inherit inputs;} {
imports = [
./rust.nix
];
systems = ["aarch64-linux" "x86_64-linux" "aarch64-darwin" "x86_64-darwin"];
perSystem = {pkgs, ...}: {formatter = pkgs.alejandra;};
};
}