update
This commit is contained in:
parent
dbf1bd1692
commit
69053ec92d
@ -1,4 +1,4 @@
|
|||||||
{ lib, config, pkgs, ... }:
|
{ lib, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
# List packages installed in system profile. To search by name, run:
|
# List packages installed in system profile. To search by name, run:
|
||||||
@ -11,6 +11,14 @@
|
|||||||
htop
|
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.
|
# Use a custom configuration.nix location.
|
||||||
# $ darwin-rebuild switch -I darwin-config=$HOME/.config/nixpkgs/darwin/configuration.nix
|
# $ darwin-rebuild switch -I darwin-config=$HOME/.config/nixpkgs/darwin/configuration.nix
|
||||||
# environment.darwinConfig = "$HOME/.config/nixpkgs/darwin/configuration.nix";
|
# environment.darwinConfig = "$HOME/.config/nixpkgs/darwin/configuration.nix";
|
||||||
@ -46,4 +54,42 @@
|
|||||||
name = "tonychyi";
|
name = "tonychyi";
|
||||||
home = "/Users/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"
|
||||||
|
];
|
||||||
|
|
||||||
|
# TODO package list
|
||||||
|
casks = [
|
||||||
|
"clock-bar"
|
||||||
|
"macfuse"
|
||||||
|
"ntfstool"
|
||||||
|
"rar"
|
||||||
|
"tailscale"
|
||||||
|
"webpquicklook"
|
||||||
|
];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
18
flake.lock
18
flake.lock
@ -7,11 +7,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1689825754,
|
"lastModified": 1700795494,
|
||||||
"narHash": "sha256-u3W3WGO3BA63nb+CeNLBajbJ/sl8tDXBHKxxeTOCxfo=",
|
"narHash": "sha256-gzGLZSiOhf155FW7262kdHo2YDeugp3VuIFb4/GGng0=",
|
||||||
"owner": "lnl7",
|
"owner": "lnl7",
|
||||||
"repo": "nix-darwin",
|
"repo": "nix-darwin",
|
||||||
"rev": "531c3de7eccf95155828e0cd9f18c25e7f937777",
|
"rev": "4b9b83d5a92e8c1fbfd8eb27eda375908c11ec4d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -28,11 +28,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1687871164,
|
"lastModified": 1700392168,
|
||||||
"narHash": "sha256-bBFlPthuYX322xOlpJvkjUBz0C+MOBjZdDOOJJ+G2jU=",
|
"narHash": "sha256-v5LprEFx3u4+1vmds9K0/i7sHjT0IYGs7u9v54iz/OA=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "07c347bb50994691d7b0095f45ebd8838cf6bc38",
|
"rev": "28535c3a34d79071f2ccb68671971ce0c0984d7e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -44,11 +44,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1690022785,
|
"lastModified": 1700854570,
|
||||||
"narHash": "sha256-WV3Rg6WcP3UErddn/+Kw3BTsc8kB9F4Y5sv7I/N5q4o=",
|
"narHash": "sha256-GiwMS5sWSgF/CyZYbm+G5EcgG1VOEyvcsP5lE1L97Aw=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "0ee595490f5b1d181cccc17928aa250faf4b91c1",
|
"rev": "cbd3f3722ac41a200c1655141e021cf12c3ba4e6",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
30
flake.nix
30
flake.nix
@ -1,13 +1,29 @@
|
|||||||
{
|
{
|
||||||
inputs = {
|
nixConfig = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-23.05-darwin";
|
experimental-features = [ "nix-command" "flakes" ];
|
||||||
darwin.url = "github:lnl7/nix-darwin/master";
|
|
||||||
darwin.inputs.nixpkgs.follows = "nixpkgs";
|
substituters = [
|
||||||
home-manager.url = "github:nix-community/home-manager/release-23.05";
|
# Replace official cache with a mirror located in China
|
||||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
#
|
||||||
|
# Feel free to remove this line if you are not in China
|
||||||
|
"https://mirrors.ustc.edu.cn/nix-channels/store"
|
||||||
|
"https://cache.nixos.org"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, darwin, nixpkgs, home-manager }: {
|
inputs = {
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-23.05-darwin";
|
||||||
|
darwin = {
|
||||||
|
url = "github:lnl7/nix-darwin/master";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
home-manager = {
|
||||||
|
url = "github:nix-community/home-manager/release-23.05";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, darwin, home-manager }: {
|
||||||
darwinConfigurations."mbp" = darwin.lib.darwinSystem {
|
darwinConfigurations."mbp" = darwin.lib.darwinSystem {
|
||||||
system = "x86_64-darwin";
|
system = "x86_64-darwin";
|
||||||
modules = [
|
modules = [
|
||||||
|
26
home.nix
26
home.nix
@ -1,11 +1,10 @@
|
|||||||
{ pkgs, config, ... }: {
|
{ pkgs, ... }: {
|
||||||
home = {
|
home = {
|
||||||
stateVersion = "23.05";
|
stateVersion = "23.05";
|
||||||
homeDirectory = "/Users/tonychyi";
|
homeDirectory = "/Users/tonychyi";
|
||||||
|
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
bat
|
bat
|
||||||
thefuck
|
|
||||||
ranger
|
ranger
|
||||||
coreutils
|
coreutils
|
||||||
icdiff
|
icdiff
|
||||||
@ -19,8 +18,6 @@
|
|||||||
kube-capacity
|
kube-capacity
|
||||||
kubernetes-helm
|
kubernetes-helm
|
||||||
arduino-cli
|
arduino-cli
|
||||||
qemu
|
|
||||||
ffmpeg
|
|
||||||
#obs-studio
|
#obs-studio
|
||||||
#podman-desktop
|
#podman-desktop
|
||||||
];
|
];
|
||||||
@ -30,18 +27,10 @@
|
|||||||
nixos-rebuild = "darwin-rebuild";
|
nixos-rebuild = "darwin-rebuild";
|
||||||
top = "htop";
|
top = "htop";
|
||||||
pip = "pip3";
|
pip = "pip3";
|
||||||
ls = "ls --color=auto";
|
|
||||||
cat = "bat -p --paging=never -u";
|
cat = "bat -p --paging=never -u";
|
||||||
diff = "icdiff";
|
diff = "icdiff";
|
||||||
};
|
};
|
||||||
|
|
||||||
sessionVariables = {
|
|
||||||
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";
|
|
||||||
};
|
|
||||||
|
|
||||||
sessionPath = [
|
sessionPath = [
|
||||||
"$HOME/.local/bin"
|
"$HOME/.local/bin"
|
||||||
"$HOME/.cargo/bin"
|
"$HOME/.cargo/bin"
|
||||||
@ -52,6 +41,19 @@
|
|||||||
programs = {
|
programs = {
|
||||||
home-manager.enable = true;
|
home-manager.enable = true;
|
||||||
timidity.enable = true;
|
timidity.enable = true;
|
||||||
|
thefuck.enable = true;
|
||||||
|
|
||||||
|
eza = {
|
||||||
|
enable = true;
|
||||||
|
enableAliases = true;
|
||||||
|
git = true;
|
||||||
|
icons = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
direnv = {
|
||||||
|
enable = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
};
|
||||||
|
|
||||||
vim = {
|
vim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
Reference in New Issue
Block a user