aboutsummaryrefslogtreecommitdiff
path: root/shell.nix
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-10-18 12:15:31 +0200
committerAlex Auvolat <alex@adnab.me>2022-10-18 12:15:31 +0200
commit7c0c2299349d81bdffe38f901770d501c5ad625f (patch)
tree946eb18e60fef5971f33428a6e7c180ce7457b37 /shell.nix
parentc050a59fd0fd23ec3d8cf0542509812a92cc492f (diff)
downloadgarage-7c0c2299349d81bdffe38f901770d501c5ad625f.tar.gz
garage-7c0c2299349d81bdffe38f901770d501c5ad625f.zip
move refresh_toolchain
Diffstat (limited to 'shell.nix')
-rw-r--r--shell.nix19
1 files changed, 9 insertions, 10 deletions
diff --git a/shell.nix b/shell.nix
index e82bce78..36a290a9 100644
--- a/shell.nix
+++ b/shell.nix
@@ -15,20 +15,10 @@ let
in
{
-
/* --- Rust Shell ---
* Use it to compile Garage
*/
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 = [
#pkgs.rustPlatform.rust.rustc
pkgs.rustPlatform.rust.cargo
@@ -67,6 +57,15 @@ function refresh_toolchain {
*/
release = pkgs.mkShell {
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 {
aws \
--endpoint-url https://garage.deuxfleurs.fr \