From 405af3517e735f9769868e579f3c3fd963ec68b3 Mon Sep 17 00:00:00 2001 From: arnie Date: Thu, 21 Aug 2025 11:31:24 +0200 Subject: [PATCH] Fix nix darwin activation script after update --- darwin/common.nix | 6 ------ darwin/lcech-mac-veracode.nix | 9 +++++++++ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/darwin/common.nix b/darwin/common.nix index ed858b2..bad38ea 100644 --- a/darwin/common.nix +++ b/darwin/common.nix @@ -94,12 +94,6 @@ in # $ darwin-rebuild changelog system.stateVersion = 5; - system.activationScripts.postUserActivation.text = '' - # activateSettings -u will reload the settings from the database and apply them to the current session, - # so we do not need to logout and login again to make the changes take effect. - /System/Library/PrivateFrameworks/SystemAdministration.framework/Resources/activateSettings -u - ''; - system.defaults = { dock = { autohide = true; diff --git a/darwin/lcech-mac-veracode.nix b/darwin/lcech-mac-veracode.nix index 082b936..4ea8c5b 100644 --- a/darwin/lcech-mac-veracode.nix +++ b/darwin/lcech-mac-veracode.nix @@ -13,6 +13,15 @@ "wireshark-chmodbpf" ]; + system.primaryUser = "lcech"; + + system.activationScripts.postActivation.text = '' + # activateSettings -u will reload the settings from the database and apply them to the current session, + # so we do not need to logout and login again to make the changes take effect. + defaults write -g 'com.apple.mouse.linear' 1 + sudo -u lcech /System/Library/PrivateFrameworks/SystemAdministration.framework/Resources/activateSettings -u + ''; + system.defaults.dock.persistent-apps = [ "/Applications/Cursor.app" "/Applications/Firefox.app"