Files
nix-config/modules/base.nix
Ryan Yin b0c1301367 feat: remove emacs-overlay, use stable version instead
fix: emacsclient not found
feat: use nom build to show build details in debug mode
2024-01-03 22:51:40 +08:00

50 lines
1.5 KiB
Nix

{
username,
userfullname,
nuenv,
...
} @ args: {
nixpkgs.overlays =
[
nuenv.overlays.default
]
++ (import ../overlays args);
users.users.${username} = {
description = userfullname;
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDiipi59EnVbi6bK1bGrcbfEM263wgdNfbrt6VBC1rHx ryan@ai-idols"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMSfp/hvegbK04HykWvoY1EbDW+vXu1AlCjVivWE2ZeR ryan@shoukei"
];
};
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 = [username];
# substituers that will be considered before the official ones(https://cache.nixos.org)
substituters = [
# cache mirror located in China
# status: https://mirror.sjtu.edu.cn/
"https://mirror.sjtu.edu.cn/nix-channels/store"
# status: https://mirrors.ustc.edu.cn/status/
# "https://mirrors.ustc.edu.cn/nix-channels/store"
"https://nix-community.cachix.org"
# my own cache server
"https://ryan4yin.cachix.org"
];
trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"ryan4yin.cachix.org-1:Gbk27ZU5AYpGS9i3ssoLlwdvMIh0NxG0w8it/cv9kbU="
];
builders-use-substitutes = true;
};
}