mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-03-25 02:41:26 +01:00
feat: install apps using homebrew instead of nix
This commit is contained in:
78
modules/darwin/apps.nix
Normal file
78
modules/darwin/apps.nix
Normal file
@@ -0,0 +1,78 @@
|
||||
{ pkgs, ...}: {
|
||||
|
||||
##########################################################################
|
||||
#
|
||||
# MacOS specific nix-darwin configuration
|
||||
#
|
||||
# Nix is not well supported on macOS, I met some strange bug recently.
|
||||
# So install apps using [homebrew](https://daiderd.com/nix-darwin/manual/index.html#opt-homebrew.enable) here.
|
||||
#
|
||||
##########################################################################
|
||||
|
||||
system = {
|
||||
defaults = {
|
||||
dock = {
|
||||
autohide = true;
|
||||
};
|
||||
|
||||
finder = {
|
||||
_FXShowPosixPathInTitle = false;
|
||||
};
|
||||
};
|
||||
|
||||
keyboard = {
|
||||
enableKeyMapping = true;
|
||||
remapCapsLockToControl = true;
|
||||
};
|
||||
};
|
||||
|
||||
homebrew = {
|
||||
enable = true;
|
||||
|
||||
onActivation = {
|
||||
autoUpdate = false;
|
||||
# 'zap': uninstalls all formulae(and related files) not listed in the generated Brewfile
|
||||
cleanup = "zap";
|
||||
};
|
||||
|
||||
taps = [
|
||||
"homebrew/cask"
|
||||
"homebrew/cask-fonts"
|
||||
"homebrew/services"
|
||||
"homebrew/cask-versions"
|
||||
|
||||
"hashicorp/tap"
|
||||
"pulumi/tap"
|
||||
];
|
||||
|
||||
brews = [
|
||||
# `brew install`
|
||||
"httpie"
|
||||
];
|
||||
|
||||
# `brew install --cask`
|
||||
casks = [
|
||||
"firefox"
|
||||
"google-chrome"
|
||||
"visual-studio-code"
|
||||
"visual-studio-code-insiders"
|
||||
|
||||
"telegram"
|
||||
"discord"
|
||||
|
||||
# "anki"
|
||||
"clashx"
|
||||
"iina"
|
||||
"openinterminal-lite"
|
||||
"syncthing"
|
||||
"raycast"
|
||||
"iglance"
|
||||
|
||||
"iterm2"
|
||||
"insomnia"
|
||||
"wireshark"
|
||||
"jdk-mission-control"
|
||||
"google-cloud-sdk"
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -10,10 +10,11 @@
|
||||
#
|
||||
###################################################################################
|
||||
|
||||
|
||||
# # enable flakes globally
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
|
||||
nix.settings.trusted-users = ["admin"];
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
@@ -30,10 +31,6 @@
|
||||
# Add ability to used TouchID for sudo authentication
|
||||
security.pam.enableSudoTouchIdAuth = true;
|
||||
|
||||
# Keyboard
|
||||
system.keyboard.enableKeyMapping = true;
|
||||
system.keyboard.remapCapsLockToEscape = true;
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Asia/Shanghai";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user