summaryrefslogtreecommitdiff
path: root/modules/system
diff options
context:
space:
mode:
authorSimon Holywell <simon@holywell.com.au>2019-11-04 14:06:54 +1000
committerSimon Holywell <simon@holywell.com.au>2019-11-04 14:35:21 +1000
commit626a112ce3c7a2c6944252d28bda930302bd6cd5 (patch)
tree3184fb6d979a73dc8d0aae403af29b06a8863db8 /modules/system
parent400a367d4ef48564cc85ce61c6d2e3f3a751b0d9 (diff)
adds com.apple.spaces
Diffstat (limited to 'modules/system')
-rw-r--r--modules/system/defaults-write.nix4
-rw-r--r--modules/system/defaults/spaces.nix20
2 files changed, 23 insertions, 1 deletions
diff --git a/modules/system/defaults-write.nix b/modules/system/defaults-write.nix
index bf9f2f4..d413dc5 100644
--- a/modules/system/defaults-write.nix
+++ b/modules/system/defaults-write.nix
@@ -29,6 +29,7 @@ let
alf = defaultsToList "/Library/Preferences/com.apple.alf" cfg.alf;
smb = defaultsToList "/Library/Preferences/SystemConfiguration/com.apple.smb.server" cfg.smb;
screencapture = defaultsToList "com.apple.screencapture" cfg.screencapture;
+ spaces = defaultsToList "com.apple.spaces" cfg.spaces;
trackpad = defaultsToList "com.apple.AppleMultitouchTrackpad" cfg.trackpad;
trackpadBluetooth = defaultsToList "com.apple.driver.AppleBluetoothMultitouch.trackpad" cfg.trackpad;
@@ -47,7 +48,7 @@ in
'';
system.activationScripts.userDefaults.text = mkIfAttrs
- [ NSGlobalDomain GlobalPreferences LaunchServices dock finder screencapture trackpad trackpadBluetooth ]
+ [ NSGlobalDomain GlobalPreferences LaunchServices dock finder screencapture spaces trackpad trackpadBluetooth ]
''
# Set defaults
echo >&2 "user defaults..."
@@ -58,6 +59,7 @@ in
${concatStringsSep "\n" dock}
${concatStringsSep "\n" finder}
${concatStringsSep "\n" screencapture}
+ ${concatStringsSep "\n" spaces}
${concatStringsSep "\n" trackpad}
${concatStringsSep "\n" trackpadBluetooth}
'';
diff --git a/modules/system/defaults/spaces.nix b/modules/system/defaults/spaces.nix
new file mode 100644
index 0000000..89308a0
--- /dev/null
+++ b/modules/system/defaults/spaces.nix
@@ -0,0 +1,20 @@
+{ config, lib, ... }:
+
+with lib;
+
+{
+ options = {
+ system.defaults.spaces.spans-displays = mkOption {
+ type = types.nullOr types.bool;
+ default = null;
+ description = ''
+ # Apple menu > System Preferences > Mission Control
+ Displays have separate Spaces (note a logout is required before
+ this setting will take affect).
+
+ false = each physical display has a separate space (Mac default)
+ true = one space spans across all physical displays
+ '';
+ };
+ };
+}