This repository has been archived on 2024-01-19. You can view files and clone it, but cannot push or open issues or pull requests.
my-darwin-nix-configuration/darwin-configuration.nix

102 lines
2.7 KiB
Nix
Raw Permalink Normal View History

2023-11-25 07:09:43 +00:00
{ lib, pkgs, ... }:
2023-06-18 12:41:10 +00:00
{
# 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
];
2023-11-25 07:09:43 +00:00
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";
};
2023-06-18 12:41:10 +00:00
# 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 = {
2023-11-25 08:40:24 +00:00
experimental-features = [ "nix-command" "flakes" ];
2023-06-18 12:41:10 +00:00
auto-optimise-store = true;
2023-07-23 02:08:19 +00:00
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" # 北外
2023-06-18 12:41:10 +00:00
"https://mirror.sjtu.edu.cn/nix-channels/store" #交大
2023-11-25 08:40:24 +00:00
#"https://cache.nixos.org/"
];
trusted-users = [
"tonychyi"
2023-06-18 12:41:10 +00:00
];
};
# Create /etc/zshrc that loads the nix-darwin environment.
2023-07-23 02:08:19 +00:00
programs.zsh.enable = true; # default shell on catalina
2023-06-18 12:41:10 +00:00
# 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";
};
2023-11-25 07:09:43 +00:00
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"
2023-11-25 08:42:02 +00:00
"proxychains-ng"
2023-11-25 07:09:43 +00:00
];
# TODO package list
casks = [
"clock-bar"
"macfuse"
"ntfstool"
"rar"
"tailscale"
"webpquicklook"
2023-12-31 10:24:56 +00:00
"86box"
2023-11-25 07:09:43 +00:00
];
};
2023-06-18 12:41:10 +00:00
}