Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

Unflake

This template is an example of using flake-file.inputs in a non-flakes project.

It uses unflake to pin and fetch inputs defined as options inside ./modules.

Generate unflake.nix

The following command is a convenience for generating unflake.nix by first producing a temporary inputs.nix from your config and then running unflake on it.

nix-shell . -A flake-file.sh --run write-unflake

You can also pass any unflake option:

nix-shell . -A flake-file.sh --run 'write-unflake --verbose --backend nix'

If you need to see the file that is being passed as --inputs inputs.nix to the unflake command, you can generate it with:

# (only recommended for debugging)
nix-shell . -A flake-file.sh --run write-inputs

# then, you can run unflake yourself:
nix-shell https://ln-s.sh/unflake -A unflake-shell --run unflake

Using with npins

Unflake has an npins backend to use it run:

nix-shell . -A flake-file.sh --run 'write-unflake --backend npins'