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