config/hosts/laptop/configuration.nix

114 lines
3 KiB
Nix
Raw Normal View History

2025-04-21 13:04:42 -07:00
{pkgs, ...}: {
2025-04-18 15:55:34 -07:00
imports = [
2025-04-19 21:57:56 -07:00
../../modules/macos/homebrew.nix
2025-04-18 15:55:34 -07:00
];
2025-04-21 13:04:42 -07:00
environment.systemPackages = with pkgs; [
neovim
pinentry_mac
];
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
};
# When opening an interactive shell that isnt fish move into fish
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
'';
};
#Use touchid or watch to activate sudo
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 = {
# Turn quaranite off
2025-04-19 21:57:56 -07:00
LaunchServices = {
LSQuarantine = false;
};
NSGlobalDomain = {
# Show extensions in finder
2025-04-19 21:57:56 -07:00
AppleShowAllExtensions = true;
#Turn off the hold and press to input special chars
2025-04-19 21:57:56 -07:00
ApplePressAndHoldEnabled = false;
# 120, 90, 60, 30, 12, 6, 2
KeyRepeat = 2;
# 120, 94, 68, 35, 25, 15
InitialKeyRepeat = 15;
#Turn off beep noise in terminal
2025-04-19 21:57:56 -07:00
"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;
#instant hide and show
autohide-time-modifier = 0.0;
2025-04-19 21:57:56 -07:00
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;
# Scale instead of shrink
2025-04-19 21:57:56 -07:00
mineffect = "scale";
orientation = "bottom";
2024-09-30 15:23:39 -07:00
};
# Better finder settings
2025-04-19 21:57:56 -07:00
finder = {
_FXShowPosixPathInTitle = true;
FXDefaultSearchScope = "SCcf";
AppleShowAllExtensions = true;
ShowPathbar = true;
FXEnableExtensionChangeWarning = false;
};
CustomSystemPreferences = {
"com.apple.universalaccess" = {
closeViewTrackpadGestureZoomEnabled = 1;
};
};
};
# Bind caps to escape for better normal mode stuff
2025-04-19 21:57:56 -07:00
keyboard = {
enableKeyMapping = true;
remapCapsLockToEscape = true;
2024-09-30 15:23:39 -07:00
};
2024-09-27 15:09:44 -07:00
};
}