Set up cachix as emacs-overlay binary cache

This commit is contained in:
coolneng 2020-09-10 13:13:25 +02:00
parent f0ae1f74cd
commit 1223542226
Signed by: coolneng
GPG Key ID: 9893DA236405AF57
4 changed files with 24 additions and 1 deletions

8
cachix/nix-community.nix Normal file
View File

@ -0,0 +1,8 @@
{
nix = {
binaryCaches = [ "https://nix-community.cachix.org" ];
binaryCachePublicKeys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
};
}

View File

@ -103,6 +103,7 @@
./modules/printing.nix ./modules/printing.nix
./modules/periodic.nix ./modules/periodic.nix
./modules/power.nix ./modules/power.nix
./modules/cachix.nix
./overlays/emacs-overlay.nix ./overlays/emacs-overlay.nix
]; ];

13
modules/cachix.nix Normal file
View File

@ -0,0 +1,13 @@
# 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/" ];
}

View File

@ -37,7 +37,6 @@
podman-compose podman-compose
shellcheck shellcheck
shfmt shfmt
android-studio
gnumake gnumake
nodePackages.pyright nodePackages.pyright
black black
@ -75,6 +74,8 @@
zip zip
unzip unzip
unrar unrar
# Overlays
cachix
]; ];
# Fonts declaration # Fonts declaration