nix-config/modules/mac.nix

89 lines
1.9 KiB
Nix
Raw Normal View History

{ config, pkgs, lib, ... }: {
nix = {
package = pkgs.nix;
extraOptions = ''
system = aarch64-darwin # M1 gang
extra-platforms = aarch64-darwin x86_64-darwin # But we use rosetta too
experimental-features = nix-command flakes
build-users-group = nixbld
'';
};
fonts = {
2022-09-19 07:23:26 +00:00
fontDir.enable = false;
fonts = with pkgs; [
fira
fira-code
roboto
roboto-mono
];
};
2022-09-20 19:14:28 +00:00
users.users."larstvei".home = "/Users/larstvei";
programs.fish.enable = true;
system.activationScripts.postActivation.text = ''
# Set the default shell as fish for the user. MacOS doesn't do this like nixOS does
sudo chsh -s ${lib.getBin pkgs.fish}/bin/fish larstvei
'';
networking.hostName = "macbookpro";
2022-09-19 14:54:39 +00:00
system = {
stateVersion = 4;
keyboard = {
enableKeyMapping = true;
remapCapsLockToControl = true;
};
2022-09-19 14:54:39 +00:00
defaults = {
screencapture = { location = "/tmp"; };
dock = {
autohide = true;
showhidden = true;
mru-spaces = false;
};
finder = {
AppleShowAllExtensions = true;
QuitMenuItem = true;
FXEnableExtensionChangeWarning = true;
};
2022-09-19 14:54:39 +00:00
NSGlobalDomain = {
AppleKeyboardUIMode = 3;
ApplePressAndHoldEnabled = false;
AppleFontSmoothing = 1;
_HIHideMenuBar = true;
InitialKeyRepeat = 15;
KeyRepeat = 1;
"com.apple.mouse.tapBehavior" = 1;
"com.apple.swipescrolldirection" = true;
};
};
};
homebrew = {
enable = true;
onActivation = {
upgrade = true;
cleanup = "uninstall";
};
taps = [ "homebrew/cask" ];
casks = [
"amethyst"
2022-12-21 17:49:44 +00:00
"dropbox"
2022-12-23 17:04:41 +00:00
"expressvpn"
"google-chrome"
2022-12-23 17:04:41 +00:00
"iina"
2023-02-10 16:52:00 +00:00
"karabiner-elements"
"mactex"
2023-01-30 22:34:25 +00:00
"orion"
"raycast"
"remarkable"
2023-02-18 19:44:39 +00:00
"signal"
2023-04-30 12:16:08 +00:00
"zoom"
];
};
}