forked from M-Labs/wfvm
README: add flakes section
This commit is contained in:
parent
6542c37863
commit
a3df68b61f
27
README.md
27
README.md
@ -52,3 +52,30 @@ Impure/pure mode
|
|||||||
Sometimes it can be useful to build the image _outside_ of the Nix sandbox for debugging purposes.
|
Sometimes it can be useful to build the image _outside_ of the Nix sandbox for debugging purposes.
|
||||||
|
|
||||||
For this purpose we have an attribute called `impureMode` which outputs the shell script used by Nix inside the sandbox to build the image.
|
For this purpose we have an attribute called `impureMode` which outputs the shell script used by Nix inside the sandbox to build the image.
|
||||||
|
|
||||||
|
|
||||||
|
Usage with Nix Flakes
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
Build the demo by running:
|
||||||
|
```shell
|
||||||
|
nix build .#demoImage
|
||||||
|
```
|
||||||
|
|
||||||
|
This project's **flake.nix** exposes its functions under `lib`. To use
|
||||||
|
in your own project, setup your flake like this:
|
||||||
|
|
||||||
|
```nix
|
||||||
|
{
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
wfvm.url = "git+https://git.m-labs.hk/m-labs/wfvm";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, nixpkgs, wfvm }: {
|
||||||
|
packages."x86_64-linux".flaky-os = wfvm.lib.makeWindowsImage {
|
||||||
|
# configuration parameters go here
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user