From 614f79f12b2dec8b4b0860b6add2216709c2e16f Mon Sep 17 00:00:00 2001
From: Daylin Morgan <me@dayl.in>
Date: Wed, 27 Nov 2024 11:22:16 -0600
Subject: [PATCH] start templating

---
 lib/default.nix             |  6 ++++++
 lib/templates/dev/flake.nix | 27 +++++++++++++++++++++++++++
 todo.md                     |  2 +-
 3 files changed, 34 insertions(+), 1 deletion(-)
 create mode 100644 lib/templates/dev/flake.nix

diff --git a/lib/default.nix b/lib/default.nix
index 786e892..87a1bdd 100644
--- a/lib/default.nix
+++ b/lib/default.nix
@@ -36,6 +36,12 @@ let
     );
 
   oizysFlake = {
+    templates = {
+      dev = {
+        path = ./templates/dev;
+        description = "a basic dev shell";
+      };
+    };
     nixosModules = listToAttrs (findModulesList ../modules);
     nixosConfigurations = mapAttrs (name: _: mkSystem name) (readDir ../hosts);
     packages = forAllSystems (
diff --git a/lib/templates/dev/flake.nix b/lib/templates/dev/flake.nix
new file mode 100644
index 0000000..f168a9d
--- /dev/null
+++ b/lib/templates/dev/flake.nix
@@ -0,0 +1,27 @@
+{
+  description = "";
+
+  inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
+
+  outputs =
+    { nixpkgs, ... }:
+    let
+      inherit (nixpkgs.lib) genAttrs;
+      systems = [
+        "x86_64-linux"
+        "x86_64-darwin"
+        "aarch64-linux"
+        "aarch64-darwin"
+      ];
+      forAllSystems = f: genAttrs systems (system: f (import nixpkgs { inherit system; }));
+    in
+    {
+      devShells = forAllSystems (pkgs: {
+        default = pkgs.mkShell {
+          packages = with pkgs; [
+            # insert packages here
+          ];
+        };
+      });
+    };
+}
diff --git a/todo.md b/todo.md
index ab79541..148894e 100644
--- a/todo.md
+++ b/todo.md
@@ -2,7 +2,7 @@
 
 ## oizys
 
-- [ ] write a flake template that includes the systems boilerplate
+- [x] write a flake template that includes the systems boilerplate
 
 ## software