From 72f39dbc313b395437e892f722d270a50e9c995b Mon Sep 17 00:00:00 2001 From: Cole Mickens Date: Sat, 24 Oct 2020 21:37:56 -0700 Subject: [PATCH] cleanups --- README.md | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 7ca4dc6..3995c20 100644 --- a/README.md +++ b/README.md @@ -10,18 +10,21 @@ Nix is in flakes mode when: 1. `nixos-rebuild --flake '.#'` is used 2. `nix build '.#something'` the hash-tag syntax is used -**This automatically loads from a `flake.nix` in the specified dir.** +**This automatically loads from a `flake.nix` in the specified dir. See these examples:** -If the flake.nix were located elsewhere you could do this too: +These three examples, for me, are all the same source, but accessed in different ways: -* `nix build '/home/cole/code/nixos-flake-example#nixosConfigufations` +* `nix build '.#nixosConfigurations.mysystem'` - (loads from `/home/cole/code/nixos-flake-example'`) -* `nix build 'github.com:colemickens/nixos-flake-example#something'` + (loads `flake.nix` from `.` (current dir)) - (loads from `flake.nix` in the root of that repo checkout) +* `nix build '/home/cole/code/nixos-flake-example#nixosConfigurations.mysystem'` -Those are just examples of syntax. Again, + (loads `flake.nix` from `/home/cole/code/nixos-flake-example`) + +* `nix build 'github.com:colemickens/nixos-flake-example#nixosConfigurations.mysystem'` + + (nix will clone my github repo, then load `flake.nix` from `flake.nix` in the root of that repo checkout) ## more tips