mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-12-24 15:01:56 +03:00
add all examples as templates
This commit is contained in:
parent
4b9b9f17e9
commit
3b2ac250c6
36
flake.nix
36
flake.nix
@ -399,27 +399,33 @@
|
|||||||
'';
|
'';
|
||||||
});
|
});
|
||||||
|
|
||||||
templates = {
|
templates =
|
||||||
simple = {
|
{
|
||||||
description = "Simple dream2nix flake";
|
default = self.templates.simple;
|
||||||
path = ./templates/simple;
|
simple = {
|
||||||
welcomeText = ''
|
description = "Simple dream2nix flake";
|
||||||
You just created a simple dream2nix package!
|
path = ./templates/simple;
|
||||||
|
welcomeText = ''
|
||||||
|
You just created a simple dream2nix package!
|
||||||
|
|
||||||
start with typing `nix flake show` to discover the projects attributes.
|
start with typing `nix flake show` to discover the projects attributes.
|
||||||
|
|
||||||
commands:
|
commands:
|
||||||
|
|
||||||
- `nix develop` <-- enters the devShell
|
- `nix develop` <-- enters the devShell
|
||||||
- `nix build .#` <-- builds the default package (`.#default`)
|
- `nix build .#` <-- builds the default package (`.#default`)
|
||||||
|
|
||||||
|
|
||||||
Start hacking and -_- have some fun!
|
Start hacking and -_- have some fun!
|
||||||
|
|
||||||
> dont forget to add nix `result` folder to your `.gitignore`
|
> dont forget to add nix `result` folder to your `.gitignore`
|
||||||
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
// (b.mapAttrs (name: value: {
|
||||||
|
description = "Example: ${name} template";
|
||||||
|
path = ./examples/${name};
|
||||||
|
}) (l.filterAttrs (n: v: v == "directory") (b.readDir ./examples)));
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user