main
1{
2 den.aspects.core.nix = {
3 nixos = {
4 nix.settings = {
5 experimental-features = [
6 "nix-command"
7 "flakes"
8 "auto-allocate-uids"
9 "cgroups"
10 ];
11 # Select UIDs for builds automatically, EXPERIMENTAL
12 auto-allocate-uids = true;
13 # Required by auto-allocate-uids
14 use-cgroups = true;
15 # Automatically hard link identical files in the Nix store
16 auto-optimise-store = true;
17 # Remote servers preferred substituters instead of local builders
18 builders-use-substitutes = true;
19 # Unlimited HTTP connections
20 http-connections = 0;
21 # Use `$XDG_STATE_HOME/nix/...` instead of `$HOME/.nix-...`
22 use-xdg-base-directories = true;
23
24 trusted-users = ["@wheel"];
25
26 flake-registry = "";
27
28 substituters = [
29 # Official cache's mirrors located in China
30 "https://mirrors.ustc.edu.cn/nix-channels/store?priority=10"
31 "https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store?priority=10"
32 # Official cache
33 "https://nix-community.cachix.org?priority=11"
34
35 # Nixpkgs with CUDA enabled cache
36 "https://cache.flox.dev?priority=20"
37 ];
38 trusted-public-keys = [
39 "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
40
41 "flox-cache-public-1:7F4OyH7ZCnFhcze3fJdfyXYLQw/aV7GEed86nQ7IsOs="
42 ];
43 };
44 nix.channel.enable = false;
45
46 nixpkgs.flake.setFlakeRegistry = true;
47
48 system.copySystemConfiguration = false;
49 };
50 };
51}