darwin/desktop: re-add accidentally removed files
This commit is contained in:
parent
37b6537448
commit
3fdcc0fe45
3 changed files with 95 additions and 1 deletions
|
@ -1,4 +1,6 @@
|
|||
{...}: {
|
||||
home-manager.users.guanranwang = import ./home;
|
||||
|
||||
imports = [
|
||||
../common/core
|
||||
./packages
|
||||
|
|
91
darwin/profiles/desktop/home/default.nix
Normal file
91
darwin/profiles/desktop/home/default.nix
Normal file
|
@ -0,0 +1,91 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports = map (n: ../../../../home/applications/${n}) [
|
||||
# Terminal
|
||||
"alacritty"
|
||||
|
||||
# Shell
|
||||
"fish"
|
||||
"bash"
|
||||
|
||||
# Editor
|
||||
"helix"
|
||||
"neovim"
|
||||
"vscode"
|
||||
|
||||
# Language
|
||||
"nix"
|
||||
"go"
|
||||
|
||||
# Media
|
||||
"mpv"
|
||||
"spotify"
|
||||
|
||||
# Misc
|
||||
"telegram-desktop"
|
||||
];
|
||||
|
||||
home = {
|
||||
activation = {
|
||||
# Workaround for spotlight indexing
|
||||
# https://github.com/nix-community/home-manager/issues/1341#issuecomment-1705731962_
|
||||
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
|
||||
)
|
||||
'';
|
||||
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
|
||||
'';
|
||||
};
|
||||
|
||||
packages = with pkgs; [
|
||||
## GUI
|
||||
### Tools
|
||||
keka # un-archive-r
|
||||
iterm2
|
||||
### Misc
|
||||
element-desktop
|
||||
];
|
||||
};
|
||||
|
||||
# macOS don't have fontconfig
|
||||
programs = let
|
||||
monospace = "JetBrainsMono Nerd Font";
|
||||
in {
|
||||
### VSCode
|
||||
vscode.userSettings.editor.fontFamily = monospace;
|
||||
|
||||
### Alacritty
|
||||
alacritty.settings.font = {
|
||||
normal.family = monospace;
|
||||
bold.family = monospace;
|
||||
bold_italic.family = monospace;
|
||||
italic.family = monospace;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
{pkgs, ...}: {
|
||||
fonts.fontDir.enable = true;
|
||||
fonts.fonts = with pkgs; [
|
||||
(nerdfonts.override {fonts = ["FiraCode" "JetBrainsMono"];})
|
||||
(nerdfonts.override {fonts = ["JetBrainsMono"];})
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue