ci-root: rework to using linkFarm derivation
This commit is contained in:
parent
5b96c181b2
commit
fc8e2e7419
2 changed files with 12 additions and 5 deletions
|
@ -5,8 +5,8 @@ nixCache:
|
|||
- "cp ${OPS_SECRETS_DEFAULT_NIX} ops/secrets/default.nix"
|
||||
- "test -d cache || mkdir cache"
|
||||
- "nix-build ./ci-root.nix --option substituters \"file://$PWD/cache?trusted=1 https://cache.nixos.org s3://lukegb-nix-cache?endpoint=storage.googleapis.com&trusted=1\""
|
||||
- "nix copy --to 'file://cache' -f ./ci-root.nix"
|
||||
- "nix copy --to 's3://lukegb-nix-cache?endpoint=storage.googleapis.com' -f ./ci-root.nix"
|
||||
- "nix copy --to 'file://cache' ./result"
|
||||
- "nix copy --to 's3://lukegb-nix-cache?endpoint=storage.googleapis.com' ./result"
|
||||
cache:
|
||||
key: one-key-to-rule-them-all
|
||||
paths:
|
||||
|
|
13
ci-root.nix
13
ci-root.nix
|
@ -1,3 +1,10 @@
|
|||
with (import ./default.nix {}); [
|
||||
ops.nixos
|
||||
]
|
||||
let
|
||||
depot = (import ./default.nix {});
|
||||
pkgs = depot.third_party.nixpkgs;
|
||||
lib = pkgs.lib;
|
||||
prefixAttrs = prefix: lib.mapAttrsToList (name: value: { name = "${prefix}-${name}"; path = value; });
|
||||
ciMachines = prefixAttrs "machine" depot.ops.nixos;
|
||||
ciPackages = prefixAttrs "pkg" depot.nix.pkgs;
|
||||
in
|
||||
pkgs.linkFarm "ci" ciMachines
|
||||
|
||||
|
|
Loading…
Reference in a new issue