From d6f50531b2497f0d153c5d6026f0fe45fe13ed7e Mon Sep 17 00:00:00 2001 From: Timothy DeHerrera Date: Sun, 24 Jan 2021 11:14:42 -0700 Subject: [PATCH] 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 --- hosts/ci.nix | 15 +++++++++++++++ nix/ci.nix | 21 +++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 hosts/ci.nix create mode 100644 nix/ci.nix diff --git a/hosts/ci.nix b/hosts/ci.nix new file mode 100644 index 0000000..4049d3b --- /dev/null +++ b/hosts/ci.nix @@ -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"; }; +} diff --git a/nix/ci.nix b/nix/ci.nix new file mode 100644 index 0000000..e12668d --- /dev/null +++ b/nix/ci.nix @@ -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 + ; +}