-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Darwin profiles and configurations
- Loading branch information
Showing
9 changed files
with
262 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
inputs, | ||
cell, | ||
}: let | ||
inherit (inputs.cells.common.lib) importConfigurations; | ||
in | ||
importConfigurations { | ||
src = ./hosts; | ||
args = {inherit inputs cell;}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
inputs, | ||
cell, | ||
}: let | ||
inherit (inputs.cells.common.lib) importProfiles; | ||
in | ||
importProfiles { | ||
src = ./profiles; | ||
args = {inherit inputs cell;}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
{...}: { | ||
# Homebrew casks. | ||
homebrew.casks = [ | ||
"1password" | ||
"adobe-creative-cloud" | ||
"adrive" | ||
"alt-tab" | ||
"altserver" | ||
"arc" | ||
"baidunetdisk" | ||
"balenaetcher" | ||
"bilibili" | ||
"brave-browser" | ||
"cloudflare-warp" | ||
"cyberduck" | ||
"discord" | ||
"element" | ||
"feishu" | ||
"firefox" | ||
"font-caskaydia-cove-nerd-font" | ||
"font-fira-code-nerd-font" | ||
"font-jetbrains-mono-nerd-font" | ||
"font-lxgw-bright" | ||
"font-lxgw-wenkai" | ||
"font-monaspace" | ||
"github" | ||
"google-chrome" | ||
"google-drive" | ||
"handbrake" | ||
"hiddenbar" | ||
"iina" | ||
"itsycal" | ||
"jetbrains-toolbox" | ||
"keepingyouawake" | ||
"keka" | ||
"kitty" | ||
"logitech-options" | ||
"maccy" | ||
"microsoft-auto-update" | ||
"microsoft-office" | ||
"microsoft-remote-desktop" | ||
"miniconda" | ||
"monitorcontrol" | ||
"mos" | ||
"motrix" | ||
"mounty" | ||
"neteasemusic" | ||
"obs" | ||
"obsidian" | ||
"onyx" | ||
"orbstack" | ||
"plex" | ||
"poe" | ||
"qfinder-pro" | ||
"qq" | ||
"qsync-client" | ||
"qudedup-extract-tool" | ||
"raycast" | ||
"rectangle" | ||
"sioyek" | ||
"spotify" | ||
"squirrel" | ||
"stats" | ||
"steam" | ||
"tailscale" | ||
"tencent-meeting" | ||
"transmission" | ||
"visual-studio-code" | ||
"warp" | ||
"wechat" | ||
"wezterm" | ||
"xpra" | ||
"xquartz" | ||
"zed" | ||
"zotero-beta" | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
config, | ||
lib, | ||
pkgs, | ||
... | ||
}: { | ||
networking.hostName = "sakamoto"; | ||
networking.computerName = "YouSikiMacBookPro"; | ||
|
||
users.users.yousiki = { | ||
name = "yousiki"; | ||
home = "/Users/yousiki"; | ||
}; | ||
|
||
# Add ability to used TouchID for sudo authentication | ||
security.pam.enableSudoTouchIdAuth = true; | ||
|
||
# System configurations | ||
system.defaults.NSGlobalDomain.ApplePressAndHoldEnabled = false; | ||
system.defaults.NSGlobalDomain.AppleShowAllExtensions = true; | ||
system.defaults.dock.show-recents = false; | ||
system.defaults.dock.tilesize = 48; | ||
system.defaults.finder.QuitMenuItem = true; | ||
system.defaults.finder.ShowPathbar = true; | ||
system.defaults.finder.ShowStatusBar = true; | ||
system.defaults.trackpad.Clicking = true; | ||
system.defaults.trackpad.TrackpadThreeFingerDrag = true; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{ | ||
inputs, | ||
cell, | ||
}: { | ||
_module.specialArgs = { | ||
inherit inputs; | ||
}; | ||
|
||
imports = [ | ||
./applications.nix | ||
./configuration.nix | ||
|
||
inputs.cells.darwin.darwinProfiles.core | ||
inputs.cells.darwin.darwinProfiles.homebrew | ||
|
||
inputs.cells.home.homeProfiles.base | ||
|
||
{ | ||
home-manager.users.yousiki = { | ||
imports = [ | ||
inputs.cells.home.homeProfiles.catppuccin | ||
inputs.cells.home.homeProfiles.core | ||
inputs.cells.home.homeProfiles.languages | ||
inputs.cells.home.homeProfiles.shell | ||
inputs.cells.home.homeProfiles.ssh | ||
]; | ||
|
||
bee.home-languages = [ | ||
"c" | ||
"latex" | ||
"nix" | ||
"python" | ||
"rust" | ||
]; | ||
|
||
bee.home-catppuccin.flavor = "mocha"; | ||
}; | ||
} | ||
]; | ||
|
||
bee = rec { | ||
system = "x86_64-darwin"; | ||
darwin = inputs.darwin; | ||
home = inputs.home-manager; | ||
pkgs = import inputs.nixpkgs { | ||
inherit system; | ||
config = { | ||
allowUnfree = true; | ||
cudaSupport = true; | ||
}; | ||
overlays = [ | ||
inputs.fenix.overlays.default | ||
inputs.nvfetcher.overlays.default | ||
]; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
inputs, | ||
cell, | ||
}: {...}: { | ||
imports = [ | ||
inputs.cells.common.commonProfiles.core | ||
]; | ||
|
||
services.activate-system.enable = true; | ||
services.nix-daemon.enable = true; | ||
|
||
# Used for backwards compatibility, please read the changelog before changing. | ||
# $ darwin-rebuild changelog | ||
system.stateVersion = 4; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
inputs, | ||
cell, | ||
}: {pkgs, ...}: { | ||
homebrew.enable = true; | ||
|
||
# Upgrade and uninstall homebrew casks automatically. | ||
homebrew.onActivation.autoUpdate = true; | ||
homebrew.onActivation.upgrade = true; | ||
homebrew.onActivation.cleanup = "uninstall"; | ||
|
||
# Set environment variables. | ||
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"; | ||
}; | ||
|
||
# Add taps. | ||
homebrew.taps = [ | ||
"buo/cask-upgrade" | ||
{ | ||
name = "homebrew/cask-fonts"; | ||
clone_target = "https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask-fonts.git"; | ||
} | ||
{ | ||
name = "homebrew/cask-versions"; | ||
clone_target = "https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask-versions.git"; | ||
} | ||
{ | ||
name = "homebrew/command-not-found"; | ||
clone_target = "https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-command-not-found.git"; | ||
} | ||
{ | ||
name = "homebrew/services"; | ||
clone_target = "https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-services.git"; | ||
} | ||
]; | ||
|
||
environment.systemPath = | ||
if pkgs.system == "aarch64-darwin" | ||
then [ | ||
"/opt/homebrew/bin" | ||
"/opt/homebrew/sbin" | ||
] | ||
else []; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters