2022-11-20 09:03:09 +03:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
self,
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
l = lib // builtins;
|
|
|
|
in {
|
|
|
|
flake = {
|
|
|
|
templates =
|
|
|
|
{
|
|
|
|
default = self.templates.simple;
|
|
|
|
simple = {
|
|
|
|
description = "Simple dream2nix flake";
|
2022-11-25 06:02:43 +03:00
|
|
|
path = ./simple;
|
2022-11-20 09:03:09 +03:00
|
|
|
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};
|
|
|
|
})
|
|
|
|
);
|
|
|
|
};
|
|
|
|
}
|