Split configuration into reusable modules

This commit is contained in:
2026-03-29 11:50:03 +02:00
parent 5a8f0aa4df
commit 58fb358955
7 changed files with 40 additions and 25 deletions

View File

@@ -0,0 +1,58 @@
{ pkgs, primaryUser, ... }:
{
nixpkgs.config.allowUnfree = true;
system.primaryUser = primaryUser;
users.users.${primaryUser} = {
home = "/Users/${primaryUser}";
shell = pkgs.zsh;
};
security.pam.services.sudo_local.touchIdAuth = true;
system = {
startup.chime = false;
defaults = {
loginwindow = {
GuestEnabled = false;
DisableConsoleAccess = true;
};
finder = {
AppleShowAllFiles = true; # hidden files
AppleShowAllExtensions = true; # file extensions
_FXShowPosixPathInTitle = true; # title bar full path
ShowPathbar = true; # breadcrumb nav at bottom
ShowStatusBar = true; # file count & disk space
};
NSGlobalDomain = {
NSAutomaticSpellingCorrectionEnabled = false;
NSAutomaticCapitalizationEnabled = false;
NSAutomaticPeriodSubstitutionEnabled = false;
NSAutomaticWindowAnimationsEnabled = false;
};
};
};
# Create /etc/zshrc that loads the nix-darwin environment.
programs.zsh.enable = true;
nix-homebrew = {
# Initial install of homebrew.
enable = true;
user = primaryUser;
autoMigrate = true;
};
homebrew = {
enable = true;
onActivation = {
cleanup = "zap";
autoUpdate = false;
upgrade = true;
};
};
system.stateVersion = 6; # Never change.
}