90 lines
2.1 KiB
Nix
90 lines
2.1 KiB
Nix
# This is your nix-darwin configuration for macOS
|
|
# Use this to configure your macOS system environment
|
|
{
|
|
inputs,
|
|
lib,
|
|
config,
|
|
pkgs,
|
|
...
|
|
}: {
|
|
# You can import other darwin modules here
|
|
imports = [
|
|
# Shared configuration between NixOS and nix-darwin
|
|
../common.nix
|
|
|
|
# If you want to use modules your own flake exports (from modules/darwin):
|
|
# inputs.self.darwinModules.example
|
|
|
|
# You can also split up your configuration and import pieces of it here:
|
|
# ./brew.nix
|
|
# ./defaults.nix
|
|
];
|
|
|
|
# macOS-specific Nix settings (common.nix has the shared ones)
|
|
# Any darwin-specific nix configuration can go here
|
|
|
|
# Auto upgrade nix package and the daemon service
|
|
services.nix-daemon.enable = true;
|
|
|
|
# Necessary for using flakes on this system
|
|
nix.package = pkgs.nix;
|
|
|
|
# TODO: Set your hostname
|
|
networking.hostName = "your-hostname";
|
|
networking.computerName = "your-hostname";
|
|
|
|
# Create /etc/zshrc that loads the nix-darwin environment
|
|
programs.zsh.enable = true;
|
|
programs.fish.enable = true;
|
|
|
|
# Used for backwards compatibility, please read the changelog before changing
|
|
# $ darwin-rebuild changelog
|
|
system.stateVersion = 4;
|
|
|
|
# The platform the configuration will be used on
|
|
nixpkgs.hostPlatform = "aarch64-darwin"; # or "x86_64-darwin"
|
|
|
|
# TODO: Configure your system-wide user settings (groups, etc)
|
|
users.users.your-username = {
|
|
name = "your-username";
|
|
home = "/Users/your-username";
|
|
};
|
|
|
|
# System-wide packages
|
|
environment.systemPackages = with pkgs; [
|
|
vim
|
|
];
|
|
|
|
# macOS system defaults
|
|
system.defaults = {
|
|
dock = {
|
|
autohide = true;
|
|
orientation = "bottom";
|
|
showhidden = true;
|
|
mru-spaces = false;
|
|
};
|
|
|
|
finder = {
|
|
AppleShowAllExtensions = true;
|
|
FXEnableExtensionChangeWarning = false;
|
|
_FXShowPosixPathInTitle = true;
|
|
};
|
|
|
|
NSGlobalDomain = {
|
|
AppleShowAllExtensions = true;
|
|
InitialKeyRepeat = 14;
|
|
KeyRepeat = 1;
|
|
};
|
|
};
|
|
|
|
# Keyboard and trackpad settings
|
|
system.keyboard = {
|
|
enableKeyMapping = true;
|
|
remapCapsLockToControl = true;
|
|
};
|
|
|
|
# Security
|
|
security.pam.enableSudoTouchIdAuth = true;
|
|
}
|
|
|