another tip

This commit is contained in:
Cole Mickens 2020-10-24 21:35:21 -07:00
parent 08748a4850
commit 7f5a847ae4
No known key found for this signature in database
GPG key ID: B475C2955744A019

View file

@ -14,12 +14,21 @@ Nix is in flakes mode when:
If the flake.nix were located elsewhere you could do this too:
* `nix build '/home/cole/code/nixos-flake-example#something` (loads from `/home/cole/code/nixos-flake-example`)
* `nix build 'github.com:colemickens/nixos-flake-example#something` (loads from `flake.nix` in the root of that repo checkout)
* `nix build '/home/cole/code/nixos-flake-example#nixosConfigufations`
(loads from `/home/cole/code/nixos-flake-example'`)
* `nix build 'github.com:colemickens/nixos-flake-example#something'`
(loads from `flake.nix` in the root of that repo checkout)
Those are just examples of syntax. Again,
## more tips
1. `nixos-rebuild build --flake '.#'` will automatically try to find and build the attribute: `.#nixosConfigurations.your_hostname` (assuming your machines hostname is `your_hostname`)
## overview
Note that these produce the same output: