From 8d519e163efe4fa9d54af6f0e25e73a9f906873c Mon Sep 17 00:00:00 2001 From: kat witch Date: Sat, 15 May 2021 01:49:27 +0100 Subject: [PATCH] ci: Moved away from shell based generation --- .github/workflows/hosts.yml | 2 +- shell.nix | 23 +---------------------- 2 files changed, 2 insertions(+), 23 deletions(-) diff --git a/.github/workflows/hosts.yml b/.github/workflows/hosts.yml index 9dcaf803..be4b658e 100644 --- a/.github/workflows/hosts.yml +++ b/.github/workflows/hosts.yml @@ -1,6 +1,6 @@ env: CI_ALLOW_ROOT: '1' - CI_CONFIG: ./ci.nix + CI_CONFIG: ./ci/hosts.nix CI_PLATFORM: gh-actions jobs: ci-check: diff --git a/shell.nix b/shell.nix index d484e8cb..d5d08669 100644 --- a/shell.nix +++ b/shell.nix @@ -1,30 +1,9 @@ { }: let config = import ./default.nix; tf = config.deploy.tf {}; - gh-actions-generate = config.pkgs.writeShellScriptBin "gh-actions-generate" '' - #!/usr/bin/env bash - export CI_ROOT=./; - export CI_CONFIG_ROOT=./ci; - CI_CONFIG_FILES=($CI_CONFIG_ROOT/hosts.nix) - for f in "''${CI_CONFIG_FILES[@]}"; do - nix run --arg config $f ci.run.gh-actions-generate - done - ''; - test-all = config.pkgs.writeShellScriptBin "test-all" '' - #!/usr/bin/env bash - export CI_ROOT=./; - export CI_CONFIG_ROOT=./ci; - CI_CONFIG_FILES=($CI_CONFIG_ROOT/hosts.nix) - for f in "''${CI_CONFIG_FILES[@]}"; do - nix run --arg config $f ci.test || break - done - ''; inherit (config) pkgs; in pkgs.mkShell { - nativeBuildInputs = [ - gh-actions-generate - test-all - ] ++ config.runners.lazy.nativeBuildInputs; + nativeBuildInputs = config.runners.lazy.nativeBuildInputs; HISTFILE = toString (tf.terraform.baseDir + "/.history"); CI_PLATFORM = "impure"; # use host's nixpkgs for more convenient testing