Skip to content

Commit fae3915

Browse files
authored
Merge pull request #107 from numtide/developer-guide
Move and improve developer guide
2 parents a278faa + ba0c21a commit fae3915

File tree

4 files changed

+29
-20
lines changed

4 files changed

+29
-20
lines changed

CONTRIBUTING.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
To run `nixos-anywhere` from the repo:
2+
3+
```console
4+
nix run . -- --help
5+
```
6+
7+
To format the code:
8+
9+
```console
10+
nix fmt
11+
```
12+
13+
To run all tests:
14+
15+
```console
16+
nix flake check -vL
17+
```
18+
19+
To run an individual test:
20+
21+
```
22+
nix build .#checks.x86_64-linux.from-nixos -vL
23+
```

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,12 +187,12 @@ Once you’ve created the disk configuration and the flake, you can run the tool
187187
with a single nix command, which may look like this:
188188

189189
```
190-
nix run github:numtide/nixos-anywhere -- --flake github:JillThornhill/flakes-example#hetzner-cloud root@135.181.254.201
190+
nix run github:numtide/nixos-anywhere -- --flake .#hetzner-cloud root@135.181.254.201
191191
```
192192

193-
Note that this command references the URL of your flake, in this case
194-
github:JillThornhill/flakes-example, together with the name of the system
195-
#hetzner-cloud, as highlighted by the comment in the sample flake.
193+
Note that this command references the URL of your flake, in this case `.#`,
194+
together with the name of the system `hetzner-cloud`, as highlighted by the
195+
comment in the sample flake.
196196

197197
The [Quickstart Guide](./docs/quickstart.md) gives more information on how to
198198
run **nixos-anywhere** in its simplest form. For more specific instructions to

docs/reference.md

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -49,20 +49,6 @@ Options:
4949
build the closure on the remote machine instead of locally and copy-closuring it
5050
```
5151

52-
## Developer guide
53-
54-
To run `nixos-anywhere` from the repo:
55-
56-
```shell
57-
nix run . -- --help
58-
```
59-
60-
To format the code
61-
62-
```shell
63-
nix fmt
64-
```
65-
6652
## Explanation of known error messages
6753

6854
TODO: List actual error messages and meanings. Include:

tests/lib/test-base.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ test:
22
{ pkgs ? import <nixpkgs> { }
33
, nixos-anywhere ? pkgs.callPackage ../../src { }
44
, disko ? "${builtins.fetchTarball "https://github.com/nix-community/disko/archive/master.tar.gz"}/module.nix"
5-
, kexec-installer ? builtins.fetchurl "https://github.com/nix-community/nixos-images/releases/download/nixos-unstable/nixos-kexec-installer-${pkgs.stdenv.hostPlatform.system}.tar.gz"
5+
, kexec-installer ? builtins.fetchurl "https://github.com/nix-community/nixos-images/releases/download/nixos-unstable/nixos-kexec-installer-noninteractive-${pkgs.stdenv.hostPlatform.system}.tar.gz"
66
, ...
7-
}@args:
7+
}:
88
let
99
inherit (pkgs) lib;
1010
nixos-lib = import (pkgs.path + "/nixos/lib") { };

0 commit comments

Comments
 (0)