mirror of
https://github.com/traxys/Nixfiles.git
synced 2026-03-30 17:07:24 +02:00
Configure cachix automatically on NixOS
This commit is contained in:
parent
e681812b52
commit
6e991643d3
3 changed files with 27 additions and 0 deletions
13
nixos/cachix.nix
Normal file
13
nixos/cachix.nix
Normal 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.settings.substituters = ["https://cache.nixos.org/"];
|
||||
}
|
||||
13
nixos/cachix/traxys.nix
Normal file
13
nixos/cachix/traxys.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
|
||||
{
|
||||
nix = {
|
||||
settings = {
|
||||
substituters = [
|
||||
"https://traxys.cachix.org"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"traxys.cachix.org-1:8Qir8lQJdhzUaw5AE7ICom/IB25wgdheZFxdMln7Qgg="
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -12,6 +12,7 @@
|
|||
./pkg.nix
|
||||
#./home.nix
|
||||
./localcfg.nix
|
||||
./cachix.nix
|
||||
];
|
||||
|
||||
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue