feat: move to nixvim

This commit is contained in:
Kat Inskip 2025-11-19 04:39:35 -08:00
parent ca97476a47
commit 779c3c4098
Signed by: kat
GPG key ID: 465E64DECEA8CF0F
22 changed files with 772 additions and 57 deletions

169
flake.lock generated
View file

@ -492,6 +492,24 @@
"type": "github"
}
},
"flake-utils_3": {
"inputs": {
"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"
}
},
"flakelib": {
"inputs": {
"fl-config": "fl-config",
@ -825,6 +843,34 @@
"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"
}
},
"jovian": {
"inputs": {
"nix-github-actions": "nix-github-actions",
@ -1243,6 +1289,29 @@
"type": "github"
}
},
"nix-search-tv": {
"inputs": {
"flake-utils": [
"flake-utils"
],
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1760307084,
"narHash": "sha256-fhXbkH1iqLugr5zkuSgxUYziq5Q4f+QnV5eSag9La8g=",
"owner": "3timeslazy",
"repo": "nix-search-tv",
"rev": "7499132c98e044e36bc73254d4179cff0d9d7768",
"type": "github"
},
"original": {
"owner": "3timeslazy",
"repo": "nix-search-tv",
"type": "github"
}
},
"nix-std": {
"locked": {
"lastModified": 1710870712,
@ -1438,6 +1507,22 @@
}
},
"nixpkgs_5": {
"locked": {
"lastModified": 1763464769,
"narHash": "sha256-AJHrsT7VoeQzErpBRlLJM1SODcaayp0joAoEA35yiwM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "6f374686605df381de8541c072038472a5ea2e2d",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_6": {
"locked": {
"lastModified": 1762482733,
"narHash": "sha256-g/da4FzvckvbiZT075Sb1/YDNDr+tGQgh4N8i5ceYMg=",
@ -1453,13 +1538,36 @@
"type": "github"
}
},
"nixvim": {
"inputs": {
"flake-parts": [
"flake-parts"
],
"nixpkgs": "nixpkgs_5",
"nuschtosSearch": "nuschtosSearch",
"systems": "systems_3"
},
"locked": {
"lastModified": 1763485904,
"narHash": "sha256-C8FfYP5D0bgoZrIqrGGMNozc8Way3qGx/U6tK/RBZQ8=",
"owner": "nix-community",
"repo": "nixvim",
"rev": "7408b72662f2c6930448539638528b23c05ef17e",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixvim",
"type": "github"
}
},
"noctalia": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"quickshell": "quickshell",
"systems": "systems_2"
"systems": "systems_4"
},
"locked": {
"lastModified": 1760277691,
@ -1552,6 +1660,29 @@
"type": "github"
}
},
"nuschtosSearch": {
"inputs": {
"flake-utils": "flake-utils_3",
"ixx": "ixx",
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1761730856,
"narHash": "sha256-t1i5p/vSWwueZSC0Z2BImxx3BjoUDNKyC2mk24krcMY=",
"owner": "NuschtOS",
"repo": "search",
"rev": "e29de6db0cb3182e9aee75a3b1fd1919d995d85b",
"type": "github"
},
"original": {
"owner": "NuschtOS",
"repo": "search",
"type": "github"
}
},
"pre-commit-hooks-nix": {
"inputs": {
"flake-compat": [
@ -1660,6 +1791,7 @@
"niri": "niri",
"nix-gaming": "nix-gaming",
"nix-index-database": "nix-index-database",
"nix-search-tv": "nix-search-tv",
"nix-std": "nix-std_2",
"nixos-cli": "nixos-cli",
"nixos-hardware": "nixos-hardware",
@ -1669,6 +1801,7 @@
],
"nixpkgs-lib": "nixpkgs-lib",
"nixpkgs-xr": "nixpkgs-xr",
"nixvim": "nixvim",
"noctalia": "noctalia",
"norg": "norg",
"norg-meta": "norg-meta",
@ -1684,7 +1817,7 @@
"spicetify-nix": "spicetify-nix",
"std": "std",
"stylix": "stylix",
"systems": "systems_3",
"systems": "systems_5",
"tree": "tree",
"treefmt-nix": "treefmt-nix_2",
"ucodenix": "ucodenix",
@ -1750,7 +1883,7 @@
},
"slimevr-wrangler": {
"inputs": {
"nixpkgs": "nixpkgs_5",
"nixpkgs": "nixpkgs_6",
"slimevr-wrangler-src": [
"slimevr-wrangler-src"
]
@ -2036,6 +2169,36 @@
"type": "github"
}
},
"systems_4": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"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"
}
},
"tinted-foot": {
"flake": false,
"locked": {

View file

@ -353,6 +353,19 @@
flake-parts.follows = "flake-parts";
};
};
nix-search-tv = {
url = "github:3timeslazy/nix-search-tv";
inputs = {
nixpkgs.follows = "nixpkgs";
flake-utils.follows = "flake-utils";
};
};
nixvim = {
url = "github:nix-community/nixvim";
inputs = {
flake-parts.follows = "flake-parts";
};
};
slimevr-wrangler-src = {
url = "github:kittywitch/slimevr-wrangler/fix-mac-casing";
flake = false;

View file

@ -1,5 +1,5 @@
{tree, ...}: {
imports = with tree.home.profiles; [
neovim
nixvim.nixvim
];
}

View file

@ -53,11 +53,19 @@ in {
# Buffers
bufferline-nvim
rustaceanvim
# session
auto-session
# zk
zk-nvim
# task runner
overseer-nvim
# tree
nui-nvim
neo-tree-nvim
# obsidian vault support for neovim
obsidian-nvim
# aerial (skimming and quick nav)
aerial-nvim
# commentry
vim-commentary
# tree sitter

View file

@ -123,7 +123,35 @@ end
-----------------------------------------------------------
-- lualine
require('lualine').setup{}
require('lualine').setup({
options = {
theme = bubbles_theme,
component_separators = '',
section_separators = { left = '', right = '' },
},
sections = {
lualine_a = { { 'mode', separator = { left = '' }, right_padding = 2 } },
lualine_b = { 'filename', 'branch', 'diff' },
lualine_c = {
'%=', --[[ add your center components here in place of this comment ]]
},
lualine_x = { 'overseer' },
lualine_y = { 'filetype', 'progress' },
lualine_z = {
{ 'location', separator = { right = '' }, left_padding = 2 },
},
},
inactive_sections = {
lualine_a = { 'filename' },
lualine_b = {},
lualine_c = {},
lualine_x = {},
lualine_y = {},
lualine_z = { 'location' },
},
tabline = {},
extensions = {},
})
-- nvim-cmp
vim.diagnostic.config({
@ -225,6 +253,12 @@ require('neorg').setup {
},
}
-- overseer
require("overseer").setup()
-- auto-session
require("auto-session").setup({})
-- telescope
local telescope = require('telescope.builtin')
@ -281,6 +315,18 @@ require("twilight").setup {
},
}
-- Aerial overview (skimming and quick nav)
require("aerial").setup({
-- optionally use on_attach to set keymaps when aerial has attached to a buffer
on_attach = function(bufnr)
-- Jump forwards/backwards with '{' and '}'
vim.keymap.set("n", "{", "<cmd>AerialPrev<CR>", { buffer = bufnr })
vim.keymap.set("n", "}", "<cmd>AerialNext<CR>", { buffer = bufnr })
end,
})
-- You probably also want to set a keymap to toggle aerial
vim.keymap.set("n", "<leader>a", "<cmd>AerialToggle!<CR>")
-- bufferline
require('bufferline').setup {
options = {
@ -362,3 +408,25 @@ vim.keymap.set("", "F", function()
hop.hint_char1({ direction = directions.BEFORE_CURSOR, current_line_only = true })
end, {remap=true})
-- https://github.com/zk-org/zk-nvim
require("zk").setup({
-- Can be "telescope", "fzf", "fzf_lua", "minipick", "snacks_picker",
-- or select" (`vim.ui.select`).
picker = "telescope",
lsp = {
-- `config` is passed to `vim.lsp.start(config)`
config = {
name = "zk",
cmd = { "zk", "lsp" },
filetypes = { "markdown" },
-- on_attach = ...
-- etc, see `:h vim.lsp.start()`
},
-- automatically attach buffers in a zk notebook that match the given filetypes
auto_attach = {
enabled = true,
},
},
})

View file

@ -0,0 +1,106 @@
{
lib,
tree,
std,
...
}: let
inherit (std) set;
inherit (lib.attrsets) genAttrs;
in {
programs.nixvim = {
enable = true;
imports = [
tree.home.profiles.nixvim.plugins
];
vimAlias = true;
opts = {
mouse = "a";
clipboard = "unnamedplus";
completeopt = "longest,menuone";
backup = false;
writebackup = false;
ttimeoutlen = 100;
number = true;
relativenumber = true;
showmatch = true;
foldmethod = "marker";
colorcolumn = "80";
splitright = true;
splitbelow = true;
ignorecase = true;
smartcase = true;
wrap = true;
linebreak = true;
showbreak = "";
termguicolors = true;
laststatus = 3;
cursorline = true;
cmdheight = 1;
hlsearch = true;
expandtab = true;
shiftwidth = 2;
tabstop = 2;
smartindent = true;
list = true;
listchars = {
tab = "» ";
extends = "";
precedes = "";
nbsp = "·";
trail = "";
};
hidden = true;
history = 1000;
shada = "'1000,f1,<500,@500,/500";
lazyredraw = true;
synmaxcol = 240;
updatetime = 700;
};
globals = {
mapleader = " ";
maplocalleader = ",";
};
plugins = let
pluginsToGen = [
"lastplace"
"commentary"
"treesitter"
"treesitter-context"
"nix-develop"
"lualine"
"startup"
"lazygit"
"web-devicons"
"auto-session"
"overseer"
"twilight"
"bufferline"
"zk"
"rainbow"
];
basePlugin = {
enable = true;
autoLoad = true;
};
in
set.merge [
(genAttrs pluginsToGen (_: basePlugin))
{
auto-session.settings = {
bypass_save_filetypes = ["startup"];
close_filetypes_on_save = ["startup"];
};
twilight.settings = {
context = 10;
dimming.alpha = 0.5;
expand = [
"function"
"method"
"table"
"if_statement"
];
};
}
];
};
}

View file

@ -0,0 +1,29 @@
_: {
plugins = let
basePlugin = {
enable = true;
autoLoad = true;
};
in {
aerial =
basePlugin
// {
settings = {
backends = [
"treesitter"
"lsp"
"markdown"
"man"
];
attach_mode = "global";
highlight_on_hover = true;
on_attach.__raw = ''
function(buffer)
vim.keymap.set("n", "{", "<cmd>AerialPrev<CR>", { buffer = bufnr })
vim.keymap.set("n", "}", "<cmd>AerialNext<CR>", { buffer = bufnr })
end
'';
};
};
};
}

View file

@ -0,0 +1,60 @@
_: {
keymaps = [
{
key = "f";
action.__raw = ''
function()
require'hop'.hint_char1({
direction = require'hop.hint'.HintDirection.AFTER_CURSOR,
current_line_only = true
})
end
'';
options.remap = true;
}
{
key = "F";
action.__raw = ''
function()
require'hop'.hint_char1({
direction = require'hop.hint'.HintDirection.BEFORE_CURSOR,
current_line_only = true
})
end
'';
options.remap = true;
}
{
key = "t";
action.__raw = ''
function()
require'hop'.hint_char1({
direction = require'hop.hint'.HintDirection.AFTER_CURSOR,
current_line_only = true,
hint_offset = -1
})
end
'';
options.remap = true;
}
{
key = "T";
action.__raw = ''
function()
require'hop'.hint_char1({
direction = require'hop.hint'.HintDirection.BEFORE_CURSOR,
current_line_only = true,
hint_offset = 1
})
end
'';
options.remap = true;
}
];
plugins = {
hop = {
enable = true;
autoLoad = true;
};
};
}

View file

@ -0,0 +1,44 @@
{lib, ...}: let
inherit (lib.attrsets) genAttrs;
in {
lsp.servers = let
baseServer = {
enable = true;
activate = true;
};
serversToGen = [
"rust_analyzer"
"nixd"
"zk"
];
in
(genAttrs serversToGen (_: baseServer))
// {
};
plugins = let
pluginsToGen = [
"lspconfig"
"cmp"
"cmp-clippy"
"cmp-cmdline"
"cmp-emoji"
"cmp-nvim-lsp"
"cmp-path"
"cmp-rg"
"cmp-spell"
"cmp-tmux"
"cmp-treesitter"
"cmp-zsh"
];
basePlugin = {
enable = true;
autoLoad = true;
};
in
genAttrs pluginsToGen (_: basePlugin);
diagnostic.settings = {
virtual_text = true;
virtual_lines = true;
underlines = true;
};
}

View file

@ -0,0 +1,95 @@
_: {
plugins = let
basePlugin = {
enable = true;
autoLoad = true;
};
in {
startup =
basePlugin
// {
settings = {
colors = {
background = "#1f2227";
folded_section = "#56b6c2";
};
mappings = {
execute_command = "<CR>";
open_file = "o";
open_file_split = "<c-o>";
open_help = "?";
open_section = "<TAB>";
};
header = {
type = "text";
oldfiles_directory = false;
align = "center";
fold_section = false;
title = "Header";
margin = 5;
highlight = "Statement";
default_color = "";
oldfiles_amount = 0;
content = [
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
];
};
body = {
type = "mapping";
oldfiles_directory = false;
align = "center";
fold_section = false;
title = "Basic Commands";
margin = 5;
content = [
[" Find File" "Telescope find_files" "<leader>ff"]
["󰍉 Find Word" "Telescope live_grep" "<leader>lg"]
[" Recent Files" "Telescope oldfiles" "<leader>of"]
[" File Browser" "Telescope file_browser" "<leader>fb"]
[" New File" "lua require'startup'.new_file()" "<leader>nf"]
];
highlight = "String";
default_color = "";
oldfiles_amount = 0;
};
footer = {
type = "text";
oldfiles_directory = false;
align = "center";
fold_section = false;
title = "Footer";
margin = 5;
content = ["waow sleepy girl"];
highlight = "Number";
default_color = "";
oldfiles_amount = 0;
};
options = {
after = null;
cursor_column = 0.5;
disable_statuslines = true;
empty_lines_between_mappings = true;
mapping_keys = true;
paddings = [1 3 3 0];
};
parts = [
"header"
"body"
"footer"
];
};
};
};
}

View file

@ -0,0 +1,36 @@
_: {
keymaps = [
{
options.silent = true;
key = "<Leader>fb";
action.__raw = ''
function()
require("telescope").extensions.file_browser.file_browser()
end
'';
}
];
plugins = let
basePlugin = {
enable = true;
autoLoad = true;
};
in {
telescope =
basePlugin
// {
keymaps = {
"<Leader>fg" = "live_grep";
"<Leader>ff" = "find_files";
"<Leader>fB" = "buffers";
"<Leader>fh" = "help_tags";
};
extensions = {
file-browser.enable = true;
frecency.enable = true;
ui-select.enable = true;
undo.enable = true;
};
};
};
}

