diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-06-04 20:02:50 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2020-06-04 20:22:25 +0200 |
commit | 810b2c6a48b5ecd468bd4f65963ce5a7aa96832e (patch) | |
tree | 6d0cf088c2b5ef713ef00d81da9413eb23916569 /src/nix/search.cc | |
parent | dc305500c38c5e2227bea696949970c562046a8f (diff) |
nix flake init: Add a '--template' flag
The initial contents of the flake is specified by the
'templates.<name>' or 'defaultTemplate' output of another flake. E.g.
outputs = { self }: {
templates = {
nixos-container = {
path = ./nixos-container;
description = "An example of a NixOS container";
};
};
};
allows
$ nix flake init -t templates#nixos-container
Also add a command 'nix flake new', which is identical to 'nix flake
init' except that it initializes a specified directory rather than the
current directory.
Diffstat (limited to 'src/nix/search.cc')
-rw-r--r-- | src/nix/search.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nix/search.cc b/src/nix/search.cc index bbac56fcb..65a1e1818 100644 --- a/src/nix/search.cc +++ b/src/nix/search.cc @@ -177,7 +177,7 @@ struct CmdSearch : InstallableCommand, MixJSON } }; - for (auto & [cursor, prefix] : installable->getCursor(*state, true)) + for (auto & [cursor, prefix] : installable->getCursors(*state, true)) visit(*cursor, parseAttrPath(*state, prefix)); if (!json && !results) |