aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetri Hienonen <petri.hienonen@gmail.com>2026-01-16 18:31:10 +0200
committerPetri Hienonen <petri.hienonen@gmail.com>2026-01-16 18:31:10 +0200
commit63313185b460d2ae0a218e472a128a9b60d23720 (patch)
treefdb4c972785c37400838472f6811a332855c4e1c
parent7019b29558eaaad8ae76d8eab5c7af67c7541678 (diff)
downloadnixos-63313185b460d2ae0a218e472a128a9b60d23720.tar.zst
Update treesitter and change colorscheme to tokyonight
-rw-r--r--README.adoc8
-rw-r--r--home/default.nix2
-rw-r--r--home/hyprlock.nix2
-rw-r--r--home/nvim/autocommands.lua2
-rw-r--r--home/nvim/default.nix11
-rw-r--r--home/nvim/options.lua2
-rw-r--r--home/nvim/plugins/other.lua6
-rw-r--r--home/nvim/plugins/treesitter.lua83
-rw-r--r--roles/shared.nix2
9 files changed, 32 insertions, 86 deletions
diff --git a/README.adoc b/README.adoc
index 530e465..e47100a 100644
--- a/README.adoc
+++ b/README.adoc
@@ -10,8 +10,12 @@ Agenix can be used directly with SSH public keys.
Create an encrypted age file:
- cat gmail.pass.plain | agenix -e gmail.age
+```bash
+cat gmail.pass.plain | agenix -e gmail.age
+```
Validate that the secret can be extracted:
- agenix -d relesoft.age -i /home/petri/.ssh/id_ed25519
+```bash
+agenix -d relesoft.age -i /home/petri/.ssh/id_ed25519
+```
diff --git a/home/default.nix b/home/default.nix
index 4187a92..e20e483 100644
--- a/home/default.nix
+++ b/home/default.nix
@@ -450,7 +450,7 @@ in
font-family = "Iosevka Nerd Font";
font-size = 12;
mouse-hide-while-typing = true;
- theme = "nord";
+ theme = "TokyoNight";
};
themes = {
nord = {
diff --git a/home/hyprlock.nix b/home/hyprlock.nix
index 4627556..bd54348 100644
--- a/home/hyprlock.nix
+++ b/home/hyprlock.nix
@@ -49,7 +49,7 @@
monitor = "";
text = "cmd[update:1000] echo \"$(date +'%H:%M:%S')\"";
color = "rgb(202, 211, 245)";
- font_size = 90;
+ font_size = 120;
position = "0, 150";
halign = "center";
valign = "center";
diff --git a/home/nvim/autocommands.lua b/home/nvim/autocommands.lua
index eda0653..b073e69 100644
--- a/home/nvim/autocommands.lua
+++ b/home/nvim/autocommands.lua
@@ -3,7 +3,7 @@ local augroup = vim.api.nvim_create_augroup("UserConfig", {})
vim.api.nvim_create_autocmd("TextYankPost", {
desc = "Highlight when yanking (copying) text",
group = vim.api.nvim_create_augroup("kickstart-highlight-yank", { clear = true }),
- callback = function() vim.highlight.on_yank() end,
+ callback = function() vim.hl.on_yank() end,
})
vim.api.nvim_create_autocmd({ "BufWritePre" }, {
diff --git a/home/nvim/default.nix b/home/nvim/default.nix
index 5f90be4..0c1a32a 100644
--- a/home/nvim/default.nix
+++ b/home/nvim/default.nix
@@ -5,6 +5,10 @@
let
toLua = str: "lua << EOF\n${str}\nEOF\n";
toLuaFile = file: "lua << EOF\n${builtins.readFile file}\nEOF\n";
+ grammarsPath = unstable.symlinkJoin {
+ name = "treesitter-grammars";
+ paths = unstable.vimPlugins.nvim-treesitter.withAllGrammars.dependencies;
+ };
in
{
enable = true;
@@ -76,12 +80,17 @@
config = toLuaFile ./plugins/treesitter.lua;
}
hardtime-nvim
+ nord-nvim
nvim-dap-view
nvim-dap-virtual-text
- nord-nvim
+ tokyonight-nvim
];
extraLuaConfig = ''
+ -- Manually append Tree-sitter plugin and grammars to runtimepath
+ vim.opt.runtimepath:append("${unstable.vimPlugins.nvim-treesitter}")
+ vim.opt.runtimepath:append("${grammarsPath}")
+
${builtins.readFile ./lsp.lua}
${builtins.readFile ./autocommands.lua}
${builtins.readFile ./keymaps.lua}
diff --git a/home/nvim/options.lua b/home/nvim/options.lua
index 3b601aa..c97f54e 100644
--- a/home/nvim/options.lua
+++ b/home/nvim/options.lua
@@ -105,4 +105,4 @@ vim.opt.diffopt:append("linematch:60")
vim.opt.redrawtime = 10000
vim.opt.maxmempattern = 50000
-vim.cmd.colorscheme("nord")
+vim.cmd.colorscheme("tokyonight")
diff --git a/home/nvim/plugins/other.lua b/home/nvim/plugins/other.lua
index 10efd0e..e3eb00f 100644
--- a/home/nvim/plugins/other.lua
+++ b/home/nvim/plugins/other.lua
@@ -1,5 +1,7 @@
-- hardtime
require("hardtime").setup()
-vim.g.nord_italic = true
-require("nord").set()
+require("tokyonight").setup({
+ -- use the night style
+ style = "night",
+})
diff --git a/home/nvim/plugins/treesitter.lua b/home/nvim/plugins/treesitter.lua
index 0b688ec..c408901 100644
--- a/home/nvim/plugins/treesitter.lua
+++ b/home/nvim/plugins/treesitter.lua
@@ -1,81 +1,12 @@
-local function disable(lang, buf)
- local max_filesize = 100 * 1024 -- 100 KB
- local ok, stats = pcall(vim.uv.fs_stat, vim.api.nvim_buf_get_name(buf))
- if ok and stats and stats.size > max_filesize then
- return true
- end
-end
-
-require("nvim-treesitter").setup({
- auto_install = false,
- ensure_installed = {},
- ignore_install = {},
- modules = {},
- sync_install = false,
+require "nvim-treesitter".setup {
+ install_dir = vim.fn.stdpath("data") .. "/site",
highlight = {
- additional_vim_regex_highlighting = false,
- disable = disable,
enable = true,
},
- indent = { enable = true, disable = { "rust", "lua", "python", "golang", "nix", "json", "html", "javascript" } },
- incremental_selection = {
+ rainbow = {
enable = true,
- keymaps = {
- init_selection = "<leader>vv",
- node_decremental = "_",
- node_incremental = "+",
- scope_incremental = false,
- },
+ extended_mode = true,
+ max_file_lines = 2000,
},
- textobjects = {
- select = {
- enable = true,
- lookahead = true,
- keymaps = {
- -- You can use the capture groups defined in textobjects.scm
- ["af"] = { query = "@function.outer", desc = "around a function" },
- ["if"] = { query = "@function.inner", desc = "inner part of a function" },
- ["ac"] = { query = "@class.outer", desc = "around a class" },
- ["ic"] = { query = "@class.inner", desc = "inner part of a class" },
- ["ai"] = { query = "@conditional.outer", desc = "around an if statement" },
- ["ii"] = { query = "@conditional.inner", desc = "inner part of an if statement" },
- ["al"] = { query = "@loop.outer", desc = "around a loop" },
- ["il"] = { query = "@loop.inner", desc = "inner part of a loop" },
- ["ap"] = { query = "@parameter.outer", desc = "around parameter" },
- ["ip"] = { query = "@parameter.inner", desc = "inside a parameter" },
- },
- selection_modes = {
- ["@parameter.outer"] = "v", -- charwise
- ["@parameter.inner"] = "v", -- charwise
- ["@function.outer"] = "v", -- charwise
- ["@conditional.outer"] = "V", -- linewise
- ["@loop.outer"] = "V", -- linewise
- ["@class.outer"] = "<c-v>", -- blockwise
- },
- include_surrounding_whitespace = false,
- },
- move = {
- enable = true,
- set_jumps = true, -- whether to set jumps in the jumplist
- goto_previous_start = {
- ["[f"] = { query = "@function.outer", desc = "Previous function" },
- ["[c"] = { query = "@class.outer", desc = "Previous class" },
- ["[p"] = { query = "@parameter.inner", desc = "Previous parameter" },
- },
- goto_next_start = {
- ["]f"] = { query = "@function.outer", desc = "Next function" },
- ["]c"] = { query = "@class.outer", desc = "Next class" },
- ["]p"] = { query = "@parameter.inner", desc = "Next parameter" },
- },
- },
- swap = {
- enable = true,
- swap_next = {
- ["<leader>a"] = "@parameter.inner",
- },
- swap_previous = {
- ["<leader>A"] = "@parameter.inner",
- },
- },
- },
-})
+ additional_vim_regex_highlighting = false,
+}
diff --git a/roles/shared.nix b/roles/shared.nix
index cd41d2e..4f1be37 100644
--- a/roles/shared.nix
+++ b/roles/shared.nix
@@ -184,7 +184,7 @@
network = {
enable = true;
wait-online = {
- timeout = 1;
+ timeout = 10;
enable = true;
anyInterface = true;
};