Payas Relekar
dfb3d3f7ee
Finally fully enable binary cache for nix-community and emacs-overlay. No I don't have to build emacs from scratch for every master update :) This was done by means of cachix, which is a means to upload built derivations for others to share with. Nix-community has their own, and it makes using overlays provided by nix-community that much better. This should shave off 20-25 min per system rebuild. I am not sure if this will work as is after moving this config to new system, so here are the steps to follow: 1. nix shell nixpkgs#cachix 2. sudo cachix use nix-community 3. stage/commit cachix.nix and cachix/ from /etc/nixos 4. done Hopefully this will be enough in the future system move. If not, all the best to future me.
13 lines
410 B
Nix
13 lines
410 B
Nix
|
|
# 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.binaryCaches = ["https://cache.nixos.org/"];
|
|
}
|