mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-23 17:28:33 +02:00
refactor: fonts (#194)
This commit is contained in:
46
modules/base/nix.nix
Normal file
46
modules/base/nix.nix
Normal file
@@ -0,0 +1,46 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
myvars,
|
||||
...
|
||||
}: {
|
||||
# auto upgrade nix to the unstable version
|
||||
# https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/tools/package-management/nix/default.nix#L284
|
||||
nix.package = pkgs.nixVersions.latest;
|
||||
|
||||
nix.settings = {
|
||||
# enable flakes globally
|
||||
experimental-features = ["nix-command" "flakes"];
|
||||
|
||||
# given the users in this list the right to specify additional substituters via:
|
||||
# 1. `nixConfig.substituers` in `flake.nix`
|
||||
# 2. command line args `--options substituers http://xxx`
|
||||
trusted-users = [myvars.username];
|
||||
|
||||
# substituers that will be considered before the official ones(https://cache.nixos.org)
|
||||
substituters = [
|
||||
# cache mirror located in China
|
||||
# status: https://mirrors.ustc.edu.cn/status/
|
||||
"https://mirrors.ustc.edu.cn/nix-channels/store"
|
||||
# status: https://mirror.sjtu.edu.cn/
|
||||
# "https://mirror.sjtu.edu.cn/nix-channels/store"
|
||||
# others
|
||||
# "https://mirrors.sustech.edu.cn/nix-channels/store"
|
||||
"https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store"
|
||||
|
||||
"https://nix-community.cachix.org"
|
||||
# my own cache server, currently not used.
|
||||
# "https://ryan4yin.cachix.org"
|
||||
];
|
||||
|
||||
trusted-public-keys = [
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
"ryan4yin.cachix.org-1:Gbk27ZU5AYpGS9i3ssoLlwdvMIh0NxG0w8it/cv9kbU="
|
||||
];
|
||||
builders-use-substitutes = true;
|
||||
};
|
||||
|
||||
nix.extraOptions = ''
|
||||
!include ${config.age.secrets.nix-access-tokens.path}
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user