Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .local-binaries.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
~/ghq/github.com/Dicklesworthstone/ultimate_bug_scanner/ubs
~/ghq/github.com/nwiizo/ccswarm/target/release/ccswarm
~/ghq/github.com/steveyegge/beads/bd
~/ghq/github.com/steveyegge/gastown
~/ghq/github.com/steveyegge/gastown/gt
52 changes: 30 additions & 22 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ help: ## Show this help message.
##@ General

.PHONY: install
install: setup nix-flake-update nix-build nix-switch shell-install ## Set up full environment (setup, flake-update, build, switch, shell-install).
install: setup nix-build nix-switch shell-install ## Set up full environment (setup, flake-update, build, switch, shell-install).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The comment for the install target is out of sync with its dependencies. It still mentions flake-update, but nix-flake-update has been removed from the target. Please update the comment to accurately reflect the target's behavior.

install: setup nix-build nix-switch shell-install ## Set up full environment (setup, build, switch, shell-install).

Copilot AI Jan 20, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The help comment for the install target mentions "flake-update" but the target definition no longer includes nix-flake-update (which was removed in this change). The comment should be updated to accurately reflect the current dependencies.

Suggested change
install: setup nix-build nix-switch shell-install ## Set up full environment (setup, flake-update, build, switch, shell-install).
install: setup nix-build nix-switch shell-install ## Set up full environment (setup, build, switch, shell-install).

Copilot uses AI. Check for mistakes.

.PHONY: build
build: nix-build ## Build Nix configuration.
Expand Down Expand Up @@ -159,26 +159,25 @@ sync: ## Sync dotagents (commands, skills, MCP configuration).
.PHONY: test
test: neovim-test shell-test ## Run all tests (neovim + shell).

.PHONY: update
update: nix-update shell-update neovim-update ## Update Nix flake and configurations.

##@ Upgrade
##@ Update

.PHONY: upgrade
upgrade: upgrade-overlays neovim-upgrade ## Upgrade overlays and Nix flake, then rebuild.
.PHONY: update
update: update-local-binaries ## Update local binaries

.PHONY: upgrade-overlays
upgrade-overlays: ## Upgrade all custom overlays to latest versions.
@echo "🔄 Upgrading custom overlays..."
.PHONY: update-local-binaries
update-local-binaries: ## Update and rebuild local binaries from .local-binaries.txt.
@echo "🔄 Updating local binaries..."
@if [ "$$CI" = "true" ] || [ "$$IN_DOCKER" = "true" ]; then \
echo "⏭️ Skipping overlay upgrade in CI/Docker"; \
echo "⏭️ Skipping local binaries update in CI/Docker"; \
else \
./scripts/upgrade-overlays.sh all; \
./scripts/update-local-binaries.sh; \
fi

.PHONY: upgrade-clawdbot
upgrade-clawdbot: ## Upgrade clawdbot overlay to latest release.
@./scripts/upgrade-overlays.sh clawdbot

##@ Upgrade

.PHONY: upgrade
upgrade: nix-upgrade overlays-upgrade neovim-upgrade ## Upgrade Nix flake, overlays, Neovim plugins

.PHONY: dev
dev: nix-develop ## Enter the Nix dev shell (alias for nix-develop).
Expand Down Expand Up @@ -249,8 +248,8 @@ nix-install: ## Install Nix if not already installed.

##@ Nix

.PHONY: nix-update
nix-update: nix-flake-update nix-build nix-switch ## Update Nix flake, build, and switch.
.PHONY: nix-upgrade
nix-upgrade: nix-flake-upgrade nix-build nix-switch ## Upgrade Nix flake, build, and switch.

.PHONY: nix-backup
nix-backup: ## Backup configuration files.
Expand Down Expand Up @@ -304,8 +303,8 @@ nix-flake-check: ## Check Nix flake configuration.
fi
@echo "✅ Nix flake check completed successfully"

.PHONY: nix-flake-update
nix-flake-update: nix-connect ## Update flake.lock file.
.PHONY: nix-flake-upgrade
nix-flake-upgrade: nix-connect ## Update flake.lock file.
@echo "♻️ Refreshing flake.lock file..."
@if [ "$$CI" = "true" ] || [ "$$IN_DOCKER" = "true" ] || [ "$$AUTOMATED_UPDATE" = "true" ]; then \
echo "Bypassing flake update in CI/Docker/automated update"; \
Expand Down Expand Up @@ -509,8 +508,6 @@ shell-install: ## Set up Fish shell as default shell.
echo "⚠️ Fish shell not found. Skipping Fish setup."; \
fi

.PHONY: shell-update
shell-update: shell-install ## Update Fish shell setup (alias for shell-install).

##@ Docker

Expand Down Expand Up @@ -756,7 +753,7 @@ shell-test-dev: ## Run shell tests inside the Nix dev shell (mirrors CI).
.PHONY: shell-check
shell-check: ## Run ShellCheck on shell scripts.
@echo "🔍 Running ShellCheck..."
@find . -name '*.sh' -not -path './node_modules/*' -not -path './.git/*' -not -path './result/*' -not -path './.venv/*' | xargs shellcheck
@find . -name '*.sh' -not -path './node_modules/*' -not -path './.git/*' -not -path './result/*' -not -path './.venv/*' -not -path './.claude/*' -not -path './dotagents/.claude/*' -not -path './dotagents/.codex/*' -print0 | xargs -0 shellcheck

