Skip to content

Commit b079fd8

Browse files
authored
add cachix to flake and update buildSet (#282)
* feat: add cachix to flake and push builds to cache * fix: run nix fmt * fix: remove cache workflow
1 parent 256f3d0 commit b079fd8

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

flake.nix

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
{
22
description = "Kernels";
33

4+
nixConfig = {
5+
extra-substituters = [ "https://huggingface.cachix.org" ];
6+
extra-trusted-public-keys = [
7+
"huggingface.cachix.org-1:ynTPbLS0W8ofXd9fDjk1KvoFky9K2jhxe6r4nXAkc/o="
8+
];
9+
};
10+
411
inputs = {
512
flake-utils.url = "github:numtide/flake-utils";
613
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable-small";
@@ -121,7 +128,8 @@
121128

122129
buildSets = defaultBuildSetsPerSystem.${system};
123130
buildSetsByBackend = (partitionBuildSetsBySystemBackend defaultBuildSets).${system};
124-
buildSet = builtins.head buildSetsByBackend.cuda;
131+
defaultBackend = if system == "aarch64-darwin" then "metal" else "cuda";
132+
buildSet = builtins.head buildSetsByBackend.${defaultBackend};
125133

126134
# Dev shells per framework.
127135
devShellByBackend = lib.mapAttrs (

0 commit comments

Comments
 (0)