update nix ssh cache
This commit is contained in:
parent
868496d2b9
commit
72e4e38fe9
4 changed files with 43 additions and 43 deletions
|
@ -34,21 +34,11 @@ let
|
|||
|
||||
${lib.optionalString (nixCacheSshPrivateKeyPath != null) ''
|
||||
NIX_CACHE_SSH_PRIVATE_KEY_PATH="${nixCacheSshPrivateKeyPath}"
|
||||
NIX_CACHE_SSH_PUBLIC_KEY="# nix-cache.wopus.dev:22 SSH-2.0-OpenSSH_10.0
|
||||
nix-cache.wopus.dev ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINU71N5QxdCmM7N25SnOg6u+YLmv92znpeDcyIDamldI"
|
||||
. ${./gitlab-runner/nix-cache-start}
|
||||
''}
|
||||
'';
|
||||
|
||||
pushStoreContents =
|
||||
{
|
||||
authenticationTokenConfigFile,
|
||||
nixCacheSshPrivateKeyPath ? null,
|
||||
...
|
||||
}:
|
||||
pkgs.writeScriptBin "push-to-cache" ''
|
||||
${lib.optionalString (nixCacheSshPrivateKeyPath != null) ''
|
||||
. ${./gitlab-runner/nix-cache-end}
|
||||
''}
|
||||
'';
|
||||
in
|
||||
rec {
|
||||
mkNixRunnerFull =
|
||||
|
@ -72,13 +62,13 @@ rec {
|
|||
"/tmp:/tmp"
|
||||
"/var/run/docker.sock:/var/run/docker.sock"
|
||||
"/var/lib/docker/containers:/var/lib/docker/containers"
|
||||
"/cache"
|
||||
]
|
||||
++ lib.optionals (nixCacheSshPrivateKeyPath != null) [
|
||||
"${nixCacheSshPrivateKeyPath}:${nixCacheSshPrivateKeyPath}"
|
||||
];
|
||||
dockerDisableCache = true;
|
||||
# dockerDisableCache = true;
|
||||
preBuildScript = "\". ${lib.getExe (installNixScript args)}\"";
|
||||
postBuildScript = "\". ${lib.getExe (pushStoreContents args)}\"";
|
||||
environmentVariables = {
|
||||
ENV = "/etc/profile";
|
||||
USER = "root";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue