mirror of
https://github.com/LnL7/nix-darwin.git
synced 2025-03-28 10:47:19 +00:00
defaults-write: formatting
This commit is contained in:
parent
5851d9613e
commit
f07acb443a
1 changed files with 20 additions and 3 deletions
|
@ -37,13 +37,18 @@ let
|
|||
magicmouse = defaultsToList "com.apple.AppleMultitouchMouse" cfg.magicmouse;
|
||||
magicmouseBluetooth = defaultsToList "com.apple.driver.AppleMultitouchMouse.mouse" cfg.magicmouse;
|
||||
|
||||
mkIfAttrs = list: mkIf (any (attrs: attrs != {}) list);
|
||||
mkIfAttrs = list: mkIf (any (attrs: attrs != { }) list);
|
||||
in
|
||||
|
||||
{
|
||||
config = {
|
||||
|
||||
system.activationScripts.defaults.text = mkIfAttrs [ alf loginwindow smb SoftwareUpdate ]
|
||||
system.activationScripts.defaults.text = mkIfAttrs [
|
||||
alf
|
||||
loginwindow
|
||||
smb
|
||||
SoftwareUpdate
|
||||
]
|
||||
''
|
||||
# Set defaults
|
||||
echo >&2 "system defaults..."
|
||||
|
@ -54,7 +59,19 @@ in
|
|||
'';
|
||||
|
||||
system.activationScripts.userDefaults.text = mkIfAttrs
|
||||
[ NSGlobalDomain GlobalPreferences LaunchServices dock finder screencapture spaces trackpad trackpadBluetooth magicmouse magicmouseBluetooth ]
|
||||
[
|
||||
NSGlobalDomain
|
||||
GlobalPreferences
|
||||
LaunchServices
|
||||
dock
|
||||
finder
|
||||
screencapture
|
||||
spaces
|
||||
trackpad
|
||||
trackpadBluetooth
|
||||
magicmouse
|
||||
magicmouseBluetooth
|
||||
]
|
||||
''
|
||||
# Set defaults
|
||||
echo >&2 "user defaults..."
|
||||
|
|
Loading…
Add table
Reference in a new issue