diff --git a/flake.nix b/flake.nix index 8136b7b..1a71d6b 100644 --- a/flake.nix +++ b/flake.nix @@ -5,8 +5,9 @@ { inputs.nixpkgs.url = "nixpkgs/nixos-unstable"; outputs = inputs: - let - flakelight = import ./. inputs; - in - flakelight ./. { outputs = flakelight; }; + let flakelight = import ./. inputs; in + flakelight ./. { + outputs = flakelight; + templates = import ./templates; + }; } diff --git a/templates/basic/.envrc b/templates/basic/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/templates/basic/.envrc @@ -0,0 +1 @@ +use flake diff --git a/templates/basic/flake.nix b/templates/basic/flake.nix new file mode 100644 index 0000000..a241a72 --- /dev/null +++ b/templates/basic/flake.nix @@ -0,0 +1,11 @@ +{ + inputs = { + nixpkgs.url = "nixpkgs/nixos-unstable"; + flakelight.url = "github:accelbread/flakelight"; + }; + outputs = { flakelight, ... }@inputs: + flakelight ./. { + inherit inputs; + devShell.packages = pkgs: with pkgs; [ hello ]; + }; +} diff --git a/templates/default.nix b/templates/default.nix new file mode 100644 index 0000000..72bd33e --- /dev/null +++ b/templates/default.nix @@ -0,0 +1,8 @@ +# flakelight -- Framework for simplifying flake setup +# Copyright (C) 2023 Archit Gupta +# SPDX-License-Identifier: MIT + +rec { + default = basic; + basic = { path = ./basic; description = "Minimal Flakelight flake."; }; +}