diff options
Diffstat (limited to 'shell.nix')
-rw-r--r-- | shell.nix | 16 |
1 files changed, 14 insertions, 2 deletions
@@ -1,5 +1,5 @@ { - system ? builtins.currentSystem, + system ? builtins.currentSystem, }: with import ./nix/common.nix; @@ -71,13 +71,25 @@ function refresh_cache { for attr in clippy.amd64 test.amd64 pkgs.{amd64,i386,arm,arm64}.{debug,release}; do echo "Updating cache for ''${attr}" derivation=$(nix-instantiate --attr ''${attr}) - nix copy \ + nix copy -j8 \ --to 's3://nix?endpoint=garage.deuxfleurs.fr®ion=garage&secret-key=/tmp/nix-signing-key.sec' \ $(nix-store -qR ''${derivation%\!bin}) done rm /tmp/nix-signing-key.sec } +function refresh_flake_cache { + pass show deuxfleurs/nix_priv_key > /tmp/nix-signing-key.sec + for attr in packages.x86_64-linux.default; do + echo "Updating cache for ''${attr}" + derivation=$(nix path-info --derivation ".#''${attr}") + nix copy -j8 \ + --to 's3://nix?endpoint=garage.deuxfleurs.fr®ion=garage&secret-key=/tmp/nix-signing-key.sec' \ + $(nix-store -qR ''${derivation}) + done + rm /tmp/nix-signing-key.sec +} + function to_s3 { aws \ --endpoint-url https://garage.deuxfleurs.fr \ |