feat(cachix): add cachix configuration files and update host.nix
- Added `cachix.nix` for configuring Cachix substituters - Added `cachix/nix-community.nix` for Nix Community Cachix settings - Updated `lib/host.nix` to include `pkgs.nixosModules.cachixConfig` in the list of NixOS modules
This commit is contained in:
parent
2f23f3db9e
commit
44f757f535
13
cachix.nix
Normal file
13
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
cachix/nix-community.nix
Normal file
13
cachix/nix-community.nix
Normal file
@ -0,0 +1,13 @@
|
||||
|
||||
{
|
||||
nix = {
|
||||
settings = {
|
||||
substituters = [
|
||||
"https://nix-community.cachix.org"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
@ -42,6 +42,7 @@
|
||||
|
||||
home-manager.nixosModules.home-manager
|
||||
../hosts/${name}/default.nix
|
||||
pkgs.nixosModules.cachixConfig
|
||||
];
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user