2023-09-19 00:17:43 +00:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
home = {
|
|
|
|
username = "guanranwang";
|
|
|
|
homeDirectory = "/Users/guanranwang";
|
|
|
|
|
|
|
|
# Workaround for spotlight indexing
|
|
|
|
# https://github.com/nix-community/home-manager/issues/1341#issuecomment-1705731962_
|
|
|
|
activation = {
|
|
|
|
trampolineApps = let
|
|
|
|
apps = pkgs.buildEnv {
|
|
|
|
name = "home-manager-applications";
|
|
|
|
paths = config.home.packages;
|
|
|
|
pathsToLink = "/Applications";
|
|
|
|
};
|
|
|
|
in lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
|
|
|
toDir="$HOME/Applications/Home Manager Trampolines"
|
|
|
|
fromDir="${apps}/Applications/"
|
|
|
|
rm -rf "$toDir"
|
|
|
|
mkdir "$toDir"
|
|
|
|
(
|
|
|
|
cd "$fromDir"
|
|
|
|
for app in *.app; do
|
|
|
|
/usr/bin/osacompile -o "$toDir/$app" -e 'do shell script "open '$fromDir/$app'"'
|
|
|
|
done
|
|
|
|
)
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
packages = with pkgs; [
|
|
|
|
#fastfetch
|
|
|
|
|
|
|
|
prismlauncher
|
|
|
|
keka # un-archive-r
|
|
|
|
iterm2
|
|
|
|
element-desktop
|
|
|
|
|
|
|
|
eza
|
|
|
|
bottom
|
|
|
|
bat
|
|
|
|
fd
|
|
|
|
git
|
|
|
|
ripgrep
|
|
|
|
yt-dlp
|
|
|
|
aria2
|
|
|
|
android-tools
|
2023-09-23 21:46:18 +00:00
|
|
|
skim
|
2023-09-19 00:17:43 +00:00
|
|
|
|
|
|
|
spotify
|
|
|
|
spicetify-cli
|
|
|
|
yesplaymusic
|
|
|
|
mpv
|
2023-09-20 01:42:26 +00:00
|
|
|
|
|
|
|
# replace outdated macOS components
|
|
|
|
coreutils
|
2023-10-05 10:09:04 +00:00
|
|
|
vim
|
2023-09-20 01:42:26 +00:00
|
|
|
gnugrep
|
|
|
|
openssh
|
|
|
|
screen
|
2023-09-20 01:44:26 +00:00
|
|
|
|
|
|
|
# LSP
|
2023-10-05 10:09:04 +00:00
|
|
|
nixd
|
2023-09-20 01:44:26 +00:00
|
|
|
nil
|
2023-09-19 00:17:43 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
sessionVariables = {
|
|
|
|
"http_proxy" = "http://127.0.0.1:7890";
|
2023-10-10 09:05:33 +00:00
|
|
|
"https_proxy" = "http://127.0.0.1:7890";
|
|
|
|
"ftp_proxy" = "http://127.0.0.1:7890";
|
|
|
|
"rsync_proxy" = "http://127.0.0.1:7890";
|
2023-09-19 00:17:43 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
# macOS don't have fontconfig
|
|
|
|
programs = let
|
|
|
|
monospace = "JetBrainsMono Nerd Font";
|
|
|
|
in {
|
|
|
|
vscode.userSettings = {
|
|
|
|
"editor.fontFamily" = "${monospace}";
|
|
|
|
};
|
|
|
|
|
|
|
|
alacritty.settings.font = {
|
|
|
|
normal = {
|
|
|
|
family = "${monospace}";
|
|
|
|
};
|
|
|
|
bold = {
|
|
|
|
family = "${monospace}";
|
|
|
|
};
|
|
|
|
bold_italic = {
|
|
|
|
family = "${monospace}";
|
|
|
|
};
|
|
|
|
italic = {
|
|
|
|
family = "${monospace}";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|