Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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 config/amp/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{ config, ... }:
{
xdg.configFile."amp/settings.json" = {
source = config.lib.file.mkOutOfStoreSymlink ./settings.json;
source = ./settings.json;
};
}
4 changes: 2 additions & 2 deletions config/cliproxyapi/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
{
# Template config - the service wrapper injects secrets and writes to config.yaml
home.file.".cli-proxy-api/config.template.yaml" = {
source = config.lib.file.mkOutOfStoreSymlink ./config.template.yaml;
source = ./config.template.yaml;
force = true;
};
# Example config - required by cliproxyapi's object-backed config bootstrap

Copilot AI Jan 28, 2026

Copy link

Choose a reason for hiding this comment

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

The comment says this is an "Example config", but the source is ./config.template.yaml and there is no separate example file in this directory. Either update the comment to reflect that this is intentionally the template, or add a real config.example.yaml and source that instead.

Suggested change
# Example config - required by cliproxyapi's object-backed config bootstrap
# Example config (intentionally copied from config.template.yaml) - required by cliproxyapi's object-backed config bootstrap

Copilot uses AI. Check for mistakes.
home.file.".cli-proxy-api/config.example.yaml" = {
source = config.lib.file.mkOutOfStoreSymlink ./config.template.yaml;
source = ./config.template.yaml;
force = true;
};
}
2 changes: 1 addition & 1 deletion config/codex/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ config, ... }:
{
home.file.".codex/config.toml" = {
source = config.lib.file.mkOutOfStoreSymlink ./config.toml;
source = ./config.toml;
force = true;
};
}
2 changes: 1 addition & 1 deletion config/crush/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ config, ... }:
{
home.file.".config/crush/crush.json" = {
source = config.lib.file.mkOutOfStoreSymlink ./crush.json;
source = ./crush.json;
force = true;
};
}
2 changes: 1 addition & 1 deletion config/direnv/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ config, ... }:
{
home.file.".config/direnv/direnvrc" = {
source = config.lib.file.mkOutOfStoreSymlink ./direnvrc;
source = ./direnvrc;
force = true;
};
}
2 changes: 1 addition & 1 deletion config/factory/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ config, ... }:
{
home.file.".factory/config.json" = {
source = config.lib.file.mkOutOfStoreSymlink ./config.json;
source = ./config.json;
force = true;
};
}
2 changes: 1 addition & 1 deletion config/ghostty/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{ config, ... }:
{
xdg.configFile."ghostty/config" = {
source = config.lib.file.mkOutOfStoreSymlink ./config;
source = ./config;
};
}
2 changes: 1 addition & 1 deletion config/hammerspoon/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ config, ... }:
{
home.file.".hammerspoon/init.lua" = {
source = config.lib.file.mkOutOfStoreSymlink ./init.lua;
source = ./init.lua;
force = true;
};
}
2 changes: 1 addition & 1 deletion config/jj/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{ config, ... }:
{
xdg.configFile."jj/config.toml" = {
source = config.lib.file.mkOutOfStoreSymlink ./config.toml;
source = ./config.toml;
};
}
2 changes: 1 addition & 1 deletion config/k3s/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{
# k3s config file stored in home directory
home.file.".config/k3s/config.yaml" = lib.mkIf pkgs.stdenv.isLinux {
source = config.lib.file.mkOutOfStoreSymlink ./config.yaml;
source = ./config.yaml;
force = true;
};

Expand Down
8 changes: 4 additions & 4 deletions config/llm/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@
{
home.file."Library/Application Support/io.datasette.llm/extra-openai-models.yaml" = {
enable = pkgs.stdenv.isDarwin;
source = config.lib.file.mkOutOfStoreSymlink ./extra-openai-models.yaml;
source = ./extra-openai-models.yaml;
force = true;
};

home.file."Library/Application Support/io.datasette.llm/default_model.txt" = {
enable = pkgs.stdenv.isDarwin;
source = config.lib.file.mkOutOfStoreSymlink ./default_model.txt;
source = ./default_model.txt;
force = true;
};

home.file.".config/io.datasette.llm/extra-openai-models.yaml" = {
enable = pkgs.stdenv.isLinux;
source = config.lib.file.mkOutOfStoreSymlink ./extra-openai-models.yaml;
source = ./extra-openai-models.yaml;
force = true;
};

home.file.".config/io.datasette.llm/default_model.txt" = {
enable = pkgs.stdenv.isLinux;
source = config.lib.file.mkOutOfStoreSymlink ./default_model.txt;
source = ./default_model.txt;
force = true;
};
}
2 changes: 1 addition & 1 deletion config/opencode/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ config, ... }:
{
home.file.".config/opencode/opencode.jsonc" = {
source = config.lib.file.mkOutOfStoreSymlink ./opencode.jsonc;
source = ./opencode.jsonc;
force = true;
};
}
6 changes: 3 additions & 3 deletions config/pi/default.nix
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{ config, ... }:
{
home.file.".pi/agent/models.json" = {
source = config.lib.file.mkOutOfStoreSymlink ./models.json;
source = ./models.json;
force = true;
};
home.file.".pi/agent/settings.json" = {
source = config.lib.file.mkOutOfStoreSymlink ./settings.json;
source = ./settings.json;
force = true;
};
home.file.".pi/agent/keybindings.json" = {
source = config.lib.file.mkOutOfStoreSymlink ./keybindings.json;
source = ./keybindings.json;
force = true;
};
}
2 changes: 1 addition & 1 deletion config/serena/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ config, ... }:
{
home.file.".serena/serena_config.yml" = {
source = config.lib.file.mkOutOfStoreSymlink ./serena_config.yml;
source = ./serena_config.yml;
force = true;
};
}
2 changes: 1 addition & 1 deletion config/starship/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ config, ... }:
{
home.file.".config/starship.toml" = {
source = config.lib.file.mkOutOfStoreSymlink ./starship.toml;
source = ./starship.toml;
force = true;
};
Comment on lines 3 to 6

Copilot AI Jan 28, 2026

Copy link

Choose a reason for hiding this comment

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

PR title suggests this change is about a Go path rename, but this file change is part of a broader sweep replacing mkOutOfStoreSymlink with direct source = ./... across many modules. Consider updating the PR title/description to reflect the larger scope (or splitting into separate PRs) to make review and rollback safer.

Copilot uses AI. Check for mistakes.
}
4 changes: 2 additions & 2 deletions config/zellij/default.nix
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{ config, ... }:
{
xdg.configFile."zellij/config.kdl" = {
source = config.lib.file.mkOutOfStoreSymlink ./config.kdl;
source = ./config.kdl;
};
xdg.configFile."zellij/layouts/primary.kdl" = {
source = config.lib.file.mkOutOfStoreSymlink ./layouts/primary.kdl;
source = ./layouts/primary.kdl;
};
}
2 changes: 1 addition & 1 deletion home-manager/programs/fish/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@

