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
+8 -1
View File
@@ -34,11 +34,16 @@ NixOS + Home Manager
Shell environment. Shell environment.
## Declarative Defeat ## Declarative Defeat
Necessary configurations not achievable with dotfiles Necessary configurations not achievable with dotfiles
### Profile: cli-minimal ### Profile: cli-minimal
- SSH key registration - SSH key registration
Please register the value of ~/.ssh/id_ed25519.pub on GitHub. Please register the value of ~/.ssh/id_ed25519.pub on GitHub.
### Profile: laptop ### Profile: laptop
- Fingerprint registration - Fingerprint registration
Please register the user's fingerprints by running fprintd-enroll. Please register the user's fingerprints by running fprintd-enroll.
@@ -48,4 +53,6 @@ Necessary configurations not achievable with dotfiles
- [fa0311/.zshrc](https://gist.github.com/fa0311/d37d53ff39c73c54c883379e8e3732df) - [fa0311/.zshrc](https://gist.github.com/fa0311/d37d53ff39c73c54c883379e8e3732df)
- [AsianLovesLinux/Niri](https://github.com/AsianLovesLinux/Niri) - [AsianLovesLinux/Niri](https://github.com/AsianLovesLinux/Niri)
- [natsukium/dotfiles](https://github.com/natsukium/dotfiles) - [natsukium/dotfiles](https://github.com/natsukium/dotfiles)
- [dracula](https://github.com/dracula) - [dracula](https://github.com/dracula)
- [akazdayo/nix-configs](https://github.com/akazdayo/nix-configs)
Generated
+150 -5
View File
@@ -169,6 +169,27 @@
} }
}, },
"flake-parts_2": { "flake-parts_2": {
"inputs": {
"nixpkgs-lib": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1768135262,
"narHash": "sha256-PVvu7OqHBGWN16zSi6tEmPwwHQ4rLPU9Plvs8/1TUBY=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "80daad04eddbbf5a4d883996a73f3f542fa437ac",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_3": {
"inputs": { "inputs": {
"nixpkgs-lib": [ "nixpkgs-lib": [
"stylix", "stylix",
@@ -209,7 +230,25 @@
}, },
"flake-utils_2": { "flake-utils_2": {
"inputs": { "inputs": {
"systems": "systems_4" "systems": "systems_2"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_3": {
"inputs": {
"systems": "systems_6"
}, },
"locked": { "locked": {
"lastModified": 1731533236, "lastModified": 1731533236,
@@ -323,6 +362,34 @@
"type": "github" "type": "github"
} }
}, },
"ixx": {
"inputs": {
"flake-utils": [
"nixvim",
"nuschtosSearch",
"flake-utils"
],
"nixpkgs": [
"nixvim",
"nuschtosSearch",
"nixpkgs"
]
},
"locked": {
"lastModified": 1754860581,
"narHash": "sha256-EM0IE63OHxXCOpDHXaTyHIOk2cNvMCGPqLt/IdtVxgk=",
"owner": "NuschtOS",
"repo": "ixx",
"rev": "babfe85a876162c4acc9ab6fb4483df88fa1f281",
"type": "github"
},
"original": {
"owner": "NuschtOS",
"ref": "v0.1.1",
"repo": "ixx",
"type": "github"
}
},
"lanzaboote": { "lanzaboote": {
"inputs": { "inputs": {
"crane": "crane", "crane": "crane",
@@ -561,6 +628,30 @@
"type": "github" "type": "github"
} }
}, },
"nixvim": {
"inputs": {
"flake-parts": "flake-parts_2",
"nixpkgs": [
"nixpkgs"
],
"nuschtosSearch": "nuschtosSearch",
"systems": "systems_3"
},
"locked": {
"lastModified": 1769049374,
"narHash": "sha256-h0Os2qqNyycDY1FyZgtbn28VF1ySP74/n0f+LDd8j+w=",
"owner": "nix-community",
"repo": "nixvim",
"rev": "b8f76bf5751835647538ef8784e4e6ee8deb8f95",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "nixos-25.11",
"repo": "nixvim",
"type": "github"
}
},
"noctalia": { "noctalia": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@@ -569,7 +660,7 @@
"quickshell": [ "quickshell": [
"quickshell" "quickshell"
], ],
"systems": "systems_2" "systems": "systems_4"
}, },
"locked": { "locked": {
"lastModified": 1762640266, "lastModified": 1762640266,
@@ -610,6 +701,29 @@
"type": "github" "type": "github"
} }
}, },
"nuschtosSearch": {
"inputs": {
"flake-utils": "flake-utils_2",
"ixx": "ixx",
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1768249818,
"narHash": "sha256-ANfn5OqIxq3HONPIXZ6zuI5sLzX1sS+2qcf/Pa0kQEc=",
"owner": "NuschtOS",
"repo": "search",
"rev": "b6f77b88e9009bfde28e2130e218e5123dc66796",
"type": "github"
},
"original": {
"owner": "NuschtOS",
"repo": "search",
"type": "github"
}
},
"pre-commit-hooks-nix": { "pre-commit-hooks-nix": {
"inputs": { "inputs": {
"flake-compat": [ "flake-compat": [
@@ -666,6 +780,7 @@
"nixos-wsl": "nixos-wsl", "nixos-wsl": "nixos-wsl",
"nixpkgs": "nixpkgs_5", "nixpkgs": "nixpkgs_5",
"nixpkgs-unstable": "nixpkgs-unstable", "nixpkgs-unstable": "nixpkgs-unstable",
"nixvim": "nixvim",
"noctalia": "noctalia", "noctalia": "noctalia",
"quickshell": "quickshell", "quickshell": "quickshell",
"stylix": "stylix", "stylix": "stylix",
@@ -700,13 +815,13 @@
"base16-helix": "base16-helix", "base16-helix": "base16-helix",
"base16-vim": "base16-vim", "base16-vim": "base16-vim",
"firefox-gnome-theme": "firefox-gnome-theme", "firefox-gnome-theme": "firefox-gnome-theme",
"flake-parts": "flake-parts_2", "flake-parts": "flake-parts_3",
"gnome-shell": "gnome-shell", "gnome-shell": "gnome-shell",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ],
"nur": "nur", "nur": "nur",
"systems": "systems_3", "systems": "systems_5",
"tinted-foot": "tinted-foot", "tinted-foot": "tinted-foot",
"tinted-kitty": "tinted-kitty", "tinted-kitty": "tinted-kitty",
"tinted-schemes": "tinted-schemes", "tinted-schemes": "tinted-schemes",
@@ -787,6 +902,36 @@
"type": "github" "type": "github"
} }
}, },
"systems_5": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_6": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"tinted-foot": { "tinted-foot": {
"flake": false, "flake": false,
"locked": { "locked": {
@@ -870,7 +1015,7 @@
}, },
"vicinae": { "vicinae": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_2", "flake-utils": "flake-utils_3",
"nixpkgs": "nixpkgs_6" "nixpkgs": "nixpkgs_6"
}, },
"locked": { "locked": {
+5
View File
@@ -32,6 +32,11 @@
url = "github:nix-community/lanzaboote"; url = "github:nix-community/lanzaboote";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
nixvim = {
url = "github:nix-community/nixvim/nixos-25.11";
inputs.nixpkgs.follows = "nixpkgs";
};
}; };
outputs = outputs =
+17 -8
View File
@@ -1,13 +1,15 @@
{ pkgs, inputs, ... }: {
let pkgs,
inputs,
...
}: let
unstable = import inputs.nixpkgs-unstable { unstable = import inputs.nixpkgs-unstable {
system = pkgs.system; system = pkgs.system;
config = { config = {
allowUnfree = true; allowUnfree = true;
}; };
}; };
in in {
{
programs = { programs = {
xwayland.enable = true; xwayland.enable = true;
dconf.enable = true; dconf.enable = true;
@@ -19,7 +21,7 @@ in
enableSSHSupport = true; enableSSHSupport = true;
}; };
zsh = { zsh = {
enable = true; enable = true;
}; };
java.enable = true; java.enable = true;
java.package = pkgs.jdk25; java.package = pkgs.jdk25;
@@ -29,7 +31,8 @@ in
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
tuigreet # The Login Manager (Sometimes Referred To As Display Manager) 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 unrar # Tool For Handling .rar Files
unzip # Tool For Handling .zip Files unzip # Tool For Handling .zip Files
uwsm # Universal Wayland Session Manager (optional must be enabled) uwsm # Universal Wayland Session Manager (optional must be enabled)
@@ -46,10 +49,16 @@ in
unstable._1password-gui unstable._1password-gui
unstable.ghostty unstable.ghostty
sbctl sbctl
xwayland-satellite slurp grim wf-recorder xwayland-satellite
slurp
grim
wf-recorder
sqlite # Vscode Raycast Extension Dependency sqlite # Vscode Raycast Extension Dependency
jdk25 maven gradle jdk25
maven
gradle
python312 python312
uv uv
zellij
]; ];
} }
+3 -4
View File
@@ -1,12 +1,11 @@
{ ... }: {...}: {
{
imports = [ imports = [
./btop ./btop
./git.nix ./git.nix
./fcitx5 ./fcitx5
./ssh.nix ./ssh.nix
./vim ./nixvim
./zsh.nix ./zsh.nix
./environment.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 keybind = ctrl+shift+v=paste_from_clipboard
# create new tab # create new tab
keybind = ctrl+t=new_tab keybind = ctrl+shift+t=new_tab
# move tabs # move tabs
keybind = ctrl+alt+left_bracket=previous_tab 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 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