Extract aerospace configuration into reusable modules
Create both home-manager and nix-darwin modules for aerospace window manager configuration, removing 110+ lines of duplicated config from machine-specific files. Changes: - Add home/modules/aerospace module with configurable leader key - Add modules/aerospace.nix for system-level macOS settings - Include autoraise configuration in home module - Update home-darwin-work.nix to use new modules - Update johno-macbookpro configuration to use system module - Remove inline aerospace/autoraise config and launchd agents
This commit is contained in:
30
modules/aerospace.nix
Normal file
30
modules/aerospace.nix
Normal file
@@ -0,0 +1,30 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.aerospace;
|
||||
in
|
||||
{
|
||||
options.services.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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user