aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-11-16 23:47:10 +0100
committerAlex Auvolat <alex@adnab.me>2022-11-16 23:47:10 +0100
commit60c26fbc628d7b450ae39214b578ab6a30583d5c (patch)
tree07ea3feb3842f3816fbb01ae02162102b7da88d9
parente76dba9561128fb8eb26820214a3d103e7f5f9d1 (diff)
downloadgarage-nix-remove-system.tar.gz
garage-nix-remove-system.zip
Inject last modified date as git_version; flake cache uploadingnix-remove-system
-rw-r--r--flake.nix2
-rw-r--r--shell.nix14
2 files changed, 14 insertions, 2 deletions
diff --git a/flake.nix b/flake.nix
index b862e8e6..7d152195 100644
--- a/flake.nix
+++ b/flake.nix
@@ -9,7 +9,7 @@
};
outputs = { self, nixpkgs, cargo2nix }: let
- git_version = "v0.8.0-rc2";
+ git_version = self.lastModifiedDate;
compile = import ./nix/compile.nix;
forAllSystems = nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed;
in
diff --git a/shell.nix b/shell.nix
index 5cece8ad..10058fc4 100644
--- a/shell.nix
+++ b/shell.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&region=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&region=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 \