Skip to content

Comments

feat: introduce nix-darwin again#334

Merged
himkt merged 97 commits intomainfrom
feat/dotfiles-integration
Feb 18, 2026
Merged

feat: introduce nix-darwin again#334
himkt merged 97 commits intomainfrom
feat/dotfiles-integration

Conversation

@himkt
Copy link
Owner

@himkt himkt commented Feb 17, 2026

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 42 out of 74 changed files in this pull request and generated 17 comments.

Comments suppressed due to low confidence (3)

home/modules/ghostty/files/config:21

  • Font size has been changed from 16 to 11. This is a significant reduction that may make text harder to read. While this might be intentional, such a dramatic change should be noted and verified to ensure it's not an accidental typo (e.g., missing a '1' to make it '11' instead of intended '16').
    home/modules/nvim/files/vimrc:147
  • These hardcoded paths to $HOME/dotfiles/home/modules/nvim/files/template.d/ won't work in a Nix environment where the configuration files are stored in the Nix store, not in the user's dotfiles directory. The template files should either be copied to a known location in the user's home directory via home.file, or the paths should reference $XDG_CONFIG_HOME or a similar variable that can be set appropriately.
    home/modules/zsh/files/zshrc:7
  • The tmux auto-start logic at the beginning of zshrc will create a tmux session for every new shell, including shells started within tmux. This could cause issues with nested tmux sessions or prevent the shell from working correctly in certain contexts. Consider adding additional checks or making this opt-in via an environment variable.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -0,0 +1 @@
python-preference = "managed"
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

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

The python-preference value has changed from "only-managed" (in the deleted file) to "managed". While both are valid values for uv configuration, this is a behavior change. "only-managed" restricts to only uv-managed Python installations, while "managed" prefers managed installations but can fall back to system Python. This should be intentional.

Copilot uses AI. Check for mistakes.
Comment on lines +13 to +21
settings = {
user = {
name = "himkt";
email = "himkt@klis.tsukuba.ac.jp";
};
credential."https://github.com" = {
helper = "!gh auth git-credential";
};
};
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

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

The attribute name should be extraConfig instead of settings for programs.git in home-manager. The correct attribute for git configuration is extraConfig, not settings. This will cause the configuration to fail when applied.

