yeet cachix

This commit is contained in:
2025-11-07 11:36:23 +01:00
parent ab15e4b146
commit 1657e95a5d
7 changed files with 53 additions and 63 deletions

View File

@@ -117,16 +117,19 @@
};
nixConfig.extra-substituters = [
"https://nix-community.cachix.org?priority=1" # less is more /shrug
"https://numtide.cachix.org" # dead? https://github.com/numtide/nixpkgs-unfree/commit/399ae17bda97a0318a0c5316edb169d097a776dc
"https://cache.flox.dev" # https://flox.dev/blog/flox-the-nix-foundation-and-nvidia-partner-for-cuda/
];
nixConfig.extra-trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"numtide.cachix.org-1:2ps1kLBUWjxIneOy1Ik6cQjb41X0iXVXeHigGmycPPE="
"flox-cache-public-1:7F4OyH7ZCnFhcze3fJdfyXYLQw/aV7GEed86nQ7IsOs="
];
nixConfig = {
# matches ./profiles/base/binary-caches.nix
extra-substituters = [
"https://nix-community.cachix.org/"
# "https://numtide.cachix.org/" # dead? https://github.com/numtide/nixpkgs-unfree/commit/399ae17bda97a0318a0c5316edb169d097a776dc
"https://cache.flox.dev/?priority=45" # https://flox.dev/blog/flox-the-nix-foundation-and-nvidia-partner-for-cuda/
];
extra-trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
# "numtide.cachix.org-1:2ps1kLBUWjxIneOy1Ik6cQjb41X0iXVXeHigGmycPPE="
"flox-cache-public-1:7F4OyH7ZCnFhcze3fJdfyXYLQw/aV7GEed86nQ7IsOs="
];
};
outputs = { self, ... } @ inputs':
let

View File

@@ -0,0 +1,39 @@
#!/usr/bin/env -S nix eval --json --file
let
caches = {
# lower ?priority=x numbers go first, will fallback to https://.../nix-cache-info if unset, final fallback is the default 0
# https://nix.dev/manual/nix/latest/command-ref/conf-file#conf-substituters
# https://nix.dev/manual/nix/latest/command-ref/conf-file#conf-trusted-public-keys
# https://cache.nixos.org/nix-cache-info (WantMassQuery: 1, priority: 40)
"https://cache.nixos.org/" = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
];
# https://nix-community.cachix.org/nix-cache-info (WantMassQuery: 1, priority: 41)
"https://nix-community.cachix.org/" = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
# # dead? https://github.com/numtide/nixpkgs-unfree/commit/399ae17bda97a0318a0c5316edb169d097a776dc
# # https://numtide.cachix.org/nix-cache-info (WantMassQuery: 1, priority: 41)
# "https://numtide.cachix.org/" = [
# "numtide.cachix.org-1:2ps1kLBUWjxIneOy1Ik6cQjb41X0iXVXeHigGmycPPE="
# ];
# https://flox.dev/blog/flox-the-nix-foundation-and-nvidia-partner-for-cuda/
# https://cache.flox.dev/nix-cache-info (no WantMassQuery, no priority(!!!))
"https://cache.flox.dev/?priority=45" = [
"flox-cache-public-1:7F4OyH7ZCnFhcze3fJdfyXYLQw/aV7GEed86nQ7IsOs="
];
};
in
{
nix.settings = {
# nixos will add the public binary cache as well with a mkAfter, unless we mkForce these
substituters = builtins.attrNames caches;
trusted-substituters = builtins.attrNames caches;
trusted-public-keys = builtins.concatLists (builtins.attrValues caches);
};
}

View File

@@ -1,13 +0,0 @@
# WARN: this file will get overwritten by $ cachix use <name>
{ pkgs, lib, ... }:
let
folder = ./cachix;
toImport = name: value: folder + ("/" + name);
filterCaches = key: value: value == "regular" && lib.hasSuffix ".nix" key;
imports = lib.mapAttrsToList toImport (lib.filterAttrs filterCaches (builtins.readDir folder));
in {
inherit imports;
nix.settings.substituters = ["https://cache.nixos.org/"];
}

View File

@@ -1,13 +0,0 @@
{
nix = {
settings = {
substituters = [
"https://cache.flox.dev" # https://flox.dev/blog/flox-the-nix-foundation-and-nvidia-partner-for-cuda/
];
trusted-public-keys = [
"flox-cache-public-1:7F4OyH7ZCnFhcze3fJdfyXYLQw/aV7GEed86nQ7IsOs="
];
};
};
}

View File

@@ -1,13 +0,0 @@
{
nix = {
settings = {
substituters = [
"https://nix-community.cachix.org"
];
trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
};
};
}

View File

@@ -1,13 +0,0 @@
{
nix = {
settings = {
substituters = [
"https://numtide.cachix.org"
];
trusted-public-keys = [
"numtide.cachix.org-1:2ps1kLBUWjxIneOy1Ik6cQjb41X0iXVXeHigGmycPPE="
];
};
};
}

View File

@@ -5,7 +5,7 @@
{
imports = let ifExists = p: if builtins.pathExists p then p else {}; in [
./../../secrets
./cachix.nix # update with `nix run nixpkgs#cachix -- use --mode nixos -d . FOOBAR`
./binary-caches.nix
./nix.nix
# ./lix.nix
./locale-no.nix