From 385fd798de00cb23f94187e5dd28c322307cd953 Mon Sep 17 00:00:00 2001 From: John Ogle Date: Tue, 2 Dec 2025 15:16:55 -0800 Subject: [PATCH] Fix aerospace namespace conflict and claude-code override Rename custom aerospace module from services.aerospace to roles.aerospace to avoid conflicting with nix-darwin's built-in aerospace service support. Move claude-code package override to flake-level overlay to ensure the GCS-distributed version is used instead of the npm registry version in unstable. This is necessary for corporate environments where npm registry access may be blocked. --- flake.nix | 7 +++++++ machines/johno-macbookpro/configuration.nix | 7 ++++--- modules/aerospace.nix | 4 ++-- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/flake.nix b/flake.nix index 5808902..4d47f72 100644 --- a/flake.nix +++ b/flake.nix @@ -110,6 +110,13 @@ unstable = import nixpkgs-unstable { system = prev.system; config.allowUnfree = true; + overlays = [ + # Override claude-code in unstable to use our custom GCS-based build + # (needed for corporate networks that block npm registry) + (ufinal: uprev: { + claude-code = prev.custom.claude-code or (prev.callPackage ./packages {}).claude-code; + }) + ]; }; custom = prev.callPackage ./packages {}; # Compatibility: bitwarden renamed to bitwarden-desktop in unstable diff --git a/machines/johno-macbookpro/configuration.nix b/machines/johno-macbookpro/configuration.nix index d396bfb..56672d3 100644 --- a/machines/johno-macbookpro/configuration.nix +++ b/machines/johno-macbookpro/configuration.nix @@ -18,10 +18,11 @@ NSGlobalDomain.AppleShowAllExtensions = true; }; - # Enable aerospace system settings - services.aerospace = { + # Enable our custom aerospace system configuration + # (separate from nix-darwin's services.aerospace which manages the service) + roles.aerospace = { enable = true; - enableSpansDisplays = true; # Default, but shown for clarity + enableSpansDisplays = true; }; # TODO: Find a way to not duplicate this diff --git a/modules/aerospace.nix b/modules/aerospace.nix index b0d5d2c..f800a91 100644 --- a/modules/aerospace.nix +++ b/modules/aerospace.nix @@ -3,10 +3,10 @@ with lib; let - cfg = config.services.aerospace; + cfg = config.roles.aerospace; in { - options.services.aerospace = { + options.roles.aerospace = { enable = mkEnableOption "AeroSpace window manager system configuration"; enableSpansDisplays = mkOption {