Personal Nix setup

Disable spotlight, fseventsd on macOS, and update trusted-users

Changed files
+14 -1
modules
+12
modules/base/macos.nix
···
system = {
primaryUser = "${user}";
+
activationScripts.postActivation.text = ''
+
# disable spotlight
+
launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist >/dev/null 2>&1 || true
+
# disable fseventsd on /nix volume
+
mkdir -p /nix/.fseventsd
+
test -e /nix/.fseventsd/no_log || touch /nix/.fseventsd/no_log
+
'';
+
keyboard = {
enableKeyMapping = true;
remapCapsLockToControl = true;
···
tilesize = 46;
mru-spaces = false;
};
+
LaunchServices.LSQuarantine = false;
NSGlobalDomain = {
+
AppleMeasurementUnits = "Centimeters";
+
AppleMetricUnits = 1;
+
AppleTemperatureUnit = "Celsius";
AppleShowAllExtensions = true;
InitialKeyRepeat = 10;
KeyRepeat = 2;
+2 -1
modules/base/nix-config.nix
···
-
{ lib, pkgs, inputs, helpers, config, ... }:
+
{ lib, pkgs, inputs, helpers, user, config, ... }:
with lib; mkMerge [
{
···
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
trusted-users = [ "root" "@wheel" ];
+
allowed-users = [ "root" "@wheel" "${user}" ];
# on Apple Silicon, Rosetta 2 allows for this
extra-platforms = mkIf (helpers.system == "aarch64-darwin") [ helpers.system "x86_64-darwin" ];
};