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
2023-07-23 02:08:19 +00:00

50 lines
1.4 KiB
Nix

{ lib, config, 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
];
# 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 = {
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/"
];
};
# 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";
};
}