Copilot uses AI. Check for mistakes.
Comment on lines +18 to +45
in
{
programs.gcc = {
enable = true;
package = pkgs.gcc;
colors = {
error = "${bold};${materialColors.red}";
warning = "${bold};${materialColors.amber}";
note = "${bold};${materialColors.blue}";
locus = materialColors.gray;
quote = materialColors.gray;
path = materialColors.cyan;
range1 = materialColors.green;
range2 = materialColors.blue;
fixit-insert = materialColors.green;
fixit-delete = materialColors.red;
diff-filename = "${bold};${materialColors.blue}";
diff-hunk = materialColors.purple;
diff-delete = materialColors.red;
diff-insert = materialColors.green;
type-diff = "${bold};${materialColors.purple}";
fnname = "${bold};${materialColors.green}";
targs = materialColors.purple;
valid = materialColors.green;
invalid = materialColors.red;
highlight-a = "${bold};${materialColors.blue}";
highlight-b = "${bold};${materialColors.amber}";
};
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

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

There is no programs.gcc option in home-manager or NixOS. This appears to be attempting to configure GCC diagnostics colors, but the correct way to do this would be through environment variables like GCC_COLORS, not through a programs.gcc option. This configuration will fail when applied.

Suggested change
in
{
programs.gcc = {
enable = true;
package = pkgs.gcc;
colors = {
error = "${bold};${materialColors.red}";
warning = "${bold};${materialColors.amber}";
note = "${bold};${materialColors.blue}";
locus = materialColors.gray;
quote = materialColors.gray;
path = materialColors.cyan;
range1 = materialColors.green;
range2 = materialColors.blue;
fixit-insert = materialColors.green;
fixit-delete = materialColors.red;
diff-filename = "${bold};${materialColors.blue}";
diff-hunk = materialColors.purple;
diff-delete = materialColors.red;
diff-insert = materialColors.green;
type-diff = "${bold};${materialColors.purple}";
fnname = "${bold};${materialColors.green}";
targs = materialColors.purple;
valid = materialColors.green;
invalid = materialColors.red;
highlight-a = "${bold};${materialColors.blue}";
highlight-b = "${bold};${materialColors.amber}";
};
gccColors = {
error = "${bold};${materialColors.red}";
warning = "${bold};${materialColors.amber}";
note = "${bold};${materialColors.blue}";
locus = materialColors.gray;
quote = materialColors.gray;
path = materialColors.cyan;
range1 = materialColors.green;
range2 = materialColors.blue;
"fixit-insert" = materialColors.green;
"fixit-delete" = materialColors.red;
"diff-filename" = "${bold};${materialColors.blue}";
"diff-hunk" = materialColors.purple;
"diff-delete" = materialColors.red;
"diff-insert" = materialColors.green;
"type-diff" = "${bold};${materialColors.purple}";
fnname = "${bold};${materialColors.green}";
targs = materialColors.purple;
valid = materialColors.green;
invalid = materialColors.red;
"highlight-a" = "${bold};${materialColors.blue}";
"highlight-b" = "${bold};${materialColors.amber}";
};
gccColorsString =
builtins.concatStringsSep ":"
(map (name: "${name}=${gccColors.${name}}")
(builtins.attrNames gccColors));
in
{
home.sessionVariables = {
GCC_COLORS = gccColorsString;

Copilot uses AI. Check for mistakes.
{
programs.zsh = {
enable = true;
initContent = builtins.readFile ./files/zshrc;
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

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

The attribute initContent is not a valid option for programs.zsh in home-manager. The correct attribute should be initExtra for additional zsh initialization content. This will cause the configuration to fail when applied.

Copilot uses AI. Check for mistakes.
Comment on lines +7 to +10
programs.java = {
enable = true;
package = pkgs.jdk21;
};
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

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

There is no programs.java option in home-manager. To install and configure Java, you should add the JDK package to home.packages and optionally set the JAVA_HOME environment variable. This configuration will fail when applied.

Suggested change
programs.java = {
enable = true;
package = pkgs.jdk21;
};
home.packages = [
pkgs.jdk21
];
home.sessionVariables.JAVA_HOME = "${pkgs.jdk21}";

Copilot uses AI. Check for mistakes.
# DNS over TLS with NextDNS
services.resolved = {
enable = true;
dnsovertls = "true";
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

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

The services.resolved.dnsovertls option expects a boolean value (true or false), not a string. Change dnsovertls = "true"; to dnsovertls = true; (without quotes). String values will cause a type error.

Copilot uses AI. Check for mistakes.

# Load additional config from dotfiles
includes = [
{ path = "~/.config/git/config-extra"; }
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

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

The includes path uses a tilde (~) which may not expand correctly in Nix configuration. Instead of { path = "~/.config/git/config-extra"; }, use { path = "${config.xdg.configHome}/git/config-extra"; } to ensure the path is properly resolved.

Suggested change
{ path = "~/.config/git/config-extra"; }
{ path = "${config.xdg.configHome}/git/config-extra"; }

Copilot uses AI. Check for mistakes.
};

# Enable Touch ID for sudo
security.pam.services.sudo_local.touchIdAuth = true;
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

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

The option name should be security.pam.enableSudoTouchIdAuth (boolean) rather than security.pam.services.sudo_local.touchIdAuth. This appears to be mixing the NixOS PAM syntax with nix-darwin. The correct nix-darwin option for enabling Touch ID authentication for sudo is security.pam.enableSudoTouchIdAuth = true;.

Copilot uses AI. Check for mistakes.

xdg.configFile."nvim/vimrc" = {
source = ./files/vimrc;
};
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

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

The nvim module does not deploy the snippet.d directory to the user's configuration. If these snippets are meant to be used with a snippet plugin (like UltiSnips), they need to be copied to the appropriate location using xdg.configFile or home.file. Currently, the snippets will not be available to nvim.

Suggested change
};
};
xdg.configFile."nvim/snippet.d" = {
source = ./files/snippet.d;
recursive = true;
};

Copilot uses AI. Check for mistakes.
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "25.11"; # Did you read the comment?
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

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

The system.stateVersion is set to "25.11" which corresponds to the November 2025 release. Since we're currently in February 2026, this should be a valid release version. However, if this is a new installation, it might be better to use "24.11" (the latest stable release as of January 2025) unless this system was specifically installed with the 25.11 pre-release.

Copilot uses AI. Check for mistakes.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 42 out of 74 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 43 out of 75 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

home/modules/nvim/files/vimrc:148

  • These template autocmds hardcode a checkout path ($HOME/dotfiles/...). Since the templates aren’t installed via Home Manager, this will break if the repo isn’t present at that exact location. Consider installing the template.d directory under $XDG_CONFIG_HOME/nvim/ via xdg.configFile (or derive the path from stdpath('config')) and reference that instead.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +61 to +66
| `macos-clean` | Delete old macOS generations (keep last 7) |
| `macos-gc` | Run Nix garbage collection |
| `nixos-build` | Build NixOS configuration (dry run) |
| `nixos-switch` | Apply NixOS + Home Manager configuration |
| `nixos-update` | Update flake inputs |
| `nixos-clean` | Delete old NixOS generations (keep last 7) |
Copy link

Copilot AI Feb 18, 2026

Choose a reason for hiding this comment

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

The Makefile uses nix-env --delete-generations +7, which deletes generations older than 7 days, not “keep last 7 generations”. Please update this table entry to match the actual behavior (or adjust the Makefile commands if you really want to keep the last 7 generations).

Suggested change
| `macos-clean` | Delete old macOS generations (keep last 7) |
| `macos-gc` | Run Nix garbage collection |
| `nixos-build` | Build NixOS configuration (dry run) |
| `nixos-switch` | Apply NixOS + Home Manager configuration |
| `nixos-update` | Update flake inputs |
| `nixos-clean` | Delete old NixOS generations (keep last 7) |
| `macos-clean` | Delete macOS generations older than 7 days |
| `macos-gc` | Run Nix garbage collection |
| `nixos-build` | Build NixOS configuration (dry run) |
| `nixos-switch` | Apply NixOS + Home Manager configuration |
| `nixos-update` | Update flake inputs |
| `nixos-clean` | Delete NixOS generations older than 7 days |

Copilot uses AI. Check for mistakes.
@himkt himkt merged commit cdf3611 into main Feb 18, 2026
8 checks passed
@himkt himkt deleted the feat/dotfiles-integration branch February 18, 2026 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant