mirror of
https://github.com/nix-community/nixos-anywhere.git
synced 2024-09-11 08:35:24 +03:00
Merge pull request #107 from numtide/developer-guide
Move and improve developer guide
This commit is contained in:
commit
fae3915b12
23
CONTRIBUTING.md
Normal file
23
CONTRIBUTING.md
Normal file
@ -0,0 +1,23 @@
|
||||
To run `nixos-anywhere` from the repo:
|
||||
|
||||
```console
|
||||
nix run . -- --help
|
||||
```
|
||||
|
||||
To format the code:
|
||||
|
||||
```console
|
||||
nix fmt
|
||||
```
|
||||
|
||||
To run all tests:
|
||||
|
||||
```console
|
||||
nix flake check -vL
|
||||
```
|
||||
|
||||
To run an individual test:
|
||||
|
||||
```
|
||||
nix build .#checks.x86_64-linux.from-nixos -vL
|
||||
```
|
@ -187,12 +187,12 @@ Once you’ve created the disk configuration and the flake, you can run the tool
|
||||
with a single nix command, which may look like this:
|
||||
|
||||
```
|
||||
nix run github:numtide/nixos-anywhere -- --flake github:JillThornhill/flakes-example#hetzner-cloud root@135.181.254.201
|
||||
nix run github:numtide/nixos-anywhere -- --flake .#hetzner-cloud root@135.181.254.201
|
||||
```
|
||||
|
||||
Note that this command references the URL of your flake, in this case
|
||||
github:JillThornhill/flakes-example, together with the name of the system
|
||||
#hetzner-cloud, as highlighted by the comment in the sample flake.
|
||||
Note that this command references the URL of your flake, in this case `.#`,
|
||||
together with the name of the system `hetzner-cloud`, as highlighted by the
|
||||
comment in the sample flake.
|
||||
|
||||
The [Quickstart Guide](./docs/quickstart.md) gives more information on how to
|
||||
run **nixos-anywhere** in its simplest form. For more specific instructions to
|
||||
|
@ -49,20 +49,6 @@ Options:
|
||||
build the closure on the remote machine instead of locally and copy-closuring it
|
||||
```
|
||||
|
||||
## Developer guide
|
||||
|
||||
To run `nixos-anywhere` from the repo:
|
||||
|
||||
```shell
|
||||
nix run . -- --help
|
||||
```
|
||||
|
||||
To format the code
|
||||
|
||||
```shell
|
||||
nix fmt
|
||||
```
|
||||
|
||||
## Explanation of known error messages
|
||||
|
||||
TODO: List actual error messages and meanings. Include:
|
||||
|
@ -2,9 +2,9 @@ test:
|
||||
{ pkgs ? import <nixpkgs> { }
|
||||
, nixos-anywhere ? pkgs.callPackage ../../src { }
|
||||
, disko ? "${builtins.fetchTarball "https://github.com/nix-community/disko/archive/master.tar.gz"}/module.nix"
|
||||
, kexec-installer ? builtins.fetchurl "https://github.com/nix-community/nixos-images/releases/download/nixos-unstable/nixos-kexec-installer-${pkgs.stdenv.hostPlatform.system}.tar.gz"
|
||||
, 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"
|
||||
, ...
|
||||
}@args:
|
||||
}:
|
||||
let
|
||||
inherit (pkgs) lib;
|
||||
nixos-lib = import (pkgs.path + "/nixos/lib") { };
|
||||
|
Loading…
Reference in New Issue
Block a user