···403403404404---
405405406406+## Bootstrapping
407407+408408+You can generate `flake.nix`, `inputs.nix`, `unflake.nix` or `npins` by using the following command:
409409+410410+```shell
411411+# create a bootstrap module. add any dependencies you want
412412+echo '{ flake-file.inputs.flake-file.url = "github:vic/flake-file"; }' > bootstrap.nix # filename is not important
413413+414414+# replace write-flake with: write-inputs / write-unflake / write-npins
415415+nix-shell https://github.com/vic/flake-file/archive/refs/heads/main.zip -A flake-file.sh --run write-flake --arg modules ./bootstrap.nix
416416+```
417417+418418+`bootstrap.nix` can also be a `./modules` directory that will be auto-imported using import-tree.
419419+406420## Development
407421408422Use `nix develop ./dev` or with direnv: `use flake ./dev`.
···1010Update the `npins/` directory from your declared inputs:
11111212```shell
1313-nix-shell . -A npins.env --run write-npins
1313+nix-shell . -A flake-file.sh --run write-npins
1414```
15151616This will run `npins add` for
+4-4
templates/unflake/README.md
···1111running unflake on it.
12121313```shell
1414-nix-shell . -A unflake.env --run write-unflake
1414+nix-shell . -A flake-file.sh --run write-unflake
1515```
16161717You can also pass any unflake option:
18181919```shell
2020-nix-shell . -A unflake.env --run 'write-unflake --verbose --backend nix'
2020+nix-shell . -A flake-file.sh --run 'write-unflake --verbose --backend nix'
2121```
22222323If you need to see the file that is being passed as `--inputs inputs.nix`
···25252626```shell
2727# (only recommended for debugging)
2828-nix-shell . -A unflake.env --run write-inputs
2828+nix-shell . -A flake-file.sh --run write-inputs
29293030# then, you can run unflake yourself:
3131nix-shell https://ln-s.sh/unflake -A unflake-shell --run unflake
···3636Unflake has an npins backend to use it run:
37373838```shell
3939-nix-shell . -A unflake.env --run 'write-unflake --backend npins'
3939+nix-shell . -A flake-file.sh --run 'write-unflake --backend npins'
4040```