docs: update and add README for shells and templates

This commit is contained in:
Gabriel Arazas 2022-09-25 15:26:09 +08:00
parent c130459288
commit 0efc2a145b
3 changed files with 30 additions and 1 deletions

View File

@ -84,7 +84,6 @@ You can see the full details with `nix flake show`.
As a helpful summary, here's what my flake should contain sorting from the most interesting and helpful outputs to the most boring and unnecessary.
* `packages` contains link:./pkgs[my custom packages].
It supports the default list of systems as defined from link:https://github.com/numtide/flake-utils[`flake-utils`].
* `overlays` contains the overlay for extending nixpkgs with my packages.
If you want to use my packages alongside the nixpkgs attribute then this is what you're looking for.

16
shells/README.adoc Normal file
View File

@ -0,0 +1,16 @@
= Development shells
:toc:
My development shells for usual type of projects to quickly spawn one when spelunking other peoples' projects.
This can be easily spawned from the `devShells` attribute from the flake output (i.e., `nix develop $FLAKE#$DEVENV`).
CAUTION: This is not supposed to be a list of development environment encompassing all type of projects but rather it is just for quickly spawning one for spelunking.
This is a personal preference to creating a specific link:../modules/nixos/profiles/[NixOS]/link:../modules/home-manager/profiles/[home-manager] profile module for setting up those type of environments considering that...
* You don't need a profile to spawn the environment with `devShells`.
By setting it as a profile to either NixOS or home-manager (or any other similar profiles), you're basically locking yourself in that environment.
* It is cleaner. :)
* Creating project-specific development environments is a thing.

14
templates/README.adoc Normal file
View File

@ -0,0 +1,14 @@
= Templates
:toc:
These are my templates similarly structured to link:https://github.com/NixOS/templates[official Nix templates].
The templates will then be exported as part of `templates` attribute to the flake output.
You can then use it for whatever you want to start with.
[source, shell]
----
nix flake init $FLAKE#$TEMPLATE
----
While the folder structure can be a free-for-all, it is much more preferable to have a top-level list of directories with each containing one template.