{ config, lib, pkgs, ... }: with lib; let cfg = config.roles.aerospace; in { options.roles.aerospace = { enable = mkEnableOption "AeroSpace window manager system configuration"; enableSpansDisplays = mkOption { type = types.bool; default = true; description = '' Configure macOS Spaces to span displays (required for aerospace multi-monitor support). When enabled, sets com.apple.spaces.spans-displays to true. ''; }; }; config = mkIf cfg.enable { # Configure spaces to span displays (required for aerospace multi-monitor support) system.defaults.CustomUserPreferences = mkIf cfg.enableSpansDisplays { "com.apple.spaces" = { spans-displays = true; }; }; }; }