config/hosts/laptop/configuration.nix

124 lines
3 KiB
Nix
Raw Normal View History

2024-09-27 15:09:44 -07:00
{
2025-04-19 10:35:31 -07:00
inputs,
2024-09-27 19:01:35 -07:00
config,
pkgs,
2025-04-18 15:55:34 -07:00
lib,
2024-09-27 19:01:35 -07:00
...
}: {
2025-04-18 15:55:34 -07:00
imports = [
2025-04-19 21:57:56 -07:00
# ../../modules/macos/icons.nix
../../modules/macos/homebrew.nix
2025-04-18 15:55:34 -07:00
];
2025-04-10 20:06:11 -07:00
environment.systemPackages = with pkgs; [
neovim
pinentry_mac
2024-09-27 19:01:35 -07:00
];
2024-09-27 15:09:44 -07:00
2025-04-19 21:57:56 -07:00
# environment.customIcons = {
# enable = true;
# icons = [
# {
# path = "/Applications/Zen.app";
# icon = "/Users/nmarks/.dotfiles/icons/Zen_icons/firefox.icns";
# }
# ];
# };
2025-03-31 13:37:38 -07:00
2024-09-27 15:09:44 -07:00
# Use a custom configuration.nix location.
2024-09-27 19:01:35 -07:00
#environment.darwinConfig = "$HOME/.dotfiles/hosts/laptop";
2024-09-27 15:09:44 -07:00
# Create /etc/zshrc that loads the nix-darwin environment.
programs = {
gnupg.agent.enable = true;
2024-09-27 19:01:35 -07:00
zsh.enable = true; # default shell on catalina
2024-09-27 15:09:44 -07:00
};
2024-10-05 14:47:09 -07:00
programs.zsh = {
interactiveShellInit = ''
2024-11-23 21:04:36 -08:00
if [[ $(${pkgs.procps}/bin/ps -p $PPID -o comm) != "fish" && -z ''${ZSH_EXUCTION_STRING} ]]
2024-10-05 14:47:09 -07:00
then
2024-11-23 21:04:36 -08:00
[[ -o login ]] && LOGIN_OPTION='--login' || LOGIN_OPTION=""
2024-10-05 14:47:09 -07:00
exec ${pkgs.fish}/bin/fish $LOGIN_OPTION
fi
'';
};
2025-03-31 13:37:38 -07:00
security.pam.services.sudo_local = {
enable = true;
reattach = true;
touchIdAuth = true;
};
2024-09-27 15:09:44 -07:00
# set some OSX preferences that I always end up hunting down and changing.
2025-04-19 21:57:56 -07:00
system = {
# Used for backwards compatibility, please read the changelog before changing.
# $ darwin-rebuild changelog
stateVersion = 6;
defaults = {
LaunchServices = {
LSQuarantine = false;
};
NSGlobalDomain = {
AppleShowAllExtensions = true;
ApplePressAndHoldEnabled = false;
# 120, 90, 60, 30, 12, 6, 2
KeyRepeat = 2;
# 120, 94, 68, 35, 25, 15
InitialKeyRepeat = 15;
"com.apple.mouse.tapBehavior" = 1;
"com.apple.sound.beep.volume" = 0.0;
"com.apple.sound.beep.feedback" = 0;
#Ew.
NSAutomaticCapitalizationEnabled = false;
NSAutomaticDashSubstitutionEnabled = false;
NSAutomaticInlinePredictionEnabled = false;
NSAutomaticPeriodSubstitutionEnabled = false;
NSAutomaticQuoteSubstitutionEnabled = false;
NSAutomaticSpellingCorrectionEnabled = false;
NSDisableAutomaticTermination = true;
NSDocumentSaveNewDocumentsToCloud = false;
AppleICUForce24HourTime = true;
};
# minimal dock
dock = {
autohide = true;
autohide-time-modifier = 0;
show-process-indicators = true;
2024-09-30 15:23:39 -07:00
2025-04-19 21:57:56 -07:00
expose-group-apps = true;
show-recents = true;
static-only = true;
mineffect = "scale";
orientation = "bottom";
2024-09-30 15:23:39 -07:00
};
2025-04-19 21:57:56 -07:00
# a finder that tells me what I want to know and lets me work
finder = {
_FXShowPosixPathInTitle = true;
FXDefaultSearchScope = "SCcf";
AppleShowAllExtensions = true;
ShowPathbar = true;
FXEnableExtensionChangeWarning = false;
};
CustomSystemPreferences = {
"com.apple.universalaccess" = {
closeViewTrackpadGestureZoomEnabled = 1;
};
};
};
keyboard = {
enableKeyMapping = true;
remapCapsLockToEscape = true;
2024-09-30 15:23:39 -07:00
};
2024-09-27 15:09:44 -07:00
};
}