ci: add explicit ci file

* Build a nixos configuration with all profiles available as part of ci
pipeline.
* Remove darwin packages as we do not have a ci agent for them.
* Build shell as part of ci
This commit is contained in:
Timothy DeHerrera 2021-01-24 11:14:42 -07:00
parent b3ec025f24
commit d6f50531b2
No known key found for this signature in database
GPG Key ID: 8985725DB5B0C122
2 changed files with 36 additions and 0 deletions

15
hosts/ci.nix Normal file
View File

@ -0,0 +1,15 @@
{
imports =
let
profiles = builtins.filter (n: n != ../profiles/core)
(import ../profiles/list.nix);
in
profiles ++ [ ../users/nixos ../users/root ];
security.mitigations.acceptRisk = true;
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
fileSystems."/" = { device = "/dev/disk/by-label/nixos"; };
}

21
nix/ci.nix Normal file
View File

@ -0,0 +1,21 @@
let
inherit (default.inputs.nixos.lib) recurseIntoAttrs;
default = (import ../compat).defaultNix;
packages = import ../default.nix;
shell = recurseIntoAttrs default.devShell.x86_64-linux;
ci = recurseIntoAttrs
default.nixosConfigurations.ci.config.system.build.toplevel;
in
{
inherit ci shell;
# platforms supported by our hercules-ci agent
inherit (packages)
i686-linux
x86_64-linux
aarch64-linux
;
}