about summary refs log tree commit diff
path: root/tools/nixery/default.nix
AgeCommit message (Collapse)AuthorFilesLines
2019-11-27 refactor: Reshuffle file structure for better code layoutVincent Ambo1-7/+37
This gets rid of the package called "server" and instead moves everything into the project root, such that Go actually builds us a binary called `nixery`. This is the first step towards factoring out CLI-based functionality for Nixery.
2019-11-09 chore(build): Use significantly fewer layers for Nixery itselfVincent Ambo1-2/+4
Nixery itself is built with the buildLayeredImage system, which takes some time to create large numbers of layers. This adjusts the default number of image layers from 96 to 20. Additionally Nixery's image is often loaded with `docker load -i`, which ignores layer cache hits anyways. Additionaly the CI build is configured to use only 1, which speeds up CI runs.
2019-11-03 chore(build): Add nixery-popcount to top-level package setVincent Ambo1-0/+2
2019-10-28 refactor(build): Do not expose nixery-server attributeVincent Ambo1-5/+3
In most cases this is not useful for users without the wrapper script, so users should always build nixery-bin anyways.
2019-10-11 fix(build): Only take the first matching hash for source hashingVincent Ambo1-1/+1
Some Nix download mechanisms will add a second hash in the store path, which had been added to the source hash output (breaking argument interpolation).
2019-10-06 feat(server): Use hash of Nixery source as versionVincent Ambo1-1/+10
Uses a hash of Nixery's sources as the version displayed when Nixery launches or logs an error. This makes it possible to distinguish between errors logged from different versions. The source hashes should be reproducible between different checkouts of the same source tree.
2019-10-06 fix(server): Amend package path for Go tooling compatibilityVincent Ambo1-1/+1
With these changes it is possible to keep Nixery in $GOPATH and build the server in there, while still having things work correctly via Nix.
2019-10-03 chore(build-image): Remove nixery-build-layersVincent Ambo1-6/+3
This functionality has been rolled into the server component and is no longer required.
2019-10-03 fix(nix): Minor fixes to derivations for new build processVincent Ambo1-1/+2
2019-10-03 feat(nix): Add derivation to create layer tars from a store path setVincent Ambo1-2/+5
This introduces a new Nix derivation that, given an attribute set of layer hashes mapped to store paths, will create a layer tarball for each of the store paths. This is going to be used by the builder to create layers that are not present in the cache. Relates to #50.
2019-10-03 chore(build-image): Simplify wrapper build & remove layer groupingVincent Ambo1-8/+3
Simplifies the wrapper script used to invoke Nix builds from Nixery to just contain the essentials, since the layer grouping logic is moving into the server itself.
2019-09-22 refactor(build): Add group-layers to top-level Nix derivationsVincent Ambo1-5/+7
This makes CI build the group-layers tool (and cache it to Cachix!)
2019-09-21 fix(build): Ensure launch script compatibility with other runtimesVincent Ambo1-1/+2
Fixes two launch script compatibility issues with other container runtimes (such as gvisor): * don't fail if /tmp already exists * don't fail if the environment becomes unset
2019-09-21 fix(build): Ensure nixery-build-image is on Nixery's PATHVincent Ambo1-0/+1
This is useful when running Nixery locally.
2019-09-10 refactor(server): Move package source management logic to serverVincent Ambo1-1/+2
Introduces three new types representing each of the possible package sources and moves the logic for specifying the package source to the server. Concrete changes: * Determining whether a specified git reference is a commit vs. a branch/tag is now done in the server, and is done more precisely by using a regular expression. * Package sources now have a new `CacheKey` function which can be used to retrieve a key under which a build manifest can be cached *if* the package source is not a moving target (i.e. a full git commit hash of either nixpkgs or a private repository). This function is not yet used. * Users *must* now specify a package source, Nixery no longer defaults to anything and will fail to launch if no source is configured.
2019-08-21 chore(build): Add iana-etc to Nixery's own imageVincent Ambo1-0/+1
This package is used by a variety of programs that users may want to embed into Nixery in addition, for example cachix, but those packages don't refer to it explicitly.
2019-08-19 feat(build): Add 'extraPackages' parameterVincent Ambo1-2/+4
This makes it possible to inject additional programs (e.g. Cachix) into a Nixery container.
2019-08-17 fix(build): Ensure root user is known inside of containerVincent Ambo1-0/+4
This is required by git in cases where Nixery is configured with a custom git repository. I've also added a shell back into the image to make debugging a running Nixery easier. It turns out some of the dependencies already pull in bash anyways, so this is just surfacing it to $PATH.
2019-08-14 refactor(build-image): Extract package set loading into helperVincent Ambo1-1/+3
Some upcoming changes might require the Nix build to be split into multiple separate nix-build invocations of different expressions, thus splitting this out is useful. It also fixes an issue where `build-image/default.nix` might be called in an environment where no Nix channels are configured.
2019-08-14 style: Apply nixfmt to trivial Nix filesVincent Ambo1-5/+4
ALl the ones except for build-image.nix are considered trivial. On the latter, nixfmt makes some useful changes but by-and-large it is not ready for that code yet.
2019-08-14 feat(build-image): Introduce a terrifying hack to build group-layersVincent Ambo1-1/+1
The issue is described in detail in a comment in `build-image/default.nix`, please read it.
2019-08-14 refactor(server): Use wrapper script to avoid path dependencyVincent Ambo1-1/+3
Instead of requiring the server component to be made aware of the location of the Nix builder via environment variables, this commit introduces a wrapper script for the builder that can simply exist on the builders $PATH. This is one step towards a slightly nicer out-of-the-box experience when using `nix-build -A nixery-bin`.
2019-08-14 chore(docs): Move mdBook derivation to docs/default.nixVincent Ambo1-22/+1
2019-08-14 refactor: Move registry server to a subfolderVincent Ambo1-20/+2
2019-08-08 chore(nix): Increase maximum number of layers to 96Vincent Ambo1-1/+1
This uses a significantly larger percentage of the total available layers (125) than before, which means that cache hits for layers become more likely between images.
2019-08-05 feat(build): Build Nixery book and embed it into Nixery imageVincent Ambo1-8/+10
Executes the previously added mdBook on the previously added book source to yield a directory that can be served by Nixery on its index page. This is one of those 'I <3 Nix' things due to how easy it is to do.
2019-08-05 feat(build): Add mdBook 0.3.1 to build environmentVincent Ambo1-0/+18
Upstream nixpkgs currently only has an older versin of mdBook. Until that changes, we keep a different version in here.
2019-08-04 feat(build): Support additional pre-launch commands in imageVincent Ambo1-1/+4
This makes it possible for users to hook basically arbitrary things into the Nixery container image.
2019-08-02 docs: Update all nixery.appspot.com references to nixery.devVincent Ambo1-2/+2
Shiny, new domain is much better and eliminates the TLS redirect issue because there is a HSTS preload for the entire .dev TLD (which, by the way, is awesome!)
2019-08-02 fix(build): coreutils are still required by launch scriptVincent Ambo1-0/+1
Mea culpa!
2019-07-31 feat(build): Add dependencies for custom repo clonesVincent Ambo1-4/+4
Adds git & SSH as part of the Nixery image, which are required to use Nix's builtins.fetchGit. The dependency on interactive tools is dropped, as it was only required during development when debugging the image building process itself.
2019-07-26 fix(build): Specify default command for Nixery's own imageVincent Ambo1-0/+1
When running on AppEngine, the image is expected to be configured with a default entry point / command. This sets the command to the wrapper script, so that the image can actually run properly when deployed.
2019-07-24 feat(build): Configure Nixery image builder to set up env correctlyVincent Ambo1-3/+27
When running Nix inside of a container image, there are several environment-specific details that need to be configured appropriately. Most importantly, since one of the recent Nix 2.x releases, sandboxing during builds is enabled by default. This, however, requires kernel privileges which commonly aren't available to containers. Nixery's demo instance (for instance, hehe) is deployed on AppEngine where this type of container configuration is difficult, hence this change. Specifically the following were changed: * additional tools (such as tar/gzip) were introduced into the image because the builtins-toolset in Nix does not reference these tools via their store paths, which leads to them not being included automatically * Nix sandboxing was disabled in the container image * the users/groups required by Nix were added to the container setup. Note that these are being configured manually instead of via the tools from the 'shadow'-package, because the latter requires some user information (such as root) to be present already, which is not the case inside of the container
2019-07-23 chore: Add license scaffolding & contribution guidelinesVincent Ambo1-0/+13
2019-07-23 feat(build): Add wrapper script & container image setupVincent Ambo1-1/+26
Introduces a wrapper script which automatically sets the paths to the required runtime data dependencies. Additionally configures a container image derivation which will output a derivation with Nixery, Nix and other dependencies.
2019-07-23 feat(build): Introduce build configuration using NixVincent Ambo1-0/+43
Rather than migrating to Bazel, it seems more appropriate to use Nix for this project. The project is split into several different components (for data dependencies and binaries). A derivation for building an image for Nixery itself will be added.