From c47d8972ad29f80472e9778e6db76838dd8c0cd3 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 13 Jul 2018 13:52:22 +0200 Subject: [PATCH] move disko.nix to example/ and add usage --- example.nix => example/config.nix | 2 +- disko.nix => example/default.nix | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) rename example.nix => example/config.nix (94%) rename disko.nix => example/default.nix (93%) diff --git a/example.nix b/example/config.nix similarity index 94% rename from example.nix rename to example/config.nix index 38830b6..e9766fe 100644 --- a/example.nix +++ b/example/config.nix @@ -1,4 +1,4 @@ -# nix-instantiate --strict --json --eval format.nix | jq +# usage: nix-instantiate --eval --json --strict example/config.nix | jq . { type = "table"; format = "gpt"; diff --git a/disko.nix b/example/default.nix similarity index 93% rename from disko.nix rename to example/default.nix index 2e6805a..69ef936 100644 --- a/disko.nix +++ b/example/default.nix @@ -1,3 +1,5 @@ +# usage: nix-instantiate --eval --json --strict example | jq -r . + with import ; with builtins; @@ -47,6 +49,6 @@ let f = q: x: fun.${x.type} q x; q0.device = "/dev/sda"; - x0 = import ./example.nix; + x0 = import ./config.nix; in f q0 x0