dotfiles/nix/module/configuration.nix
2024-12-09 22:13:01 +07:00

107 lines
2.4 KiB
Nix

{ hostname }:
{
nix = {
optimise.automatic = true;
settings = {
builders-use-substitutes = true;
experimental-features = [ "flakes" "nix-command" ];
substituters = [ "https://nix-community.cachix.org" ];
trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
trusted-users = [ "@wheel" ];
warn-dirty = false;
};
};
programs.zsh.enable = true;
programs.gnupg.agent.enable = true;
networking.hostName = hostname;
homebrew = {
enable = true;
onActivation.cleanup = "zap";
brews = [
"borders"
];
casks = [
"aerospace"
"anki"
"arc"
"caffeine"
"docker"
"dracula-xcode"
"google-chrome"
"karabiner-elements"
"logseq"
"nextcloud"
"proton-pass"
"protonvpn"
"raycast"
"zen-browser"
];
taps = [
"dracula/install"
"FelixKratz/formulae"
"nikitabobko/tap"
];
};
system = {
activationScripts.postUserActivation.text = ''
/System/Library/PrivateFrameworks/SystemAdministration.framework/Resources/activateSettings -u
defaults write com.apple.symbolichotkeys AppleSymbolicHotKeys -dict-add 70 '<dict><key>enabled</key><false/></dict>'
'';
defaults = {
dock = {
autohide = true;
autohide-time-modifier = 0.1;
expose-animation-duration = 0.0;
mru-spaces = false;
orientation = "right";
show-recents = false;
};
finder = {
AppleShowAllExtensions = true;
AppleShowAllFiles = true;
CreateDesktop = false;
FXPreferredViewStyle = "Nlsv";
QuitMenuItem = true;
ShowPathbar = true;
ShowStatusBar = true;
_FXShowPosixPathInTitle = true;
};
trackpad = {
Clicking = true;
TrackpadRightClick = true;
};
menuExtraClock = {
IsAnalog = false;
Show24Hour = true;
ShowDate = 0;
ShowDayOfWeek = false;
};
NSGlobalDomain = {
AppleInterfaceStyle = "Dark";
AppleMeasurementUnits = "Centimeters";
AppleShowAllExtensions = true;
AppleShowAllFiles = true;
AppleTemperatureUnit = "Celsius";
InitialKeyRepeat = 14;
KeyRepeat = 1;
"com.apple.mouse.tapBehavior" = 1;
};
};
stateVersion = 5;
};
}