.PHONY: shell-check-dev
shell-check-dev: ## Run ShellCheck inside the Nix dev shell (mirrors CI).
Expand All @@ -779,3 +776,14 @@ doppler-upload: ## Upload .env file to Doppler (dotfiles/prd).
@echo "🔐 Uploading .env to Doppler..."
@doppler secrets upload --project dotfiles --config prd .env
@echo "✅ .env uploaded to Doppler (dotfiles/prd)"

##@ Overlays

.PHONY: overlays-upgrade
overlays-upgrade: ## Upgrade all custom overlays to latest versions.
@echo "🔄 Upgrading custom overlays..."
@if [ "$$CI" = "true" ] || [ "$$IN_DOCKER" = "true" ]; then \
echo "⏭️ Skipping overlay upgrade in CI/Docker"; \
else \
./scripts/upgrade-overlays.sh all; \
fi
2 changes: 2 additions & 0 deletions home-manager/services/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ let
codeSyncer = import ./code-syncer { inherit pkgs; };
docker = import ./docker { inherit lib pkgs; };
dotfilesUpdater = import ./dotfiles-updater { inherit pkgs; };
makeUpdater = import ./make-updater { inherit pkgs; };
neversslKeepalive = import ./neverssl-keepalive { inherit pkgs; };
ollama = import ./ollama { inherit pkgs; };
sshAgent = import ./ssh-agent {
Expand All @@ -24,6 +25,7 @@ in
codeSyncer
docker
dotfilesUpdater
makeUpdater
neversslKeepalive
ollama
sshAgent
Expand Down
68 changes: 68 additions & 0 deletions home-manager/services/make-updater/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{ pkgs, ... }:
let
inherit (pkgs) lib;
in
{
launchd.agents.make-updater = lib.mkIf pkgs.stdenv.isDarwin {
enable = true;
config = {
ProgramArguments = [
"${pkgs.bash}/bin/bash"
"${./update.sh}"
];
Environment = {
PATH = "${
lib.makeBinPath [
pkgs.git
pkgs.bash
pkgs.coreutils

@cubic-dev-ai cubic-dev-ai Bot Jan 20, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: macOS launchd PATH omits sed/gnused, but make update requires sed, causing the mac updater to fail

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At home-manager/services/make-updater/default.nix, line 18:

<comment>macOS launchd PATH omits sed/gnused, but make update requires sed, causing the mac updater to fail</comment>

<file context>
@@ -0,0 +1,68 @@
+          lib.makeBinPath [
+            pkgs.git
+            pkgs.bash
+            pkgs.coreutils
+            pkgs.gnumake
+          ]
</file context>
Fix with Cubic

pkgs.gnumake
]
Comment on lines +15 to +20

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The launchd agent's PATH is missing dependencies required by the update script. The script may need to build Rust projects with cargo or clone repositories with ghq. This will fail if they are not in the PATH. Please add pkgs.rustc (for cargo) and pkgs.ghq to the lib.makeBinPath list.

          lib.makeBinPath [
            pkgs.bash
            pkgs.coreutils
            pkgs.ghq
            pkgs.git
            pkgs.gnumake
            pkgs.rustc
          ]

}:/opt/homebrew/bin:/usr/local/bin";

Copilot AI Jan 20, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Linux systemd service sets AUTOMATED_UPDATE=true but the macOS launchd service doesn't set this environment variable. This creates inconsistent behavior between platforms - on Linux, certain operations will be skipped (like flake updates per the Makefile logic) but on macOS they won't be. Consider setting this variable for both platforms or documenting why the difference is intentional.

Suggested change
}:/opt/homebrew/bin:/usr/local/bin";
}:/opt/homebrew/bin:/usr/local/bin";
AUTOMATED_UPDATE = "true";

Copilot uses AI. Check for mistakes.
};
StartInterval = 10800;
StandardOutPath = "/tmp/make-updater.log";
StandardErrorPath = "/tmp/make-updater.error.log";
};
};

systemd.user.services.make-updater = lib.mkIf pkgs.stdenv.isLinux {
Unit = {
Description = "Make update service";
};
Service = {
Type = "oneshot";
Environment = [
"PATH=${
lib.makeBinPath [
pkgs.bash
pkgs.coreutils
pkgs.curl
pkgs.gawk
pkgs.git
pkgs.gnumake
pkgs.gnused
pkgs.nix
pkgs.sudo
pkgs.which
]
Comment on lines +37 to +48

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The systemd service's PATH is missing dependencies required by the update script. The script may need to build Rust projects with cargo or clone repositories with ghq. This will fail if they are not in the PATH. Please add pkgs.rustc (for cargo) and pkgs.ghq to the lib.makeBinPath list.

          lib.makeBinPath [
            pkgs.bash
            pkgs.coreutils
            pkgs.curl
            pkgs.gawk
            pkgs.ghq
            pkgs.git
            pkgs.gnumake
            pkgs.gnused
            pkgs.nix
            pkgs.rustc
            pkgs.sudo
            pkgs.which
          ]

}"
"AUTOMATED_UPDATE=true"
];
ExecStart = "${./update.sh}";
};
};

systemd.user.timers.make-updater = lib.mkIf pkgs.stdenv.isLinux {
Unit = {
Description = "Timer for make update";
};
Timer = {
OnCalendar = "*-*-* 00/3:00:00";
Persistent = true;
};
Install = {
WantedBy = [ "timers.target" ];
};
};
}
7 changes: 7 additions & 0 deletions home-manager/services/make-updater/update.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

set -euo pipefail

cd ~/dotfiles

make update
Loading
Loading