Files
nix/hosts/darwin/default.nix
T
2026-07-15 16:01:21 -05:00

139 lines
3.5 KiB
Nix

{
pkgs,
config,
lib,
inputs,
...
}: {
/*
instructions for first time setup for macos here
1. install the nix package manager with: `sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install)`
2. install xcode tools with `xcode-select --install`
3. allow full disk access to terminal
4. xfer or git clone flake to ~/.nix
5. sign into icloud and by extension app store for mas
6. rename some shell rc files with `sudo mv /etc/bashrc /etc/bashrc.before-nix-darwin && sudo mv /etc/zshrc /etc/zshrc.before-nix-darwin`
7. install nix-darwin with: `nix run --extra-experimental-features "nix-command flakes" nix-darwin -- switch --flake ~/.nix#host`
8. nh should be installed now so enjoy and use `nh darwin switch`
*/
imports = [
];
# general macos system settings
# base system package install list
environment.systemPackages = with pkgs; [
wget
sl
curl
rsync
git
age
fzf
usbutils
pciutils
python3
lf
btop
pinentry_mac
];
users.users.bhelderman = {
home = "/Users/bhelderman";
# optional extras, e.g. shell, uid, etc.
};
# define home-manager user
home-manager = {
extraSpecialArgs = {inherit inputs;};
backupFileExtension = "bak";
useUserPackages = true;
useGlobalPkgs = false;
users = {
"bhelderman" = import ../../users/blake/home_darwin.nix;
};
};
# set timezone
time.timeZone = "America/Chicago";
# allow proprietary packages
nixpkgs.config.allowUnfree = true;
# enable flakes
nix.settings.experimental-features = ["nix-command" "flakes"];
system = {
stateVersion = 6;
defaults = {
trackpad = {
Clicking = true;
TrackpadThreeFingerDrag = true;
TrackpadFourFingerVertSwipeGesture = 2;
TrackpadRightClick = true;
TrackpadFourFingerHorizSwipeGesture = 2;
TrackpadPinch = true;
TrackpadRotate = true;
TrackpadTwoFingerDoubleTapGesture = true;
TrackpadTwoFingerFromRightEdgeSwipeGesture = 3;
};
universalaccess = {
mouseDriverCursorSize = 3.0;
};
NSGlobalDomain = {
AppleICUForce24HourTime = true;
AppleInterfaceStyle = "Dark";
NSAutomaticCapitalizationEnabled = false;
NSDocumentSaveNewDocumentsToCloud = false;
};
WindowManager = {
EnableStandardClickToShowDesktop = false;
GloballyEnabled = false; # disable stage manager
};
controlcenter = {
BatteryShowPercentage = true;
Bluetooth = true;
Display = false;
FocusModes = false;
NowPlaying = false;
Sound = false;
};
menuExtraClock = {
ShowDate = 1;
ShowDayOfWeek = true;
Show24Hour = true;
ShowSeconds = true;
};
dock = {
autohide = true;
largesize = 16;
mineffect = "genie";
minimize-to-application = true;
orientation = "bottom";
scroll-to-open = true;
show-recents = false;
showAppExposeGestureEnabled = true;
};
finder = {
AppleShowAllExtensions = true;
NewWindowTarget = "Home";
ShowPathbar = true;
ShowStatusBar = true;
};
hitoolbox.AppleFnUsageType = "Change Input Source";
iCal = {
"first day of week" = "Monday";
};
loginwindow = {
LoginwindowText = "howdy o/";
GuestEnabled = false;
};
screencapture.type = "png";
screensaver = {
askForPassword = true;
askForPasswordDelay = 15;
};
};
};
}