From 333ad15d07119d9a51de5cfedd6662834bdfcf75 Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Fri, 8 May 2020 17:48:34 +0100 Subject: [PATCH] gitlab-ci: try to set up --- .gitlab-ci.yml | 9 +++++++++ ci-root.nix | 3 +++ 2 files changed, 12 insertions(+) create mode 100644 .gitlab-ci.yml create mode 100644 ci-root.nix diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000..7c3ad003fc --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,9 @@ +nixCache: + image: "nixos/nix:latest" + script: + - "test -d cache || mkdir cache" + - "nix-build -f ./ci-root.nix --option extra-substituters \"s3://lukegb-nix-cache?endpoint=storage.googleapis.com file://$PWD/cache\"" + - "nix copy --to 'file://cache' -f ./ci-root.nix" + - "nix copy --to 's3://lukegb-nix-cache?endpoint=storage.googleapis.com' -f ./ci-root.nix" + cache: + key: one-key-to-rule-them-all diff --git a/ci-root.nix b/ci-root.nix new file mode 100644 index 0000000000..89a002fdab --- /dev/null +++ b/ci-root.nix @@ -0,0 +1,3 @@ +with (import ./default.nix {}); [ + ops.nixos +]