Add basic template with usage

This commit is contained in:
Tim Van Baak 2022-12-12 13:18:53 -08:00
parent 45969c6d5d
commit 2b2cd07a6d
2 changed files with 28 additions and 0 deletions

View File

@ -26,5 +26,13 @@
systems: a list of systems to produce flake outputs for.
*/
outputs-for = system-outputs: systems: foldl' recursiveUpdate {} (map system-outputs systems);
templates = {
basic = {
path = ./templates/basic;
description = "A basic flake config using my-flake.";
};
default = self.templates.basic;
};
};
}

20
templates/basic/flake.nix Normal file
View File

@ -0,0 +1,20 @@
{
inputs = {
my-flake.url = "github:Jaculabilis/my-flake";
nixpkgs.url = "github:NixOS/nixpkgs";
};
outputs = { self, my-flake, nixpkgs }:
let
systems = [ "aarch64-linux" "x86_64-linux" ];
each = system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
#packages.${system}.default = ...;
#devShells.${system}.default = ...;
};
in my-flake.outputs-for each systems;
}