fix: 修复 nix flake check 和 build 错误

- 添加 system.primaryUser (nix-darwin 新要求)
- 全局应用 overlays 解决 comment-checker 找不到的问题
- git/ssh/delta 选项迁移到 home-manager 新 API
- 包改名: dockerfile-language-server, nixfmt, nixd
- neovim withRuby=false, catppuccin homeModules 更名
- 更新 flake.lock (nixpkgs, home-manager, catppuccin)
This commit is contained in:
2026-04-10 22:27:23 +08:00
parent 7dc7cc10c3
commit 3ccdd8d2e2
8 changed files with 38 additions and 38 deletions
Generated
+6 -6
View File
@@ -43,11 +43,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1775143651, "lastModified": 1775781825,
"narHash": "sha256-S0RqAyDPMTcv9vASMaE8eY1QexFysAOdnxUxFHIPOyE=", "narHash": "sha256-L5yKTpR+alrZU2XYYvIxCeCP4LBHU5jhwSj7H1VAavg=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "d166a078541982a76f14d3e06e9665fa5c9ed85e", "rev": "e35c39fca04fee829cecdf839a50eb9b54d8a701",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -99,11 +99,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1775036866, "lastModified": 1775710090,
"narHash": "sha256-ZojAnPuCdy657PbTq5V0Y+AHKhZAIwSIT2cb8UgAz/U=", "narHash": "sha256-ar3rofg+awPB8QXDaFJhJ2jJhu+KqN/PRCXeyuXR76E=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "6201e203d09599479a3b3450ed24fa81537ebc4e", "rev": "4c1018dae018162ec878d42fec712642d214fdfa",
"type": "github" "type": "github"
}, },
"original": { "original": {
+1 -1
View File
@@ -8,7 +8,7 @@
{ {
imports = [ imports = [
inputs.catppuccin.homeManagerModules.catppuccin inputs.catppuccin.homeModules.catppuccin
./shell ./shell
./dev ./dev
./theme.nix ./theme.nix
+17 -13
View File
@@ -3,19 +3,11 @@
{ {
programs.git = { programs.git = {
enable = true; enable = true;
userName = "imbytecat"; settings = {
userEmail = "imbytecat@gmail.com"; user = {
name = "imbytecat";
delta = { email = "imbytecat@gmail.com";
enable = true;
options = {
navigate = true;
side-by-side = true;
line-numbers = true;
}; };
};
extraConfig = {
merge.conflictstyle = "zdiff3"; merge.conflictstyle = "zdiff3";
pull.rebase = true; pull.rebase = true;
push.autoSetupRemote = true; push.autoSetupRemote = true;
@@ -26,6 +18,16 @@
}; };
}; };
programs.delta = {
enable = true;
enableGitIntegration = true;
options = {
navigate = true;
side-by-side = true;
line-numbers = true;
};
};
programs.lazygit = { programs.lazygit = {
enable = true; enable = true;
settings = { settings = {
@@ -46,7 +48,9 @@
programs.ssh = { programs.ssh = {
enable = true; enable = true;
matchBlocks."*" = {
identityFile = "~/.ssh/id_ed25519";
addKeysToAgent = "yes"; addKeysToAgent = "yes";
matchBlocks."*".identityFile = "~/.ssh/id_ed25519"; };
}; };
} }
+3 -3
View File
@@ -19,16 +19,16 @@
typescript-language-server typescript-language-server
yaml-language-server yaml-language-server
vue-language-server vue-language-server
dockerfile-language-server-nodejs dockerfile-language-server
lua-language-server lua-language-server
nil # Nix LSP nixd # Nix LSP
# ── Linter / Formatter ── # ── Linter / Formatter ──
biome biome
ruff ruff
shellcheck shellcheck
shfmt shfmt
nixfmt-rfc-style # nix formatter nixfmt # nix formatter
stylua stylua
# ── Code intelligence ── # ── Code intelligence ──
+2 -13
View File
@@ -1,4 +1,4 @@
{ pkgs, ... }: { ... }:
{ {
programs.neovim = { programs.neovim = {
@@ -8,17 +8,6 @@
vimAlias = true; vimAlias = true;
withNodeJs = true; withNodeJs = true;
withPython3 = true; withPython3 = true;
withRuby = false;
}; };
# ── Neovim distro configuration ──
# Option A: LazyVim / NvChad / AstroNvim via xdg.configFile
# xdg.configFile."nvim" = {
# source = ./nvim-config;
# recursive = true;
# };
#
# Option B: NixVim (fully declarative)
# Add to flake.nix inputs:
# nixvim.url = "github:nix-community/nixvim";
# Then configure here.
} }
+1
View File
@@ -75,6 +75,7 @@
programs.yazi = { programs.yazi = {
enable = true; enable = true;
enableFishIntegration = true; enableFishIntegration = true;
shellWrapperName = "y";
}; };
# ── Btop (system monitor) ─────────────────────────── # ── Btop (system monitor) ───────────────────────────
+3
View File
@@ -1,6 +1,9 @@
{ pkgs, username, ... }: { pkgs, username, ... }:
{ {
# ── Primary user (required by nix-darwin) ──────────
system.primaryUser = username;
# ── Shell ────────────────────────────────────────── # ── Shell ──────────────────────────────────────────
programs.fish.enable = true; programs.fish.enable = true;
+4 -1
View File
@@ -14,5 +14,8 @@
# ]; # ];
}; };
nixpkgs.config.allowUnfree = true; nixpkgs = {
config.allowUnfree = true;
overlays = [ (import ../../overlays) ];
};
} }