2023-09-19 00:17:43 +00:00
|
|
|
{
|
2023-11-04 10:14:42 +00:00
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}: {
|
2024-01-03 14:41:18 +00:00
|
|
|
imports = map (n: ../../../../home-manager/applications/${n}) [
|
2023-11-29 14:10:09 +00:00
|
|
|
# Terminal
|
|
|
|
"alacritty"
|
|
|
|
|
|
|
|
# Shell
|
|
|
|
"fish"
|
|
|
|
"bash"
|
|
|
|
|
|
|
|
# Editor
|
|
|
|
"helix"
|
|
|
|
"neovim"
|
|
|
|
"vscode"
|
|
|
|
|
|
|
|
# Language
|
|
|
|
"nix"
|
|
|
|
"go"
|
|
|
|
|
|
|
|
# Media
|
|
|
|
"mpv"
|
|
|
|
"spotify"
|
2023-12-13 11:10:23 +00:00
|
|
|
|
|
|
|
# Misc
|
|
|
|
"telegram-desktop"
|
2023-11-29 14:10:09 +00:00
|
|
|
];
|
|
|
|
|
2023-09-19 00:17:43 +00:00
|
|
|
home = {
|
|
|
|
activation = {
|
2023-10-09 06:52:33 +00:00
|
|
|
# Workaround for spotlight indexing
|
|
|
|
# https://github.com/nix-community/home-manager/issues/1341#issuecomment-1705731962_
|
2023-09-19 00:17:43 +00:00
|
|
|
trampolineApps = let
|
|
|
|
apps = pkgs.buildEnv {
|
|
|
|
name = "home-manager-applications";
|
|
|
|
paths = config.home.packages;
|
|
|
|
pathsToLink = "/Applications";
|
|
|
|
};
|
2023-11-04 10:14:42 +00:00
|
|
|
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
|
|
|
|
)
|
|
|
|
'';
|
|
|
|
setSystemProxy = let
|
|
|
|
networksetup = /usr/sbin/networksetup;
|
|
|
|
in
|
|
|
|
lib.hm.dag.entryAfter ["writeBoundary"] ''
|
|
|
|
${networksetup} -setwebproxystate "Wi-fi" on
|
|
|
|
${networksetup} -setwebproxy "Wi-fi" 127.0.0.1 7890
|
|
|
|
${networksetup} -setwebproxystate "Ethernet" on
|
|
|
|
${networksetup} -setwebproxy "Ethernet" 127.0.0.1 7890
|
|
|
|
'';
|
2023-09-19 00:17:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
packages = with pkgs; [
|
2023-10-15 06:24:40 +00:00
|
|
|
## GUI
|
|
|
|
### Tools
|
|
|
|
keka # un-archive-r
|
|
|
|
iterm2
|
|
|
|
### Misc
|
|
|
|
element-desktop
|
2023-09-19 00:17:43 +00:00
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
# macOS don't have fontconfig
|
|
|
|
programs = let
|
|
|
|
monospace = "JetBrainsMono Nerd Font";
|
|
|
|
in {
|
2023-11-14 03:22:17 +00:00
|
|
|
### VSCode
|
2023-11-22 00:31:01 +00:00
|
|
|
vscode.userSettings.editor.fontFamily = monospace;
|
|
|
|
vscode.userSettings.terminal.external.osxExec = "Alacritty.app";
|
2023-09-19 00:17:43 +00:00
|
|
|
|
2023-11-14 03:22:17 +00:00
|
|
|
### Alacritty
|
2023-09-19 00:17:43 +00:00
|
|
|
alacritty.settings.font = {
|
2023-11-22 00:31:01 +00:00
|
|
|
normal.family = monospace;
|
|
|
|
bold.family = monospace;
|
|
|
|
bold_italic.family = monospace;
|
|
|
|
italic.family = monospace;
|
2023-09-19 00:17:43 +00:00
|
|
|
};
|
|
|
|
};
|
2023-11-04 10:14:42 +00:00
|
|
|
}
|