This commit is contained in:
2026-03-09 11:09:59 +09:00
parent 5180e01a71
commit 75731fb91c
34 changed files with 601 additions and 29 deletions
+17 -8
View File
@@ -1,13 +1,15 @@
{ pkgs, inputs, ... }:
let
{
pkgs,
inputs,
...
}: let
unstable = import inputs.nixpkgs-unstable {
system = pkgs.system;
config = {
allowUnfree = true;
};
};
in
{
in {
programs = {
xwayland.enable = true;
dconf.enable = true;
@@ -19,7 +21,7 @@ in
enableSSHSupport = true;
};
zsh = {
enable = true;
enable = true;
};
java.enable = true;
java.package = pkgs.jdk25;
@@ -29,7 +31,8 @@ in
environment.systemPackages = with pkgs; [
tuigreet # The Login Manager (Sometimes Referred To As Display Manager)
htop btop # Simple Terminal Based System Monitor
htop
btop # Simple Terminal Based System Monitor
unrar # Tool For Handling .rar Files
unzip # Tool For Handling .zip Files
uwsm # Universal Wayland Session Manager (optional must be enabled)
@@ -46,10 +49,16 @@ in
unstable._1password-gui
unstable.ghostty
sbctl
xwayland-satellite slurp grim wf-recorder
xwayland-satellite
slurp
grim
wf-recorder
sqlite # Vscode Raycast Extension Dependency
jdk25 maven gradle
jdk25
maven
gradle
python312
uv
zellij
];
}
+3 -4
View File
@@ -1,12 +1,11 @@
{ ... }:
{
{...}: {
imports = [
./btop
./git.nix
./fcitx5
./ssh.nix
./vim
./nixvim
./zsh.nix
./environment.nix
];
}
}
+2 -2
View File
@@ -13,7 +13,7 @@ keybind = ctrl+shift+c=copy_to_clipboard
keybind = ctrl+shift+v=paste_from_clipboard
# create new tab
keybind = ctrl+t=new_tab
keybind = ctrl+shift+t=new_tab
# move tabs
keybind = ctrl+alt+left_bracket=previous_tab
@@ -27,4 +27,4 @@ keybind = ctrl+shift+semicolon=increase_font_size:1
keybind = ctrl+shift+minus=increase_font_size:1
shell-integration-features = ssh-terminfo,ssh-env
shell-integration-features = ssh-terminfo,ssh-env
+6
View File
@@ -0,0 +1,6 @@
{...}: {
programs.nixvim.colorschemes.catppuccin = {
enable = true;
settings.transparent_background = true;
};
}
+64
View File
@@ -0,0 +1,64 @@
{
pkgs,
inputs,
...
}: {
imports = [
inputs.nixvim.homeModules.nixvim
./options.nix
./keymaps.nix
./language.nix
./colorscheme.nix
./lsp.nix
./plugins
];
programs.nixvim = {
enable = true;
vimAlias = true;
viAlias = true;
withNodeJs = true;
extraPackages = with pkgs; [
git
ripgrep
fd
nodejs
zellij
# LSP / formatter / misc
vtsls
vscode-langservers-extracted
tailwindcss-language-server
prettierd
prettier
biome
stylua
shfmt
alejandra
lua-language-server
nixd
];
extraConfigLua = ''
require("conform").setup({
formatters_by_ft = {
javascript = { "prettierd", "prettier", stop_after_first = true },
javascriptreact = { "prettierd", "prettier", stop_after_first = true },
typescript = { "prettierd", "prettier", stop_after_first = true },
typescriptreact = { "prettierd", "prettier", stop_after_first = true },
json = { "prettierd", "prettier", stop_after_first = true },
yaml = { "prettierd", "prettier", stop_after_first = true },
markdown = { "prettierd", "prettier", stop_after_first = true },
lua = { "stylua" },
nix = { "alejandra" },
sh = { "shfmt" },
},
format_on_save = function(_)
return { timeout_ms = 1000, lsp_format = "fallback" }
end,
})
'';
};
}
+38
View File
@@ -0,0 +1,38 @@
{...}: let
mk = key: action: desc: {
mode = "n";
inherit key action;
options = {
silent = true;
inherit desc;
};
};
mkRaw = key: raw: desc: {
mode = "n";
key = key;
action.__raw = raw;
options = {
silent = true;
desc = desc;
};
};
in {
programs.nixvim.keymaps = [
# LSP
(mkRaw "K" "vim.lsp.buf.hover" "LSPエラーのホバー表示")
(mkRaw "gd" "vim.lsp.buf.definition" "定義へ移動")
(mkRaw "gr" "vim.lsp.buf.references" "参照を表示")
(mkRaw "<leader>rn" "vim.lsp.buf.rename" "シンボル名を一括変換")
(mkRaw "<leader>cf" "vim.lsp.buf.format" "コードをフォーマット")
# File tree
(mk "<leader>e" "<cmd>Neotree toggle left<CR>" "ファイルツリー")
# Terminal
(mk "<leader>tt" "<cmd>ToggleTerm direction=float<CR>" "ターミナル")
# Diagnostics
(mk "<leader>xx" "<cmd>Trouble diagnostics toggle<CR>" "エラー一覧")
];
}
+13
View File
@@ -0,0 +1,13 @@
{...}: {
programs.nixvim = {
env = {
LANG = "ja_JP.UTF-8";
LC_MESSAGES = "ja_JP.UTF-8";
};
extraConfigLua = ''
vim.cmd.language("ja_JP.utf8")
vim.opt.helplang = { "ja", "en" }
'';
};
}
+64
View File
@@ -0,0 +1,64 @@
{...}: {
programs.nixvim = {
plugins.lsp = {
enable = true;
servers = {
# TypeScript / JavaScript
vtsls = {
enable = true;
packageFallback = true;
rootMarkers = [
"pnpm-workspace.yaml"
"package.json"
"tsconfig.json"
"jsconfig.json"
".git"
];
};
# Biome for lint / format
biome = {
enable = true;
packageFallback = true;
rootMarkers = [
"biome.json"
"biome.jsonc"
"package.json"
"pnpm-workspace.yaml"
".git"
];
};
# Frontend / config languages
tailwindcss.enable = true;
cssls.enable = true;
jsonls.enable = true;
yamlls.enable = true;
lua_ls.enable = true;
nixd.enable = true;
# Other languages
rust_analyzer = {
enable = true;
installCargo = true;
installRustc = true;
};
svelte.enable = true;
ty.enable = true;
ruff.enable = true;
astro.enable = true;
gopls.enable = true;
};
};
# Diagnostic UI
diagnostic.settings = {
virtual_text = true;
float = {
border = "rounded";
source = true;
};
};
};
}
+43
View File
@@ -0,0 +1,43 @@
{...}: {
programs.nixvim = {
opts = {
# display
number = true;
relativenumber = true;
signcolumn = "yes";
termguicolors = true;
# action
mouse = "a";
clipboard = "unnamedplus";
updatetime = 200;
# search
ignorecase = true;
smartcase = true;
# window split
splitright = true;
splitbelow = true;
# indent
tabstop = 2;
shiftwidth = 2;
expandtab = true;
# file encoding
encoding = "utf-8";
fileencoding = "utf-8";
fileencodings = "utf-8,sjis,euc-jp,iso-2022-jp";
# invisible characters
list = true;
listchars = "tab:»-,trail:-,extends:»,precedes:«,nbsp:%";
};
globals = {
mapleader = " ";
maplocalleader = " ";
};
};
}
+6
View File
@@ -0,0 +1,6 @@
{...}: {
imports = [
./ui
./editor
];
}
@@ -0,0 +1,3 @@
{...}: {
programs.nixvim.plugins.nvim-autopairs.enable = true;
}
@@ -0,0 +1,26 @@
{...}: {
programs.nixvim.plugins.blink-cmp = {
enable = true;
setupLspCapabilities = true;
settings = {
keymap = {
preset = "enter";
"<C-Space>" = ["show"];
"<C-d>" = ["scroll_documentation_up"];
"<C-e>" = ["hide"];
"<C-f>" = ["scroll_documentation_down"];
"<Tab>" = ["select_next" "fallback"];
"<S-Tab>" = ["select_prev" "fallback"];
};
sources.default = [
"lsp"
"path"
"buffer"
];
};
};
}
@@ -0,0 +1,3 @@
{...}: {
programs.nixvim.plugins.comment.enable = true;
}
@@ -0,0 +1,3 @@
{...}: {
programs.nixvim.plugins."conform-nvim".enable = true;
}
@@ -0,0 +1,5 @@
{...}: {
programs.nixvim.plugins.copilot-lua = {
enable = true;
};
}
@@ -0,0 +1,14 @@
{...}: {
imports = [
./telescope.nix
./treesitter.nix
./blink-cmp.nix
./gitsigns.nix
./comment.nix
./autopairs.nix
./lsp-signature.nix
./copilot.nix
./trouble.nix
./conform.nix
];
}
@@ -0,0 +1,15 @@
{...}: {
# git change view
programs.nixvim.plugins.gitsigns = {
enable = true;
settings = {
signs = {
add = {text = "+";};
change = {text = "~";};
delete = {text = "_";};
topdelete = {text = "‾";};
changedelete = {text = "~";};
};
};
};
}
@@ -0,0 +1,11 @@
{...}: {
programs.nixvim.plugins.lsp-signature = {
enable = true;
settings = {
hint_enable = true;
hint_prefix = " ";
floating_window = true;
bind = true;
};
};
}
@@ -0,0 +1,43 @@
{...}: {
programs.nixvim = {
plugins.telescope = {
enable = true;
extensions = {
fzf-native.enable = true;
};
keymaps = {
"<leader>ff" = {
action = "find_files";
options = {
desc = "ファイルを探す";
silent = true;
};
};
"<leader>fg" = {
action = "live_grep";
options = {
desc = "文字列を全文検索";
silent = true;
};
};
"<leader>fb" = {
action = "buffers";
options = {
desc = "開いているバッファを探す";
silent = true;
};
};
"<leader>fh" = {
action = "help_tags";
options = {
desc = "ヘルプ項目を探す";
silent = true;
};
};
};
};
};
}
@@ -0,0 +1,9 @@
{...}: {
programs.nixvim.plugins.treesitter = {
enable = true;
settings = {
highlight.enable = true;
indent.enable = true;
};
};
}
@@ -0,0 +1,3 @@
{...}: {
programs.nixvim.plugins.trouble.enable = true;
}
@@ -0,0 +1,3 @@
{...}: {
programs.nixvim.plugins.indent-blankline.enable = true;
}
@@ -0,0 +1,11 @@
{...}: {
imports = [
./lualine.nix
./neo-tree.nix
./blankline.nix
./which-key.nix
./web-devicons.nix
./toggleterm.nix
./treesitter.nix
];
}
@@ -0,0 +1,3 @@
{...}: {
programs.nixvim.plugins.lualine.enable = true;
}
@@ -0,0 +1,16 @@
{...}: {
programs.nixvim = {
plugins.neo-tree = {
enable = true;
settings = {
close_if_last_window = true;
filesystem = {
follow_current_file = {
enabled = true;
leave_dirs_open = true;
};
};
};
};
};
}
@@ -0,0 +1,3 @@
{...}: {
programs.nixvim.plugins.toggleterm.enable = true;
}
@@ -0,0 +1,3 @@
{...}: {
programs.nixvim.plugins."treesitter-context".enable = true;
}
@@ -0,0 +1,4 @@
{...}: {
# icon set preview
programs.nixvim.plugins.web-devicons.enable = true;
}
@@ -0,0 +1,4 @@
{...}: {
# key map help
programs.nixvim.plugins.which-key.enable = true;
}
-9
View File
@@ -1,9 +0,0 @@
{ lib, ... }:
{
programs.neovim = {
enable = true;
viAlias = true;
vimAlias = true;
extraConfig = lib.fileContents ./init.vim;
};
}
View File