View file

@ -0,0 +1,13 @@
_: {
programs.lazygit = {
enable = true;
settings = {
git = {
overrideGpg = true;
pagers = [
{pager = "delta --paging=never";}
];
};
};
};
}

View file

@ -0,0 +1,3 @@
_: {
programs.navi.enable = true;
}

View file

@ -0,0 +1,14 @@
{
pkgs,
inputs,
...
}: {
programs.nix-search-tv = {
enable = true;
package = inputs.nix-search-tv.packages.${pkgs.system}.default;
enableTelevisionIntegration = true;
};
programs.television = {
enable = true;
};
}

View file

@ -0,0 +1,3 @@
_: {
programs.zk.enable = true;
}

View file

@ -3,10 +3,24 @@
lib,
inputs,
...
}: {
}: let
inherit (lib.lists) singleton;
inherit (lib.meta) getExe';
in {
systemd.user.services.wlx-overlay-s = {
description = "wlx-overlay-s";
serviceConfig = {
Type = "simple";
ExecStart = getExe' pkgs.wlx-overlay-s "wlx-overlay-s";
};
};
services.wivrn = {
enable = true;
openFirewall = true;
steam.importOXRRuntimes = true;
monadoEnvironment = {
XRT_COMPOSITOR_COMPUTE = "1";
};
package = pkgs.wivrn.overrideAttrs (old: rec {
cudaSupport = true;
version = "84e5203be3019278925ac03708567f2982360f8a";
@ -28,7 +42,8 @@
enable = true;
json = {
scale = [0.5 0.5];
bitrate = 300 * 1000;
bit-depth = 10;
bitrate = 50000 * 1000;
encoders = [
{
encoder = "nvenc";
@ -54,7 +69,7 @@
udp = [21110];
};
wivrn = let
single = 9757;
single = singleton 9757;
in {
tcp = single;
udp = single;
@ -68,6 +83,16 @@
wlx-overlay-s
monado-vulkan-layers
bs-manager
vrcx
appimage-run
(unityhub.override {
extraLibs = unityhubPkgs: [
(unityhubPkgs.runCommand "libxml2-fake-old-abi" {} ''
mkdir -p "$out/lib"
ln -s "${unityhubPkgs.lib.getLib unityhubPkgs.libxml2}/lib/libxml2.so" "$out/lib/libxml2.so.2"
'')
];
})
slimevr
slimevr-server
inputs.slimevr-wrangler.packages.${pkgs.system}.slimevr-wrangler

View file

@ -0,0 +1,24 @@
{config, ...}: let
cfg = config.services.navidrome;
domain = "music.kittywit.ch";
in {
services = {
navidrome = {
enable = true;
openFirewall = true;
};
nginx.virtualHosts.${domain} = {
enableACME = true;
forceSSL = true;
extraConfig = ''
client_max_body_size 512M;
'';
locations = {
"/" = {
proxyPass = "http://${cfg.settings.Address}:${toString cfg.settings.Port}";
proxyWebsockets = true;
};
};
};
};
}

44
nixos/servers/stream.nix Normal file
View file

@ -0,0 +1,44 @@
_: {
networking.firewall.allowedTCPPorts = [
1935
];
systemd.services.nginx.serviceConfig.BindPaths = [
"/var/www/streamy"
];
services.nginx = let
streamyHome = "/var/www/streamy";
in {
virtualHosts."stream.kittywit.ch" = {
enableACME = true;
forceSSL = true;
acmeRoot = null;
locations = {
"/" = {
root = streamyHome;
};
};
};
appendConfig = ''
rtmp {
server {
listen 1935;
chunk_size 4096;
application animu {
allow publish 100.64.0.0/10;
deny publish all;
live on;
record off;
hls on;
hls_path ${streamyHome}/hls;
hls_fragment 3;
hls_playlist_length 60;
dash on;
dash_path ${streamyHome}/dash;
}
}
}
'';
};
}

View file

@ -1,6 +1,5 @@
_: let
hostConfig = {
pkgs,
tree,
modulesPath,
...
@ -25,57 +24,12 @@ _: let
forgejo
forgejo-runner
ntfy
stream
#navidrome
postgres
web
]);
environment.systemPackages = [
pkgs.numix-icon-theme
];
networking.firewall.allowedTCPPorts = [
1935
];
systemd.services.nginx.serviceConfig.BindPaths = [
"/var/www/streamy"
];
services.nginx = let
streamyHome = "/var/www/streamy";
in {
virtualHosts."stream.kittywit.ch" = {
enableACME = true;
forceSSL = true;
acmeRoot = null;
locations = {
"/" = {
root = streamyHome;
};
};
};
appendConfig = ''
rtmp {
server {
listen 1935;
chunk_size 4096;
application animu {
allow publish 100.64.0.0/10;
deny publish all;
live on;
record off;
hls on;
hls_path ${streamyHome}/hls;
hls_fragment 3;
hls_playlist_length 60;
dash on;
dash_path ${streamyHome}/dash;
}
}
}
'';
};
# TODO: Add config.microvm.stateDir to backup schedule?
# TODO: figure out updateFlake?
#microvm = {

View file

@ -60,3 +60,12 @@ resource "cloudflare_record" "stream" {
value = "daiyousei.inskip.me"
zone_id = local.zone_ids.kittywitch
}
resource "cloudflare_record" "music" {
name = "music"
proxied = false
ttl = 3600
type = "CNAME"
value = "daiyousei.inskip.me"
zone_id = local.zone_ids.kittywitch
}

File diff suppressed because one or more lines are too long

View file

@ -32,6 +32,9 @@
"home/*".functor.enable = true;
"home/profiles/*".functor.enable = true;
"home/profiles/nixvim".functor.excludes = [
"plugins"
];
"home/environments/*".functor.enable = true;
"home/user".evaluateDefault = true;
"home/user/data".evaluate = true;
@ -117,6 +120,7 @@
spicetify-nix.homeManagerModules.spicetify
stylix.homeModules.stylix
noctalia.homeModules.default
nixvim.homeModules.nixvim
]
++ (with (import (inputs.arcexprs + "/modules")).home-manager; [
i3gopher