From a586323a512bc6518ef3cafa48a347b25d3cad9f Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 3 Apr 2026 03:18:34 +0000 Subject: [PATCH 1/3] Reduce macOS menu bar icon spacing on Darwin hosts Adds defaults commands to the post-activation script to tighten spacing between status bar icons, fitting ~2x more items. https://claude.ai/code/session_01FcG93XXYtzuALiFgAnLp4Y --- nixos/modules/darwin/common.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nixos/modules/darwin/common.nix b/nixos/modules/darwin/common.nix index b80d7e4..1aebc2a 100644 --- a/nixos/modules/darwin/common.nix +++ b/nixos/modules/darwin/common.nix @@ -136,6 +136,11 @@ echo "NOTE: There are manual steps that may need to be applied for an initial setup." echo " See nixos/modules/darwin/README.md" echo "" + + # Reduce spacing between menu bar icons to fit more items + # https://news.ycombinator.com/item?id=47618946 + defaults -currentHost write -globalDomain NSStatusItemSpacing -int 2 + defaults -currentHost write -globalDomain NSStatusItemSelectionPadding -int 2 ''; # nix-darwin state version From 9477f2434d8bf4fb23f7f2dbd16d5ff5d4c74bf4 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 3 Apr 2026 03:21:07 +0000 Subject: [PATCH 2/3] Add Darwin configuration validation to CI Adds a validate-darwin job on macos-latest that dry-run builds the dungeon and moria Darwin configs, matching the existing NixOS validation pattern. https://claude.ai/code/session_01FcG93XXYtzuALiFgAnLp4Y --- .github/workflows/validate.yml | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index e655411..e1854f7 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -1,4 +1,4 @@ -name: Validate NixOS Configurations +name: Validate Nix Configurations on: push: @@ -51,3 +51,29 @@ jobs: run: | echo "Building home-lab..." nix build .#nixosConfigurations.home-lab.config.system.build.toplevel --dry-run + + validate-darwin: + name: Validate Darwin configurations + runs-on: macos-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install Nix + uses: cachix/install-nix-action@v30 + with: + nix_path: nixpkgs=channel:nixos-unstable + extra_nix_config: | + experimental-features = nix-command flakes + + - name: Validate dungeon + working-directory: nixos + run: | + echo "Building dungeon..." + nix build .#darwinConfigurations.dungeon.config.system.build.toplevel --dry-run + + - name: Validate moria + working-directory: nixos + run: | + echo "Building moria..." + nix build .#darwinConfigurations.moria.config.system.build.toplevel --dry-run From 835e31f2025c55954221c9eb5d1ec94ed1dfcd43 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 3 Apr 2026 03:25:59 +0000 Subject: [PATCH 3/3] Run Darwin CI only on PRs and add Nix store caching Skip the expensive macOS runner on pushes to master (already validated by the PR). Add magic-nix-cache-action to both jobs to cache the Nix store between runs, avoiding repeated downloads of flake inputs. https://claude.ai/code/session_01FcG93XXYtzuALiFgAnLp4Y --- .github/workflows/validate.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index e1854f7..5ac66e5 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -24,6 +24,9 @@ jobs: extra_nix_config: | experimental-features = nix-command flakes + - name: Cache Nix store + uses: DeterminateSystems/magic-nix-cache-action@v8 + - name: Run flake check working-directory: nixos run: nix flake check @@ -54,6 +57,7 @@ jobs: validate-darwin: name: Validate Darwin configurations + if: github.event_name == 'pull_request' runs-on: macos-latest steps: - name: Checkout repository @@ -66,6 +70,9 @@ jobs: extra_nix_config: | experimental-features = nix-command flakes + - name: Cache Nix store + uses: DeterminateSystems/magic-nix-cache-action@v8 + - name: Validate dungeon working-directory: nixos run: |