mirror of
https://github.com/daylinmorgan/oizys.git
synced 2025-02-22 19:25:50 -06:00
more examples
This commit is contained in:
parent
8ade367d84
commit
a023634d9b
1 changed files with 53 additions and 22 deletions
35
README.md
35
README.md
|
@ -47,7 +47,39 @@ These three examples, for me, are all the same source, but accessed in different
|
|||
|
||||
## overview
|
||||
|
||||
The `./check.sh` script proves they give the same exact system toplevel outputs:
|
||||
Let's prove that we can build the same config with and without flakes:
|
||||
|
||||
* Using `nixos-rebuild`:
|
||||
```
|
||||
# with flakes
|
||||
unset NIX_PATH
|
||||
nixos-rebuild build --flake .#mysystem
|
||||
readlink -f ./result
|
||||
/nix/store/gg1jhmzqndqa0rfnwfdbnzrn8f74ckr6-nixos-system-mysystem-21.03pre-git
|
||||
|
||||
# without flakes
|
||||
export NIX_PATH=nixpkgs=https://github.com/nixos/nixpkgs/archive/007126eef72271480cb7670e19e501a1ad2c1ff2.tar.gz:nixos-config=/home/cole/code/nixos-flake-example/configuration.nix
|
||||
nixos-rebuild build
|
||||
readlink -f ./result
|
||||
/nix/store/gg1jhmzqndqa0rfnwfdbnzrn8f74ckr6-nixos-system-mysystem-21.03pre-git
|
||||
```
|
||||
|
||||
* Using `nix build`:
|
||||
```
|
||||
# with flakes
|
||||
unset NIX_PATH
|
||||
nix build '.#nixosConfigurations.mysystem.config.system.build.toplevel
|
||||
readlink -f ./result
|
||||
/nix/store/gg1jhmzqndqa0rfnwfdbnzrn8f74ckr6-nixos-system-mysystem-21.03pre-git
|
||||
|
||||
# without flakes
|
||||
export NIX_PATH=nixpkgs=https://github.com/nixos/nixpkgs/archive/007126eef72271480cb7670e19e501a1ad2c1ff2.tar.gz:nixos-config=/home/cole/code/nixos-flake-example/configuration.nix
|
||||
nix-build '<nixos/nixpkgs>' -A config.system.build.toplevel
|
||||
readlink -f ./result
|
||||
/nix/store/gg1jhmzqndqa0rfnwfdbnzrn8f74ckr6-nixos-system-mysystem-21.03pre-git
|
||||
```
|
||||
|
||||
* The `./check.sh` script automates this process:
|
||||
|
||||
```console
|
||||
cole@slynux ~/code/nixos-flake-example master* 7s
|
||||
|
@ -74,6 +106,5 @@ warning: Git tree '/home/cole/code/nixos-flake-example' is dirty
|
|||
|
||||
flake: /nix/store/gg1jhmzqndqa0rfnwfdbnzrn8f74ckr6-nixos-system-mysystem-21.03pre-git
|
||||
clssc: /nix/store/gg1jhmzqndqa0rfnwfdbnzrn8f74ckr6-nixos-system-mysystem-21.03pre-git
|
||||
|
||||
```
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue