btw i use nix
1{ config, lib, ... }:
2
3let
4 cfg = config.custom;
5in
6{
7 options.custom.useNixCache = lib.mkOption {
8 type = lib.types.bool;
9 default = false;
10 };
11
12 config = lib.mkIf cfg.useNixCache {
13 nix = {
14 settings = {
15 substituters = [
16 "https://cache.nixos.org?priority=100"
17 "https://nix-cache.vpn.freumh.org?priority=10"
18 ];
19 trusted-public-keys = [
20 "nix-cache.vpn.freumh.org:+jBJN2k1WO9wNr8uHQn7P4mT8c+VeP9uFGf+VTtfzHk="
21 ];
22 };
23 };
24 };
25}