mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-09-11 14:35:30 +03:00
43 lines
920 B
Nix
43 lines
920 B
Nix
{
|
|
lib,
|
|
self,
|
|
...
|
|
}: let
|
|
l = lib // builtins;
|
|
in {
|
|
flake = {
|
|
templates =
|
|
{
|
|
default = self.templates.simple;
|
|
simple = {
|
|
description = "Simple dream2nix flake";
|
|
path = ./simple;
|
|
welcomeText = ''
|
|
You just created a simple dream2nix package!
|
|
|
|
start with typing `nix flake show` to discover the projects attributes.
|
|
|
|
commands:
|
|
|
|
- `nix develop` <-- enters the devShell
|
|
- `nix build .#` <-- builds the default package (`.#default`)
|
|
|
|
|
|
Start hacking and -_- have some fun!
|
|
|
|
> dont forget to add nix `result` folder to your `.gitignore`
|
|
|
|
'';
|
|
};
|
|
}
|
|
// (
|
|
l.genAttrs
|
|
(self.lib.dlib.listDirs ../examples)
|
|
(name: {
|
|
description = "Example: ${name} template";
|
|
path = ../examples/${name};
|
|
})
|
|
);
|
|
};
|
|
}
|