forked from fabian/nix_config
templates: add 'system-flake' template
This commit is contained in:
parent
4b8609385a
commit
3a3d73d5b6
15 changed files with 212 additions and 0 deletions
3
templates/system-flake/pkgs/lib/default.nix
Normal file
3
templates/system-flake/pkgs/lib/default.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{callPackage}: {
|
||||
fibonacci = callPackage ./fibonacci.nix {};
|
||||
}
|
7
templates/system-flake/pkgs/lib/fibonacci.nix
Normal file
7
templates/system-flake/pkgs/lib/fibonacci.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
let
|
||||
fib = n:
|
||||
if n > 1
|
||||
then fib (n - 1) + fib (n - 2)
|
||||
else 1;
|
||||
in
|
||||
fib
|
Loading…
Add table
Add a link
Reference in a new issue