Personal Nix setup
at main 1.9 kB view raw
1{ lib, pkgs, user, helpers, ... } @ inputs: 2 3with lib; 4helpers.darwinAttrs { 5 security.pam.services.sudo_local.touchIdAuth = true; 6 7 system = { 8 primaryUser = "${user}"; 9 10 activationScripts.postActivation.text = '' 11 # disable spotlight 12 launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist >/dev/null 2>&1 || true 13 # disable fseventsd on /nix volume 14 mkdir -p /nix/.fseventsd 15 test -e /nix/.fseventsd/no_log || touch /nix/.fseventsd/no_log 16 ''; 17 18 keyboard = { 19 enableKeyMapping = true; 20 remapCapsLockToControl = true; 21 nonUS.remapTilde = true; 22 }; 23 24 defaults = { 25 finder.CreateDesktop = false; 26 screencapture.location = "~/Screenshots"; 27 loginwindow = { 28 GuestEnabled = false; 29 DisableConsoleAccess = true; 30 }; 31 menuExtraClock = { 32 IsAnalog = true; 33 ShowAMPM = true; 34 ShowDayOfWeek = true; 35 ShowDate = 0; 36 }; 37 dock = { 38 autohide = true; 39 tilesize = 46; 40 mru-spaces = false; 41 }; 42 LaunchServices.LSQuarantine = false; 43 NSGlobalDomain = { 44 AppleMeasurementUnits = "Centimeters"; 45 AppleMetricUnits = 1; 46 AppleTemperatureUnit = "Celsius"; 47 AppleShowAllExtensions = true; 48 InitialKeyRepeat = 10; 49 KeyRepeat = 2; 50 AppleInterfaceStyle = "Dark"; 51 AppleShowScrollBars = "WhenScrolling"; 52 "com.apple.swipescrolldirection" = false; 53 }; 54 spaces.spans-displays = false; 55 56 CustomSystemPreferences = { 57 "com.apple.TimeMachine".DoNotOfferNewDisksForBackup = true; 58 "com.apple.ImageCapture".disableHotPlug = true; 59 "com.apple.gamed".Disabled = true; 60 "org.gpgtools.common".DisableKeychain = true; 61 "org.gpgtools.common".UseKeychain = false; 62 "com.apple.dt.XCode".IDEIndexDisable = 1; 63 }; 64 }; 65 }; 66}