Add a post-build hook pushing to the nix-community Cachix
This commit is contained in:
parent
43e72bf2e5
commit
85e1d29b94
3 changed files with 24 additions and 0 deletions
16
build01/cache.nix
Normal file
16
build01/cache.nix
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
|
postBuildHook = pkgs.writeScript "post-build-hook.sh" ''
|
||||||
|
#!${pkgs.runtimeShell}
|
||||||
|
exec ${pkgs.cachix}/bin/cachix -c /var/lib/post-build-hook/nix-community-cachix.dhall push nix-community $OUT_PATHS
|
||||||
|
'';
|
||||||
|
|
||||||
|
in {
|
||||||
|
|
||||||
|
nix.extraOptions = ''
|
||||||
|
post-build-hook = ${postBuildHook}
|
||||||
|
'';
|
||||||
|
|
||||||
|
}
|
|
@ -11,6 +11,7 @@ in
|
||||||
./buildkite.nix
|
./buildkite.nix
|
||||||
./gitlab.nix
|
./gitlab.nix
|
||||||
./hydra.nix
|
./hydra.nix
|
||||||
|
./cache.nix
|
||||||
./nixpkgs-update.nix
|
./nixpkgs-update.nix
|
||||||
|
|
||||||
../profiles/common.nix
|
../profiles/common.nix
|
||||||
|
|
|
@ -72,6 +72,13 @@ in
|
||||||
permissions = "0600";
|
permissions = "0600";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
deployment.keys."nix-community-cachix.dhall" = {
|
||||||
|
text = secrets."nix-community-cachix.dhall";
|
||||||
|
destDir = "/var/lib/post-build-hook";
|
||||||
|
user = "root";
|
||||||
|
permissions = "0400";
|
||||||
|
};
|
||||||
|
|
||||||
deployment.keys.github-nixpkgs-swh-key = {
|
deployment.keys.github-nixpkgs-swh-key = {
|
||||||
text = secrets.github-nixpkgs-swh-key;
|
text = secrets.github-nixpkgs-swh-key;
|
||||||
user = "buildkite-agent";
|
user = "buildkite-agent";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue