move refresh_toolchain

This commit is contained in:
Alex 2022-10-18 12:15:31 +02:00
parent c050a59fd0
commit 7c0c229934
Signed by untrusted user: lx
GPG key ID: 0E496D15096376BE

View file

@ -15,20 +15,10 @@ let
in in
{ {
/* --- Rust Shell --- /* --- Rust Shell ---
* Use it to compile Garage * Use it to compile Garage
*/ */
rust = pkgs.mkShell { rust = pkgs.mkShell {
shellHook = ''
function refresh_toolchain {
nix copy \
--to 's3://nix?endpoint=garage.deuxfleurs.fr&region=garage&secret-key=/etc/nix/signing-key.sec' \
$(nix-store -qR \
$(nix-build --quiet --no-build-output --no-out-link nix/toolchain.nix))
}
'';
nativeBuildInputs = [ nativeBuildInputs = [
#pkgs.rustPlatform.rust.rustc #pkgs.rustPlatform.rust.rustc
pkgs.rustPlatform.rust.cargo pkgs.rustPlatform.rust.cargo
@ -67,6 +57,15 @@ function refresh_toolchain {
*/ */
release = pkgs.mkShell { release = pkgs.mkShell {
shellHook = '' shellHook = ''
function refresh_toolchain {
pass show deuxfleurs/nix_priv_key > /tmp/nix-signing-key.sec
nix copy \
--to 's3://nix?endpoint=garage.deuxfleurs.fr&region=garage&secret-key=/tmp/nix-signing-key.sec' \
$(nix-store -qR \
$(nix-build --no-build-output --no-out-link nix/toolchain.nix))
rm /tmp/nix-signing-key.sec
}
function to_s3 { function to_s3 {
aws \ aws \
--endpoint-url https://garage.deuxfleurs.fr \ --endpoint-url https://garage.deuxfleurs.fr \