Added: Darwin Config
This commit is contained in:
81
darwin/configuration.nix
Normal file
81
darwin/configuration.nix
Normal file
@@ -0,0 +1,81 @@
|
||||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [ ./yabari.nix ];
|
||||
# System configuration for Intel Mac
|
||||
nixpkgs.hostPlatform = "x86_64-darwin"; # Essential for Intel Macs :cite[1]:cite[2]:cite[5]
|
||||
|
||||
# Enable flakes and nix-command experimental features
|
||||
nix.settings.experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
]; # Essential for flake support :cite[2]:cite[5]:cite[7]
|
||||
|
||||
# System packages (installed system-wide)
|
||||
environment.systemPackages = with pkgs; [ ];
|
||||
|
||||
system.primaryUser = "dergrumpf";
|
||||
users.users.dergrumpf = {
|
||||
name = "dergrumpf";
|
||||
home = "/Users/dergrumpf"; # Must match home.homeDirectory in home.nix :cite[10]
|
||||
shell = pkgs.fish;
|
||||
};
|
||||
|
||||
# Shell configuration
|
||||
programs.zsh.enable = true; # Default shell on macOS :cite[5]:cite[10]
|
||||
# Alternative: enable fish if preferred
|
||||
programs.fish.enable = true;
|
||||
|
||||
# System defaults for macOS
|
||||
system.defaults = {
|
||||
# Dock settings
|
||||
dock.autohide = false; # Auto-hide the dock :cite[8]:cite[10]
|
||||
dock.orientation = "left"; # Position dock on left :cite[8]:cite[10]
|
||||
dock.show-recents = false; # Don't show recent applications :cite[8]:cite[10]
|
||||
dock.mru-spaces = false; # Don't rearrange spaces based on most recent use :cite[5]
|
||||
|
||||
# Finder settings
|
||||
finder.AppleShowAllExtensions = true; # Show all file extensions :cite[5]:cite[8]:cite[10]
|
||||
finder.FXEnableExtensionChangeWarning = false; # Disable extension change warning :cite[8]:cite[10]
|
||||
finder.FXPreferredViewStyle = "clmv"; # Use column view :cite[5]:cite[8]
|
||||
finder.ShowPathbar = true; # Show path bar :cite[8]:cite[10]
|
||||
finder.ShowStatusBar = true; # Show status bar :cite[8]
|
||||
|
||||
# Screenshot settings
|
||||
screencapture.location = "~/Pictures/screenshots"; # Save screenshots to specific location :cite[5]:cite[8]
|
||||
|
||||
# Global domain settings
|
||||
NSGlobalDomain.AppleKeyboardUIMode = 3; # Full keyboard control :cite[8]:cite[10]
|
||||
NSGlobalDomain."com.apple.keyboard.fnState" = true; # Function keys behave as F1-F12 :cite[10]
|
||||
};
|
||||
|
||||
# Touch ID for sudo authentication (if supported by hardware)
|
||||
security.pam.services.sudo_local.touchIdAuth = true; # Enable Touch ID for sudo :cite[5]:cite[8]
|
||||
|
||||
# Font configuration
|
||||
fonts.packages = with pkgs; [
|
||||
nerd-fonts.fira-code
|
||||
];
|
||||
|
||||
# Nix garbage collection (automatic cleanup)
|
||||
nix.gc = {
|
||||
automatic = true; # Enable automatic garbage collection :cite[8]
|
||||
interval = {
|
||||
# Run weekly on Sunday at 3:15 AM :cite[8]
|
||||
Hour = 3;
|
||||
Minute = 15;
|
||||
Weekday = 7;
|
||||
};
|
||||
options = "--delete-older-than 7d"; # Delete packages older than 7 days :cite[8]
|
||||
};
|
||||
|
||||
# System version (for backwards compatibility)
|
||||
system.stateVersion = 6; # Important for configuration compatibility :cite[5]:cite[10]
|
||||
|
||||
# Optional: Configuration revision for tracking changes
|
||||
system.configurationRevision = inputs.self.rev or inputs.self.dirtyRev or null; # Track git revision :cite[5]:cite[7]
|
||||
}
|
Reference in New Issue
Block a user