xdg.configFile = {
"fish/themes/dracula.theme".source = ./dracula.theme;
"fish/completions".source = config.lib.file.mkOutOfStoreSymlink ./completions;
"fish/completions".source = ./completions;

Copilot AI Jan 28, 2026

Copy link

Choose a reason for hiding this comment

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

xdg.configFile."fish/completions".source points to a directory, but this entry doesn’t set recursive = true. Home Manager typically errors when a directory is used as a source without recursive. Add recursive = true (or revert to an approach that results in a single-file symlink) so the activation/build succeeds.

Suggested change
"fish/completions".source = ./completions;
"fish/completions" = {
source = ./completions;
recursive = true;
};

Copilot uses AI. Check for mistakes.
}
// lib.listToAttrs (
map
Expand Down
2 changes: 1 addition & 1 deletion home-manager/programs/neovim/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ in
};

home.file.".config/nvim/init.lua" = {
source = config.lib.file.mkOutOfStoreSymlink nvimInitLua;
source = nvimInitLua;
force = true;
};

Expand Down
2 changes: 1 addition & 1 deletion home-manager/programs/ssh/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ config, ... }:
{
home.file.".ssh/rc" = {
source = config.lib.file.mkOutOfStoreSymlink ./rc;
source = ./rc;
force = true;
};
programs.ssh = {
Expand Down
10 changes: 9 additions & 1 deletion nix-darwin/config/system.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,19 @@
{
ids.gids.nixbld = 350;

# Set SHELL environment variable for GUI applications
# Set environment variables for GUI applications (VS Code, etc.)
launchd.user.envVariables = {
SHELL = "${pkgs.bash}/bin/bash";
GOROOT = "/etc/go-root";
GOPATH = "/Users/${username}/go";
PATH = "/Users/${username}/go/bin:/etc/profiles/per-user/${username}/bin:/run/current-system/sw/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin";

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

Hardcoding the PATH variable is brittle and can lead to issues on different system architectures. For instance, this PATH is missing /opt/homebrew/bin, which is the standard location for Homebrew on Apple Silicon (aarch64) Macs. This could cause tools installed via Homebrew to be unavailable in GUI applications.

I suggest making the PATH definition more robust by conditionally including the Homebrew path for aarch64 systems. While it's generally best to avoid hardcoded paths in Nix, this change would at least account for different architectures.

    PATH = "/Users/${username}/go/bin:/etc/profiles/per-user/${username}/bin:/run/current-system/sw/bin" + (if pkgs.stdenv.isAarch64 then ":/opt/homebrew/bin" else "") + ":/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin";

};
Comment on lines +12 to 15

Copilot AI Jan 28, 2026

Copy link

Choose a reason for hiding this comment

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

This sets PATH explicitly for all GUI apps via launchd, which overwrites any existing PATH from the system/user environment. This is brittle (e.g., can drop paths like Homebrew’s /opt/homebrew/bin on Apple Silicon) and can cause GUI/terminal PATH divergence. Prefer constructing PATH from the existing system paths (or using nix-darwin’s path/systemPath mechanisms) rather than hardcoding a full PATH here.

Copilot uses AI. Check for mistakes.
Comment on lines +9 to 15

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

cat -n nix-darwin/config/system.nix

Repository: shunkakinoki/dotfiles

Length of output: 3109


🏁 Script executed:

# Search for Homebrew references in the repository
rg -i homebrew --type nix -A 2 -B 2 | head -100

Repository: shunkakinoki/dotfiles

Length of output: 6027


🏁 Script executed:

# Look for shell configuration files
fd -e "zshrc|bashrc|profile|shellrc" . | head -20

Repository: shunkakinoki/dotfiles

Length of output: 47


🏁 Script executed:

# Check if there's a home-manager config or other shell init
rg "shell\s*=" --type nix -A 3 | head -100

Repository: shunkakinoki/dotfiles

Length of output: 302


🏁 Script executed:

cat -n nix-darwin/config/homebrew.nix

Repository: shunkakinoki/dotfiles

Length of output: 3214


Add Homebrew paths to GUI PATH for consistency with shell environment.

launchd.user.envVariables.PATH omits /opt/homebrew/bin and /opt/homebrew/sbin, while your shell init files explicitly add them. This means GUI applications (like VS Code) will have a different PATH than your shell sessions, preventing them from accessing Homebrew-installed tools even though they're available in terminal sessions.

Suggested adjustment
-    PATH = "/Users/${username}/go/bin:/etc/profiles/per-user/${username}/bin:/run/current-system/sw/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin";
+    PATH = "/Users/${username}/go/bin:/etc/profiles/per-user/${username}/bin:/run/current-system/sw/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# Set environment variables for GUI applications (VS Code, etc.)
launchd.user.envVariables = {
SHELL = "${pkgs.bash}/bin/bash";
GOROOT = "/etc/go-root";
GOPATH = "/Users/${username}/go";
PATH = "/Users/${username}/go/bin:/etc/profiles/per-user/${username}/bin:/run/current-system/sw/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin";
};
# Set environment variables for GUI applications (VS Code, etc.)
launchd.user.envVariables = {
SHELL = "${pkgs.bash}/bin/bash";
GOROOT = "/etc/go-root";
GOPATH = "/Users/${username}/go";
PATH = "/Users/${username}/go/bin:/etc/profiles/per-user/${username}/bin:/run/current-system/sw/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin";
};
🤖 Prompt for AI Agents
In `@nix-darwin/config/system.nix` around lines 9 - 15,
launchd.user.envVariables.PATH is missing Homebrew locations so GUI apps get a
different PATH; update the PATH value in launchd.user.envVariables to include
/opt/homebrew/bin and /opt/homebrew/sbin (preferably prepended or included
alongside the existing entries) while keeping the existing per-user
/Users/${username}/go and /etc/per-user entries and the ${username} expansion
intact so GUI apps like VS Code see the same Homebrew tools as your shell.


environment.etc."go-root".source = "${pkgs.go}/share/go";

# Avoid nixpkgs options.json warning during docs generation.
documentation.enable = false;
Comment on lines +19 to +20

Copilot AI Jan 28, 2026

Copy link

Choose a reason for hiding this comment

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

documentation.enable = false; globally disables documentation generation/installation for this nix-darwin system, which can remove manpages/docs for interactive use. If the intent is only to silence a docs-generation warning in CI, consider gating this on the relevant build context (e.g., runner/CI) or addressing the underlying warning instead of disabling docs unconditionally.

Copilot uses AI. Check for mistakes.

system = {
stateVersion = 4;
primaryUser = username;
Expand Down
Loading