# Work machine darwin configuration # # This file contains nix-darwin settings specific to the work machine. # It sets up system-level configuration and integrates with home-manager. { config, pkgs, lib, username, ... }: { # Import darwin modules imports = [ ../../modules/darwin/homebrew.nix ]; # Nix configuration nix = { settings = { # Enable flakes and new nix command experimental-features = ["nix-command" "flakes"]; # Avoid unwanted garbage collection when using nix-direnv keep-outputs = true; keep-derivations = true; }; }; # Allow unfree packages nixpkgs.config.allowUnfree = true; # Set the primary user for this machine (required for homebrew and other user-specific options) system.primaryUser = username; users.users.${username} = { name = username; home = "/Users/${username}"; }; # System-level programs programs = { # Enable zsh as it's the default macOS shell zsh.enable = true; }; # Allow nix-darwin to manage /etc files that may already exist # These hashes are from the existing system files that nix-darwin will replace environment.etc = { bashrc.knownSha256Hashes = [ "8b5e3466922d1ae34bc145e21c7e53e7329a7a7b58b148b436bd954d5e651ac3" ]; zshrc.knownSha256Hashes = [ "cf0f7b7775b4c058d6085d9e7e57d58c307ca43730f8e4d921a9ef4e530e7e16" ]; }; # macOS system preferences will be configured in modules/darwin/system.nix # Homebrew configuration - shared and work casks (no personal casks) modules.homebrew = { enable = true; casks.enablePersonal = false; casks.enableWork = true; }; # Used for backwards compatibility, read the changelog before changing. # $ darwin-rebuild changelog system.stateVersion = 5; }