nixos/hosts/macbook/configuration.nix

92 lines
2.1 KiB
Nix
Raw Permalink Normal View History

{ self, pkgs, config, ... }: {
imports = [
../common/darwin
../../modules/common
./hotkeys.nix
];
# To reflect hotkeys without a login cycle.
system.activationScripts.postActivation.text = ''
sudo -u ${config.user.name} /System/Library/PrivateFrameworks/SystemAdministration.framework/Resources/activateSettings -u
'';
power.sleep.display = 10;
# Popups for special characters for some keys.
system.defaults.NSGlobalDomain.ApplePressAndHoldEnabled = false;
2025-05-03 23:42:03 -07:00
# List packages installed in system profile. To search by name, run:
# $ nix-env -qaP | grep wget
environment.systemPackages = with pkgs; [
neofetch
];
user.name = "jmug";
system.primaryUser = config.user.name;
2025-05-03 23:42:03 -07:00
homebrew = {
enable = true;
onActivation = {
autoUpdate = true;
cleanup = "uninstall";
upgrade = true;
};
caskArgs = {
no_quarantine = true;
};
brews = [
"raylib"
"watchman"
2025-09-05 18:52:47 -07:00
"vite"
2025-09-30 10:53:59 -07:00
"pipx"
"codex"
2025-05-03 23:42:03 -07:00
];
casks = [
"ghostty"
"kicad"
"secretive"
"gcc-arm-embedded" # Maybe defer this to individual porject flakes.
"karabiner-elements"
"raycast"
"logi-options+"
"insta360-link-controller"
"yubico-authenticator" # TODO: Defer to a module that manages yubikeys for darwin.
"google-chrome"
"nrf-connect"
"segger-jlink"
"docker-desktop"
"whatsapp"
2025-09-05 18:52:47 -07:00
"slack"
2025-09-30 10:53:59 -07:00
"discord"
2025-09-30 11:21:25 -07:00
"claude-code"
2025-05-03 23:42:03 -07:00
];
};
fonts.packages = with pkgs; [
nerd-fonts.bigblue-terminal
2025-05-03 23:42:03 -07:00
];
users.users.${config.user.name}.home = config.user.homeDirectory;
2025-05-03 23:42:03 -07:00
nixpkgs.config.allowUnfree = true;
programs.zsh.enable = true;
# Necessary for using flakes on this system.
nix.settings.experimental-features = "nix-command flakes";
# Set Git commit hash for darwin-version.
system.configurationRevision = self.rev or self.dirtyRev or null;
# Used for backwards compatibility, please read the changelog before changing.
# $ darwin-rebuild changelog
system.stateVersion = 6;
2025-05-03 23:42:03 -07:00
# The platform the configuration will be used on.
nixpkgs.hostPlatform = "aarch64-darwin";
}