101 lines
2.7 KiB
Nix
101 lines
2.7 KiB
Nix
{ lib, pkgs, ... }:
|
|
|
|
{
|
|
# List packages installed in system profile. To search by name, run:
|
|
# $ nix-env -qaP | grep wget
|
|
environment.systemPackages = with pkgs;[
|
|
vim
|
|
wget
|
|
curl
|
|
axel
|
|
htop
|
|
];
|
|
|
|
environment.variables = {
|
|
HOMEBREW_API_DOMAIN = "https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles/api";
|
|
HOMEBREW_BOTTLE_DOMAIN = "https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles";
|
|
HOMEBREW_BREW_GIT_REMOTE = "https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git";
|
|
HOMEBREW_CORE_GIT_REMOTE = "https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git";
|
|
HOMEBREW_PIP_INDEX_URL = "https://pypi.tuna.tsinghua.edu.cn/simple";
|
|
};
|
|
|
|
# Use a custom configuration.nix location.
|
|
# $ darwin-rebuild switch -I darwin-config=$HOME/.config/nixpkgs/darwin/configuration.nix
|
|
# environment.darwinConfig = "$HOME/.config/nixpkgs/darwin/configuration.nix";
|
|
|
|
# Auto upgrade nix package and the daemon service.
|
|
services.nix-daemon.enable = true;
|
|
# nix.package = pkgs.nix;
|
|
nixpkgs.config = {
|
|
allowUnfree = true;
|
|
allowUnsupportedSystem = true;
|
|
};
|
|
|
|
nix.settings = {
|
|
experimental-features = [ "nix-command" "flakes" ];
|
|
auto-optimise-store = true;
|
|
substituters = lib.mkForce [
|
|
"https://mirrors.ustc.edu.cn/nix-channels/store" # 中科大
|
|
"https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store" #清华
|
|
"https://mirrors.bfsu.edu.cn/nix-channels/store" # 北外
|
|
"https://mirror.sjtu.edu.cn/nix-channels/store" #交大
|
|
#"https://cache.nixos.org/"
|
|
];
|
|
trusted-users = [
|
|
"tonychyi"
|
|
];
|
|
};
|
|
|
|
# Create /etc/zshrc that loads the nix-darwin environment.
|
|
programs.zsh.enable = true; # default shell on catalina
|
|
# programs.fish.enable = true;
|
|
|
|
# Used for backwards compatibility, please read the changelog before changing.
|
|
# $ darwin-rebuild changelog
|
|
system.stateVersion = 4;
|
|
|
|
users.users.tonychyi = {
|
|
name = "tonychyi";
|
|
home = "/Users/tonychyi";
|
|
};
|
|
|
|
homebrew = {
|
|
enable = true;
|
|
onActivation = {
|
|
autoUpdate = false;
|
|
# 'zap': uninstalls all formulae(and related files) not listed here.
|
|
cleanup = "zap";
|
|
};
|
|
|
|
masApps = {
|
|
# TODO Feel free to add your favorite apps here.
|
|
|
|
# Xcode = 497799835;
|
|
# Wechat = 836500024;
|
|
# NeteaseCloudMusic = 944848654;
|
|
# QQ = 451108668;
|
|
# WeCom = 1189898970; # Wechat for Work
|
|
# TecentMetting = 1484048379;
|
|
# QQMusic = 595615424;
|
|
};
|
|
|
|
# TODO package list
|
|
brews = [
|
|
"curl"
|
|
"ffmpeg"
|
|
"qemu"
|
|
"proxychains-ng"
|
|
];
|
|
|
|
# TODO package list
|
|
casks = [
|
|
"clock-bar"
|
|
"macfuse"
|
|
"ntfstool"
|
|
"rar"
|
|
"tailscale"
|
|
"webpquicklook"
|
|
];
|
|
};
|
|
}
|