-
-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #189 from lheckemann/flake
Flakify the system
- Loading branch information
Showing
5 changed files
with
138 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,17 @@ | ||
# How to build community builders | ||
|
||
Building: Make a `build.cfg` file and run `./build.sh`: | ||
# How to build community build box | ||
|
||
``` | ||
pxeUrlPrefix https://yourdomain.com/pxe-images | ||
pxeUrlSuffix netboot.ipxe | ||
packetKey your-packet-api-key | ||
packetDevice your-packet-device-id | ||
buildHost user@an-aarch64-capable-build-box | ||
imageName nixos-packet-aarch64-2018-01-03v1 | ||
pxeHost user@web-accessible-server | ||
pxeDir /path/to/web/root | ||
nix build .#hydraJobs.system | ||
``` | ||
|
||
The build will happen on `buildHost` then copied directly from buildHost | ||
to `pxeHost:pxeDir/imageName` (via netcat and openssl). | ||
If the destination directory already exists, it will be overwritten. | ||
You will need to be on an aarch64-linux machine or have an | ||
aarch64-linux builder configured. | ||
|
||
You can use | ||
[nix-netboot-serve](https://github.com/DeterminateSystems/nix-netboot-serve/) | ||
to provide netboot for the resulting configuration. | ||
|
||
(TODO: this isn't implemented yet) | ||
The production machine boots via the [build on hydra.nixos.org](TODO) | ||
using netboot.nixos.org, which is also running nix-netboot-serve. | ||
|
||
Update the PXE url and restart the server with `./restart.sh`. The PXE | ||
URL will be calculated by `pxeUrlPrefix/imageName/pxeUrlSuffix`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable-small"; | ||
inputs.ofborg.url = "github:nixos/ofborg"; | ||
outputs = { nixpkgs, self, ofborg }: { | ||
nixosConfigurations.aarch64-build-box = nixpkgs.lib.nixosSystem { | ||
system = "aarch64-linux"; | ||
modules = [ | ||
./configuration.nix | ||
{ ofborg.package = ofborg.packages.aarch64-linux.ofborg.rs; } | ||
]; | ||
}; | ||
hydraJobs.system = self.nixosConfigurations.aarch64-build-box.config.system.build.toplevel; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters