diff --git a/flake.nix b/flake.nix index bc873dae..45056cef 100644 --- a/flake.nix +++ b/flake.nix @@ -347,6 +347,10 @@ path = ./templates/basic-devshell; description = "Basic development shell template"; }; + basic-overlay-flake = { + path = ./templates/basic-overlay-flake; + description = "Basic overlay as a flake"; + }; }; # No amount of formatters will make this codebase nicer but it sure does diff --git a/templates/basic-overlay-flake/flake.nix b/templates/basic-overlay-flake/flake.nix new file mode 100644 index 00000000..7258f53d --- /dev/null +++ b/templates/basic-overlay-flake/flake.nix @@ -0,0 +1,17 @@ +{ + description = '' + Basic flake template for an overlay with flake and traditional channels. + ''; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = inputs@{ self, nixpkgs, ... }: + let systems = inputs.flake-utils.lib.defaultSystems; + in inputs.flake-utils.lib.eachSystem systems (system: { + devShells.default = + import ./shell.nix { pkgs = import nixpkgs { inherit system; }; }; + }); +} diff --git a/templates/basic-overlay-flake/modules/README.adoc b/templates/basic-overlay-flake/modules/README.adoc new file mode 100644 index 00000000..54621c5f --- /dev/null +++ b/templates/basic-overlay-flake/modules/README.adoc @@ -0,0 +1,5 @@ += Modules +:toc: + +This is where various modules will go. +Preferably, it should have a hierarchy that denotes where it belongs to (e.g., `./modules/nixos/MODULE.nix`, `./modules/home-manager/MODULE2.nix`). diff --git a/templates/basic-overlay-flake/pkgs/default.nix b/templates/basic-overlay-flake/pkgs/default.nix new file mode 100644 index 00000000..4b91fef9 --- /dev/null +++ b/templates/basic-overlay-flake/pkgs/default.nix @@ -0,0 +1,4 @@ +{ pkgs ? import { } }: + +# Import the packages in a centralized file to make it easier for integrating. +{ } diff --git a/templates/basic-overlay-flake/shell.nix b/templates/basic-overlay-flake/shell.nix new file mode 100644 index 00000000..eb0d07c6 --- /dev/null +++ b/templates/basic-overlay-flake/shell.nix @@ -0,0 +1,5 @@ +{ pkgs ? import { } }: + +with pkgs; + +mkShell { packages = [ ]; }