manual update

This commit is contained in:
Charlotte 🦝 Delenk 2022-09-30 16:46:21 +01:00
parent 78af3e6973
commit f101756372
Signed by: darkkirb
GPG key ID: AB2BD8DAF2E37122
50 changed files with 111 additions and 1776 deletions

View file

@ -1,7 +1,6 @@
desktop: {pkgs, ...}: {
imports = [
../programs/zsh.nix
../programs/vim
../programs/helix
../programs/tmux.nix
../programs/ssh.nix
@ -106,11 +105,13 @@ desktop: {pkgs, ...}: {
};
};
systemd.user.sessionVariables = {
EDITOR = "nvim";
EDITOR = "hx";
};
home = {
shellAliases = {
vim = "nvim";
vi = "hx";
vim = "hx";
nvim = "hx";
cat = "bat";
less = "bat";
icat = "${pkgs.kitty}/bin/kitty +kitten icat";

View file

@ -5,8 +5,8 @@
nix-packages,
...
}: let
inherit (pkgs) plover plover-plugins-manager plover-emoji plover-tapey-tape plover-yaml-dictionary plover-machine-hid;
plover-env = plover.pythonModule.withPackages (_: [plover plover-plugins-manager plover-emoji plover-tapey-tape plover-yaml-dictionary plover-machine-hid]);
inherit (pkgs) plover plover-plugins-manager plover-plugin-emoji plover-plugin-tapey-tape plover-plugin-yaml-dictionary plover-plugin-rkb1-hid;
plover-env = plover.pythonModule.withPackages (_: [plover plover-plugins-manager plover-plugin-emoji plover-plugin-tapey-tape plover-plugin-yaml-dictionary plover-plugin-rkb1-hid]);
plover-src = plover.src;
plover-dictionaries-english =
[
@ -21,7 +21,7 @@
]
++ (map (module: {
enabled = true;
path = nix-packages.packages.${system}."plover-dict-${module}";
path = "${nix-packages.packages.${system}.plover-dict-didoesdigital}/dictionaries/${module}.json";
}) [
#Put this first
"fingerspelling"

View file

@ -1 +0,0 @@
Heavily based on https://github.com/syberant/nix-config/tree/master/configuration/home-manager/modules/neovim

View file

@ -1,41 +0,0 @@
{
pkgs,
lib,
...
}:
with lib;
with builtins; let
getNixFiles = dir: let
recu = n: k:
if k == "directory"
then getNixFiles "${dir}/${n}"
else if hasSuffix "nix" n
then ["${dir}/${n}"]
else [];
in
flatten (mapAttrsToList recu (readDir dir));
in {
imports = getNixFiles ./modules;
treesitter.enable = true;
vim.opt = {
wrap = true;
lbr = true;
timeoutlen = 400;
};
output.path.style = "impure";
output.makeWrapper = "--set LUA_PATH '${./modules/lua}/?.lua;;'";
output.path.path = with pkgs; [wl-clipboard];
output.extraConfig = ''
" Keybindings
:lua require'keybindings'
" TODO: Set clipboard tool with g:clipboard
'';
}
# TODO:
# https://idie.ru/posts/vim-modern-cpp

View file

@ -1,18 +0,0 @@
{
pkgs,
nix-neovim,
...
}: let
myNeovim = nix-neovim.buildNeovim {
configuration = ./configuration.nix;
inherit pkgs;
};
in {
home.packages = [
myNeovim
];
systemd.user.tmpfiles.rules = [
"d %h/.cache/nvim/undo-files 0700 %u %g mM:1d -"
];
}

View file

@ -1,61 +0,0 @@
{pkgs, ...}: {
vim.opt = {
# Use 4 spaces and expand tabs
expandtab = true;
tabstop = 2;
softtabstop = 2;
shiftwidth = 2;
cursorline = true; # Highlight line of cursor
number = true; # Line numbering
relativenumber = true;
numberwidth = 3;
undofile = true;
mouse = "a";
clipboard = "unnamedplus";
# Searching
ignorecase = true;
smartcase = true;
# Wildmode
wildmenu = true;
wildignorecase = true;
wildignore = ["*.o" "*~" "*.out"];
wildmode = ["longest" "list" "full"];
};
# Clipboard command
vim.g.clipboard = {
name = "kitty";
copy = {
"+" = ["${pkgs.wl-clipboard}/bin/wl-copy"];
"*" = ["${pkgs.wl-clipboard}/bin/wl-copy" "--primary"];
};
paste = {
"+" = ["${pkgs.wl-clipboard}/bin/wl-paste"];
"*" = ["${pkgs.wl-clipboard}/bin/wl-paste" "--primary"];
};
};
vim.keybindings.keybindings-shortened = {
j = {command = "gj";};
k = {command = "gk";};
"0" = {command = "g0";};
"$" = {command = "g$";};
"Y" = {
command = "yy";
mode = "n";
};
};
output.config_file = ''
" Enable 24-bit colours if available
if has('termguicolors')
set termguicolors
endif
set undodir=$HOME/.cache/nvim/undo-files
'';
}

View file

@ -1,14 +0,0 @@
{
pkgs,
lib,
config,
...
}: {
vim.keybindings.keybindings-shortened."<leader>gg" = {
command = ":LazyGit<CR>";
label = "lazygit";
};
output.plugins = with pkgs.vimPlugins; [lazygit-nvim];
output.path.path = with pkgs; [lazygit git];
}

View file

@ -1,9 +0,0 @@
{pkgs, ...}: {
vim.g = {
NERDCreateDefaultMappings = 0;
NERDSpaceDelims = 1;
NERDTrimTrailingWhitespace = 1;
};
output.plugins = with pkgs.vimPlugins; [nerdcommenter];
}

View file

@ -1,38 +0,0 @@
{pkgs, ...}: {
# TODO: Don't let the runner inherit nix-neovim's PATH
vim.g = {
VimuxUseNearest = 0;
VimuxHeight = "30";
VimuxCloseOnExit = true;
};
vim.keybindings.keybindings."<leader>" = {
# It's possible to also use vim-tmux-navigator's :TmuxNavigatePrevious
# Not too keen on it yet though
rr = {
command = "<cmd>VimuxRunLastCommand<cr>";
label = "Rerun Command";
};
rp = {
command = "<cmd>VimuxPromptCommand<cr>";
label = "Prompt Command";
};
ro = {
command = "<cmd>VimuxOpenRunner<cr>";
label = "Open Runner";
};
rq = {
command = "<cmd>VimuxCloseRunner<cr>";
label = "Close Runner";
};
ry = {
command = "<cmd>VimuxInspectRunner<cr>";
label = "Copy Mode";
};
};
output.plugins = with pkgs.vimPlugins; [vimux];
}

View file

@ -1,87 +0,0 @@
{
vim.keybindings = {
leader = " ";
which-key-nvim = true;
# Documented keybindings accessible via SPC
keybindings."<leader>" = {
### LaTeX commands
l = {
# name = "LaTeX";
l = {
command = "<cmd>VimtexCompile<cr>";
label = "Compile";
};
c = {
command = "<cmd>VimtexCountWords<cr>";
label = "Count Words";
};
e = {
command = "<cmd>VimtexErrors<cr>";
label = "Open Errors";
};
v = {
command = "<cmd>VimtexView<cr>";
label = "View";
};
p = {
command = "<cmd>lua require'mdpreview'.open_preview()<cr>";
label = "Pandoc View";
};
};
### Git commands
v = {
# name = "git";
v = {
command = "<cmd>Telescope git_bcommits<cr>";
label = "Buffer Commits";
};
h = {
command = "<cmd>Telescope git_commits<cr>";
label = "Commits";
};
b = {
command = "<cmd>Telescope git_branches<cr>";
label = "Branches";
};
s = {
command = "<cmd>Telescope git_status<cr>";
label = "Status";
};
};
### Documentation commands
d = {
# name = "docs";
v = {
command = "<cmd>Telescope help_tags<cr>";
label = "Vim";
};
m = {
command = "<cmd>Telescope man_pages<cr>";
label = "Man";
};
};
### Miscellaneous
";" = {
mode = "";
command = "<Plug>NERDCommenterToggle";
label = "Toggle Comment";
};
};
# Quick and dirty general keybindings
keybindings-shortened = {
k = {command = "gk";};
j = {command = "gj";};
"0" = {command = "g0";};
"$" = {command = "g$";};
};
};
}

View file

@ -1,48 +0,0 @@
# Copied from https://github.com/splintah/configuration/blob/7c7bfc2065b1bda84222e8adc9d238eca4ada0e0/vim/plugin/vimtex.vim
{
pkgs,
lib,
config,
...
}:
with lib; {
vim.g = {
vimtex_quickfix_open_on_warning = 0;
vimtex_compiler_latexmk = {
backend = "nvim";
background = 1;
build_dir = "";
callback = 1;
continuous = 1;
executable = "latexmk";
options = [
"-xelatex"
"-verbose"
"-file-line-error"
"-synctex=1"
"-interaction=nonstopmode"
];
};
vimtex_compiler_latexmk_engines = {
"_" = "-xelatex";
"pdflatex" = "-pdf";
"lualatex" = "-lualatex";
"xelatex" = "-xelatex";
"context (pdftex)" = "-pdf -pdflatex=texexec";
"context (luatex)" = "-pdf -pdflatex=context";
"context (xetex)" = ''-pdf -pdflatex="texexec --xtx"'';
};
tex_flavor = "latex";
vimtex_view_general_viewer = "zathura";
};
output.plugins = with pkgs.vimPlugins; [vimtex];
output.path.path = with pkgs; [
pkgs.texlive.combined.scheme-full
procps
zathura
];
}

View file

@ -1,3 +0,0 @@
{pkgs, ...}: {
output.plugins = with pkgs.vimPlugins; [vim-nix];
}

View file

@ -1,6 +0,0 @@
{pkgs, ...}: {
output.plugins = with pkgs.vimPlugins; [rust-tools-nvim];
output.config_file = ''
lua require("rust-analyzer-config")
'';
}

View file

@ -1,130 +0,0 @@
# Largely copied from a great blog post:
# https://sharksforarms.dev/posts/neovim-rust/
{
pkgs,
lib,
config,
...
}:
with lib; {
vim.opt = {
completeopt = "menuone,noinsert,noselect";
# Set updatetime for CursorHold
# 300ms of no cursor movement to trigger CursorHold
updatetime = 300;
# have a fixed column for the diagnostics to appear in
# this removes the jitter when warnings/errors flow in
signcolumn = "yes";
};
vim.keybindings.keybindings-shortened = {
"K" = {command = "<cmd>lua vim.lsp.buf.hover()<cr>";};
};
vim.g.lightline.component_expand.lsp_status = "LspStatus";
vim.g.lightline.active.right = mkAfter [["lsp_status"]];
# https://discourse.nixos.org/t/rust-src-not-found-and-other-misadventures-of-developing-rust-on-nixos/11570/2
output.makeWrapper = "--set RUST_SRC_PATH ${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
output.config_file = ''
set shortmess+=c
lua <<EOF
-- lsp_status
local lsp_status = require('lsp-status')
lsp_status.config({
status_symbol = "",
current_function = false,
-- indicator_errors = 'E',
-- indicator_warnings = 'W',
-- indicator_info = 'i',
-- indicator_hint = '?',
-- indicator_ok = '',
})
lsp_status.register_progress()
function on_attach(client)
lsp_status.on_attach(client)
-- Disable formatting for all LS, let null-ls handle this
client.resolved_capabilities.documentFormattingProvider = false
end
-- Setup all LSPs
local nvim_lsp = require'lspconfig'
local servers = {'rust_analyzer', 'rnix', 'clangd', 'pyright', 'dhall_lsp_server', 'elixirls'}
for _, s in ipairs(servers) do
nvim_lsp[s].setup({
on_attach = on_attach,
capabilities = lsp_status.capabilities,
})
end
-- special config for elixirls
require'lspconfig'.elixirls.setup{
cmd = { "${pkgs.elixir_ls}/bin/elixir-ls" }
}
-- handle diagnostics
-- https://github.com/nvim-lua/diagnostic-nvim/issues/73
vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(
vim.lsp.diagnostic.on_publish_diagnostics, {
virtual_text = true,
signs = true,
update_in_insert = false,
}
)
EOF
" Statusline
function! LspStatus() abort
if luaeval('#vim.lsp.buf_get_clients() > 0')
return luaeval("require('lsp-status').status()")
endif
return ""
endfunction
autocmd InsertLeave,BufEnter,BufWritePost * call lightline#update()
autocmd User LspDiagnosticsChanged call lightline#update()
" Show diagnostic popup on cursor hold
autocmd CursorHold * lua vim.diagnostic.open_float()
" Enable type inlay hints
" FIXME: https://github.com/nvim-lua/lsp_extensions.nvim/issues/30
" autocmd CursorMoved,InsertLeave,BufEnter,BufWinEnter,TabEnter,BufWritePost *
" \ lua require'lsp_extensions'.inlay_hints{ prefix = "", highlight = "Comment" }
'';
output.plugins = with pkgs.vimPlugins; [
nvim-lspconfig
lsp_extensions-nvim
lsp-status-nvim
dhall-vim
vim-elixir
];
output.path.path = with pkgs; [
# Rust
rust-analyzer
# Nix
rnix-lsp
# C++
clang-tools
# Dhall
dhall-lsp-server
# Python
(writeScriptBin "pyright-langserver" ''
# pyright has a symlinked `./bin` which breaks Nix's `symlinkJoin`
# This wrapper script fixes that.
${pyright}/bin/pyright-langserver $@
'')
];
}

View file

@ -1,16 +0,0 @@
{
pkgs,
lib,
...
}:
with builtins;
with lib; let
jdtls-lua = replaceStrings ["@jdt-language-server@" "@openjdk@"] ["${pkgs.jdt-language-server}" "${pkgs.openjdk}"] (readFile ../lua/jdtls.lua);
in {
output.config_file = ''
lua << EOF
${jdtls-lua}
EOF
'';
output.plugins = with pkgs.vimPlugins; [nvim-jdtls];
}

View file

@ -1,12 +0,0 @@
{pkgs, ...}: {
output.plugins = with pkgs.vimPlugins; [
luasnip
];
output.extraConfig = ''
lua << EOF
require('luasnip-config')
require("luasnip.loaders.from_vscode").lazy_load()
require("luasnip.loaders.from_vscode").lazy_load({ paths = '${./snippets}' })
EOF
'';
}

View file

@ -1,23 +0,0 @@
{
pkgs,
lib,
config,
...
}:
with lib; {
output.plugins = with pkgs.vimPlugins; [null-ls-nvim plenary-nvim];
output.config_file = ''
lua require("null-ls-config")
'';
output.path.path = with pkgs; [
# Formatters
stylua
nixfmt
rustfmt
black
# Linters
];
}

View file

@ -1,32 +0,0 @@
{pkgs, ...}: {
output.plugins = with pkgs.vimPlugins; [
nvim-cmp
# Various sources
cmp_luasnip
cmp-buffer
cmp-calc
cmp-spell
cmp-path
cmp-nvim-lua
cmp-nvim-lsp
cmp-latex-symbols
];
output.extraConfig = "lua require('cmp-config')";
plugin.setup.cmp = {
# TODO: maybe do non-default keybindings?
# See :help cmp-mapping
sources = [
{name = "path";}
{name = "calc";}
{name = "nvim_lsp";}
{name = "nvim_lua";}
{name = "latex_symbols";}
{name = "buffer";}
];
};
}

View file

@ -1,7 +0,0 @@
{
"name": "custom-snippets",
"engines": {
"vscode": "^1.11.0"
},
"contributes": {}
}

View file

@ -1,20 +0,0 @@
{
pkgs,
lib,
config,
...
}:
with lib; let
cfg = config.treesitter;
grammars = pkgs.tree-sitter.builtGrammars;
in {
options.treesitter.enable = mkEnableOption "tree-sitter";
config = mkIf cfg.enable {
plugin.setup."nvim-treesitter.configs" = {
highlight.enable = true;
};
output.plugins = with pkgs.vimPlugins; [(nvim-treesitter.withPlugins (_: pkgs.tree-sitter.allGrammars))];
};
}

View file

@ -1,28 +0,0 @@
{pkgs, ...}: {
output.plugins = with pkgs.vimPlugins; [zk-nvim];
output.config_file = ''
lua require("zk-config")
'';
vim.keybindings = {
keybindings = {
"<leader>".z = {
n = {
command = "<Cmd>ZkNew { title = vim.fn.input('Title: ') }<CR>";
label = "Create new Zettel";
};
o = {
command = "<Cmd>ZkNotes { sort = { 'modified' } }<CR>";
label = "Open Zettel";
};
t = {
command = "<Cmd>ZkTags<CR>";
label = "Open Zettel associated with selected tags";
};
f = {
command = "<Cmd>ZkNotes { sort = { 'modified' }, match = vim.fn.input('Search: ') }<CR>";
label = "Search for Zettel given a given query";
};
};
};
};
}

View file

@ -1,26 +0,0 @@
local cmp = require("cmp")
cmp.setup({
snippet = {
expand = function(args)
require('luasnip').lsp_expand(args.body)
end,
},
mapping = cmp.mapping.preset.insert({
['<C-b>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-Space>'] = cmp.mapping.complete(),
['<C-e>'] = cmp.mapping.abort(),
['<CR>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
}),
sources = cmp.config.sources({
{ name = "nvim_lsp" },
{ name = "luasnip" },
{ name = "buffer" },
{ name = "calc" },
{ name = "spell" },
{ name = "path" },
{ name = "nvim_lua" },
{ name = "latex-symbols" }
})
})

View file

@ -1,57 +0,0 @@
vim.api.nvim_create_autocmd({ "FileType" }, {
pattern = { "java" },
callback = function()
local jdtls = require("jdtls")
local root_markers = { "gradlew", ".git" }
local root_dir = require("jdtls.setup").find_root(root_markers)
local home = os.getenv("HOME")
local workspace_folder = home .. "/.cache/nvim/java/" .. vim.fn.fnamemodify(root_dir, ":p:h:t")
local config = {
cmd = {
"@jdt-language-server@/bin/jdt-language-server",
"-data",
workspace_folder,
},
java = {
signatureHelp = { enabled = true },
contentProvider = { preferred = "fernflower" },
codeGeneration = {
toString = {
template = "${object.className}{${member.name()}=${member.value}, ${otherMembers}}",
},
hashCodeEquals = {
useJava7Objects = true,
},
useBlocks = true,
},
configuration = {
runtimes = {
{
name = "JavaSE-17",
path = "@openjdk@",
},
},
},
},
onAttach = function(client, bufnr)
require("me.lsp.conf").on_attach(client, bufnr, {
server_side_fuzzy_completion = true,
})
jdtls.setup_dap({ hotcodereplace = "auto" })
jdtls.setup.add_commands()
local opts = { silent = true, buffer = bufnr }
vim.keymap.set("n", "<A-o>", jdtls.organize_imports, opts)
vim.keymap.set("n", "<leader>df", jdtls.test_class, opts)
vim.keymap.set("n", "<leader>dn", jdtls.test_nearest_method, opts)
vim.keymap.set("n", "crv", jdtls.extract_variable, opts)
vim.keymap.set("v", "crm", [[<ESC><CMD>lua require('jdtls').extract_method(true)<CR>]], opts)
vim.keymap.set("n", "crc", jdtls.extract_constant, opts)
local create_command = vim.api.nvim_buf_create_user_command
create_command(bufnr, "W", require("me.lsp.ext").remove_unused_imports, {
nargs = 0,
})
end,
}
end,
})

View file

@ -1,17 +0,0 @@
local wk = require("which-key")
wk.register({
-- File commands
f = {
name = "file",
f = { vim.lsp.buf.formatting, "Format file" },
n = { "<cmd>new", "New File" },
o = { require'telescope-config'.project_files, "Find File" },
l = { require'telescope.builtin'.find_files, "Find Local File" },
h = { require'telescope-config'.home_files, "Find Global File" },
b = { require'telescope-config'.all_buffers, "Switch Buffer" },
["/"] = { "<cmd>Telescope live_grep<cr>", "Grep Project" },
},
}, { prefix = "<leader>" })

View file

@ -1,25 +0,0 @@
local ls = require('luasnip')
local s = ls.snippet
local i = ls.insert_node
local t = ls.text_node
local c = ls.choice_node
local sn = ls.snippet_node
local isn = ls.indent_snippet_node
local fmt = require('luasnip.extras.fmt').fmt
local types = require("luasnip.util.types")
ls.config.setup({
ext_opts = {
[types.choiceNode] = {
active = {
virt_text = {{"", "GruvboxOrange"}}
}
},
[types.insertNode] = {
active = {
virt_text = {{"", "GruvboxBlue"}}
}
}
},
})

View file

@ -1,58 +0,0 @@
-- small script to automatically compile my markdown documents
-- to use put `lua require'mdpreview'.open_preview()` somewhere in your keymappings
-- TODO: Make use of vim.schedule
local M = {}
local Job = require'plenary.job'
local zathura_open = function()
local filename = vim.fn.expand("%:r") .. ".pdf"
Job:new({
command = 'zathura',
args = {filename},
on_exit = function(j, ret_val)
if ret_val ~= 0 then
error("Error while viewing `" .. filename .. "`: " .. ret_val)
end
end,
}):start()
end
M.markdown_compile = function()
local filename = vim.fn.expand("%")
local output = vim.fn.expand("%:r") .. ".pdf"
-- local filename_with_lua = vim.api.nvim_buf_get_name(0)
-- TODO: put non-blocking timeout on these jobs
-- TODO: report errors (from stderr)
Job:new({
command = 'pandoc',
args = {filename, "-o", output},
on_exit = function(j, ret_val)
if ret_val == 0 then
print("Successfully compiled " .. filename)
else
print("Error while compiling " .. filename)
end
end,
-- Timeout of 30 seconds
-- }):sync(30 * 1000)
}):start()
end
M.open_preview = function()
vim.api.nvim_exec([[
augroup mdpreview
autocmd!
au BufWritePost *.md lua require'mdpreview'.markdown_compile()
augroup END
]], false)
M.markdown_compile()
zathura_open()
end
return M

View file

@ -1,39 +0,0 @@
local n = require("null-ls")
local h = require("null-ls.helpers")
local methods = require("null-ls.methods")
local FORMATTING = methods.internal.FORMATTING
n.setup({
sources = {
n.builtins.formatting.stylua,
n.builtins.formatting.rustfmt,
n.builtins.formatting.nixfmt,
-- https://github.com/jose-elias-alvarez/null-ls.nvim/issues/640
n.builtins.formatting.black.with({ args = { "--quiet", "-" } }),
},
})
local lsp_formatting = function(bufnr)
vim.lsp.buf.format({
filter = function(client)
return client.name == "null-ls"
end,
bufnr = bufnr,
})
end
local augroup = vim.api.nvim_create_augroup("LspFormatting", {})
local on_attach = function(client, bufnr)
if client.supports_method("textDocument/formatting") then
vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
vim.api.nvim_create_autocmd("BufWritePre", {
group = augroup,
buffer = bufnr,
callback = function()
lsp_formatting(bufnr)
end,
})
end
end

View file

@ -1,68 +0,0 @@
local rt = require("rust-tools")
rt.setup({
server = {
on_attach = function(_, bufnr)
-- Hover actions
vim.keymap.set("n", "<C-space>", rt.hover_actions.hover_actions, { buffer = bufnr })
-- Code action groups
vim.keymap.set("n", "<Leader>a", rt.code_action_group.code_action_group, { buffer = bufnr })
end,
settings = {
["rust-analyzer"] = {
checkOnSave = {
command = "clippy",
extraArgs = {
"--",
"-W clippy::cargo",
"-W clippy::pedantic",
"-W clippy::allow_attributes_without_reason",
"-W clippy::clone_on_ref_ptr",
"-W clippy::create_dir",
"-W clippy::decimal_literal_representation",
"-D unsafe_code",
"-W clippy::deref_by_slicing",
"-W clippy::empty_drop",
"-W clippy::empty_structs_with_brackets",
"-W clippy::exhaustive_enums",
"-W clippy::exit",
"-W clippy::expect_used",
"-W clippy::panic",
"-W clippy::filetype_is_file",
"-W clippy::float_cmp_const",
"-D clippy::fn_to_numeric_cast_any",
"-W clippy::format_push_string",
"-W clippy::if_then_some_else_none",
"-W clippy::let_underscore_must_use",
"-W clippy::lossy_float_literal",
"-W clippy::map_err_ignore",
"-W clippy::mem_forget",
"-W missing_docs",
"-W clippy::missing_docs_in_private_items",
"-W clippy::mixed_read_write_in_expression",
"-W clippy::rc_buffer",
"-D clippy::rc_mutex",
"-W clippy::str_to_string",
"-W clippy::string_add",
"-W clippy::string_to_string",
"-W clippy::try_err",
"-D clippy::unwrap_used",
"-W clippy::nursery",
},
},
hover = {
actions = {
references = {
enable = true,
},
},
},
imports = {
granularity = {
enforce = true,
},
},
},
},
},
})

View file

@ -1,23 +0,0 @@
local M = {}
M.project_files = function()
local opts = {} -- define here if you want to define something
local ok = pcall(require'telescope.builtin'.git_files, opts)
if not ok then require'telescope.builtin'.find_files(opts) end
end
M.home_files = function()
require'telescope.builtin'.find_files({
search_dirs = { "~/Literatuur", "~/Documents", "/etc/nixos", "~/.config" },
})
end
M.all_buffers = function()
require'telescope.builtin'.buffers({
show_all_buffers = true,
only_cwd = false,
sort_lastused = true,
})
end
return M

View file

@ -1,67 +0,0 @@
require("zk").setup({
picker = "telescope",
lsp = {
config = {
cmd = { "zk", "lsp" },
name = "zk",
}
},
auto_attach = {
enabled = true,
filetypes = { "markdown" },
}
})
-- TODO: nvim-nix does not support multiple keybindings in different modes yet
vim.api.nvim_set_keymap("v", "<leader>zf", ":'<,'>ZkMatch<CR>", { noremap = true, silent = false })
require("which-key").register({
z = {
name = "Zettelkasten"
}
}, { prefix = "<leader>" })
vim.api.nvim_create_autocmd({ "FileType" }, {
pattern = { "markdown" },
callback = function()
if require("zk.util").notebook_root(vim.fn.expand('%:p')) ~= nil then
local function map(...) vim.api.nvim_buf_set_keymap(0, ...) end
local opts = { noremap=true, silent=false }
-- Open the link under the caret.
map("n", "<CR>", "<Cmd>lua vim.lsp.buf.definition()<CR>", opts)
-- Create a new note after asking for its title.
-- This overrides the global `<leader>zn` mapping to create the note in the same directory as the current buffer.
map("n", "<leader>zn", "<Cmd>ZkNew { dir = vim.fn.expand('%:p:h'), title = vim.fn.input('Title: ') }<CR>", opts)
-- Create a new note in the same directory as the current buffer, using the current selection for title.
map("v", "<leader>znt", ":'<,'>ZkNewFromTitleSelection { dir = vim.fn.expand('%:p:h') }<CR>", opts)
-- Create a new note in the same directory as the current buffer, using the current selection for note content and asking for its title.
map("v", "<leader>znc", ":'<,'>ZkNewFromContentSelection { dir = vim.fn.expand('%:p:h'), title = vim.fn.input('Title: ') }<CR>", opts)
-- Open notes linking to the current buffer.
map("n", "<leader>zb", "<Cmd>ZkBacklinks<CR>", opts)
-- Alternative for backlinks using pure LSP and showing the source context.
--map('n', '<leader>zb', '<Cmd>lua vim.lsp.buf.references()<CR>', opts)
-- Open notes linked by the current buffer.
map("n", "<leader>zl", "<Cmd>ZkLinks<CR>", opts)
-- Preview a linked note.
map("n", "<leader>zp", "<Cmd>lua vim.lsp.buf.hover()<CR>", opts)
-- Open the code actions for a visual selection.
map("v", "<leader>za", ":'<,'>lua vim.lsp.buf.range_code_action()<CR>", opts)
require("which-key").register({
z = {
n = {
name = "New",
t = "New note with title from selection",
c = "New note with content from selection"
},
b = "Open backlinks",
l = "Open links",
p = "Preview linked note",
a = "Open code actions"
}
}, { prefix = "<leader>" })
end
end
})

View file

@ -1 +0,0 @@
{pkgs, ...}: {output.plugins = with pkgs.vimPlugins; [editorconfig-nvim];}

View file

@ -1,45 +0,0 @@
{
pkgs,
lib,
config,
...
}: {
vim.keybindings.keybindings-shortened."<leader>fk" = {
command = ":lua require'telescope'.extensions.file_browser.file_browser(require'telescope.themes'.get_ivy({ initial_mode = 'normal', default_selection_index = 2, }))<CR>";
label = "Browse Files";
};
output.extraConfig = ''
lua << EOF
local tele = require'telescope'
local fba = tele.extensions.file_browser.actions
local tla = require'telescope.actions'
tele.setup {
extensions = {
file_browser = {
mappings = {
["n"] = {
["h"] = fba.goto_parent_dir,
["l"] = tla.select_default,
["e"] = tla.select_default,
-- Misc
["zh"] = fba.toggle_hidden,
["~"] = fba.goto_home_dir,
["`"] = fba.goto_cwd,
["="] = fba.change_cwd,
},
}
}
}
}
tele.load_extension("file_browser")
EOF
'';
output.plugins = [
pkgs.telescope-file-browser-nvim
];
}

View file

@ -1,21 +0,0 @@
{pkgs, ...}: {
output.extraConfig = ''
lua <<EOF
local actions = require('telescope.actions')
require('telescope').setup{
defaults = {
mappings = {
i = {
["<esc>"] = actions.close
},
},
}
}
EOF
'';
output.path.path = with pkgs; [fd ripgrep];
output.plugins = with pkgs.vimPlugins; [telescope-nvim];
}

View file

@ -1,9 +0,0 @@
{pkgs, ...}: {
vim.keybindings.which-key-nvim = true;
plugin.setup.which-key = {
# Only start which-key.nvim for these keys
# I was getting sick and tired of it opening on random operators...
triggers = ["<leader>" "g" "z" "<C-w>" "\""];
};
}

View file

@ -1,3 +0,0 @@
{pkgs, ...}: {
output.plugins = with pkgs.vimPlugins; [vim-repeat];
}

View file

@ -1,3 +0,0 @@
{pkgs, ...}: {
output.plugins = with pkgs.vimPlugins; [vim-surround];
}

View file

@ -1,79 +0,0 @@
{
pkgs,
lib,
...
}: {
vim.keybindings = {
keybindings = {
"[" = {
b = {
command = "<cmd>BufferLineCycleNext<CR>";
label = "Navigate to next buffer";
options.silent = true;
};
};
"]" = {
b = {
command = "<cmd>BufferLineCyclePrev<CR>";
label = "Navigate to previous buffer";
options.silent = true;
};
};
"<leader>" = {
b =
{
d = {
command = "<cmd>BufferLineSortByDirectory<CR>";
label = "Sort bufferline by directory";
options.silent = true;
};
e = {
command = "<cmd>BufferLineSortByExtension<CR>";
label = "Sort bufferline by extension";
options.silent = true;
};
"$" = {
command = "<cmd>BufferLineGoToBuffer -1<CR>";
label = "Go to last buffer";
options.silent = true;
};
}
// (lib.attrsets.genAttrs ["0" "1" "2" "3" "4" "5" "6" "7" "8" "9"] (n: {
command = "<cmd>BufferLineGoToBuffer ${n}<CR>";
label = "Go to buffer ${n}";
options.silent = true;
}));
};
g = {
b = {
command = "<cmd>BufferLinePick<CR>";
label = "Go to buffer";
options.silent = true;
};
};
};
};
output.plugins = with pkgs.vimPlugins; [
bufferline-nvim
];
output.extraConfig = ''
set termguicolors
set tabline=
lua << EOF
require("bufferline").setup{
options = {
diagnostics = "nvim_lsp",
diagnostics_indicator = function(count, level, diagnostics_dict, context)
local s = " "
for e, n in pairs(diagnostics_dict) do
local sym = e == "error" and " "
or (e == "warning" and " " or "" )
s = s .. n .. sym
end
return s
end
}
}
EOF
'';
}

View file

@ -1,10 +0,0 @@
{pkgs, ...}: let
scheme = "gruvbox";
in {
output.config_file = "colo ${scheme}";
vim.g.lightline.colorscheme = scheme;
vim.g.tokyonight_style = "storm";
output.plugins = with pkgs.vimPlugins; [gruvbox tokyonight-nvim];
}

View file

@ -1,9 +0,0 @@
{pkgs, ...}: {
plugin.setup.gitsigns = {
# Disable default keybindings
keymaps = {};
};
output.plugins = with pkgs.vimPlugins; [gitsigns-nvim];
output.path.path = with pkgs; [git];
}

View file

@ -1,27 +0,0 @@
{pkgs, ...}: {
vim.opt.showmode = false;
vim.g.lightline = {
active = {
left = [["mode" "paste"] ["readonly" "filename" "modified"]];
right = [
["lineinfo"]
["percent"]
["fileformat" "fileencoding" "filetype"]
];
};
separator = {
left = "";
right = "";
};
subseparator = {
left = "";
right = "";
};
enable = {
tabline = 0;
};
};
output.plugins = with pkgs.vimPlugins; [lightline-vim];
}

View file

@ -1,9 +0,0 @@
{pkgs, ...}: {
vim.keybindings.keybindings-shortened = {
"<leader>gt" = {command = "<cmd>TodoTelescope<cr>";};
};
plugin.setup.todo-comments = {};
output.plugins = with pkgs.vimPlugins; [todo-comments-nvim];
}

View file

@ -1,5 +0,0 @@
{pkgs, ...}: {
output.plugins = with pkgs.vimPlugins; [
nvim-web-devicons
];
}

View file

@ -1,12 +0,0 @@
{
output.extraConfig = ''
" Highlight trailing whitespace
" https://idie.ru/posts/vim-modern-cpp
highlight ExtraWhitespace ctermbg=red guibg=red
match ExtraWhitespace /\s\+$/
au BufWinEnter * match ExtraWhitespace /\s\+$/
au InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
au InsertLeave * match ExtraWhitespace /\s\+$/
au BufWinLeave * call clearmatches()
'';
}

View file

@ -13,8 +13,8 @@
name = "akkoma-static";
src = pkgs.emptyDirectory;
nativeBuildInputs = with pkgs; [xorg.lndir];
akkoma_fe = nix-packages.packages.${pkgs.system}.akkoma-fe;
akkoma_admin_fe = nix-packages.packages.${pkgs.system}.akkoma-admin-fe;
akkoma_fe = nix-packages.packages.${pkgs.system}.pleroma-fe;
akkoma_admin_fe = nix-packages.packages.${pkgs.system}.admin-fe;
raccoon_emoji = raccoon-emoji;
dontUnpack = false;
installPhase = ''

View file

@ -3,14 +3,14 @@
system,
...
}: let
inherit (nix-packages.packages.${system}) homepage-old;
inherit (nix-packages.packages.${system}) old-homepage;
in {
systemd.services.homepage-old = {
enable = true;
description = "darkkirb.de";
script = "${homepage-old}/homepage";
script = "${old-homepage}/homepage";
serviceConfig = {
WorkingDirectory = homepage-old;
WorkingDirectory = old-homepage;
EnvironmentFile = "/run/secrets/services/old-homepage";
};
wantedBy = ["multi-user.target"];

View file

@ -4,6 +4,7 @@
nixpkgs-noto-variable,
nix-packages,
nix-hotfix,
hydra,
...
}:
with nixpkgs.legacyPackages.${system}; let
@ -12,7 +13,10 @@ in {
nixpkgs.overlays = [
(self: prev:
{
hydra-unstable = nix-packages.packages.${system}.hydra;
hydra-unstable = hydra.packages.${system}.hydra.overrideAttrs (_: {
checkPhase = "true";
installCheckPhase = "true";
});
mosh = prev.mosh.overrideAttrs (old: {
patches = [
./mosh/ssh_path.patch

View file

@ -1,53 +1,5 @@
{
"nodes": {
"akkoma": {
"flake": false,
"locked": {
"lastModified": 1663681394,
"narHash": "sha256-drPjai3e2koQ9NocQObPzQtQuqiSDDBe9zVFGuEkwM0=",
"ref": "refs/heads/develop",
"rev": "07295f7c8ce8109f1a2df23b0d7c62d230319c82",
"revCount": 14734,
"type": "git",
"url": "https://akkoma.dev/AkkomaGang/akkoma"
},
"original": {
"type": "git",
"url": "https://akkoma.dev/AkkomaGang/akkoma"
}
},
"akkoma-admin-fe": {
"flake": false,
"locked": {
"lastModified": 1661801796,
"narHash": "sha256-dqkW8p4x+5z1Hd8gp8V4+DsLm8EspVwPXDxtvlp1AIk=",
"ref": "refs/heads/develop",
"rev": "6b131e0779b16f8f3c1021b2a0e72b4e7a271c4c",
"revCount": 1961,
"type": "git",
"url": "https://akkoma.dev/AkkomaGang/admin-fe"
},
"original": {
"type": "git",
"url": "https://akkoma.dev/AkkomaGang/admin-fe"
}
},
"akkoma-fe": {
"flake": false,
"locked": {
"lastModified": 1663687733,
"narHash": "sha256-lMeo8iPfmq/TrBFzDCjn09cKjeUZDOvTV5LIaobGbkU=",
"ref": "refs/heads/develop",
"rev": "2ab223e791a6d9e172f2863429f9e632e15d45ec",
"revCount": 6750,
"type": "git",
"url": "https://akkoma.dev/AkkomaGang/pleroma-fe"
},
"original": {
"type": "git",
"url": "https://akkoma.dev/AkkomaGang/pleroma-fe"
}
},
"android-nixpkgs": {
"inputs": {
"devshell": "devshell_2",
@ -71,43 +23,6 @@
"type": "github"
}
},
"cargo2nix": {
"inputs": {
"flake-compat": "flake-compat",
"flake-utils": "flake-utils_7",
"nixpkgs": "nixpkgs_6",
"rust-overlay": "rust-overlay_2"
},
"locked": {
"lastModified": 1655189312,
"narHash": "sha256-gpJ57OgIebUpO+7F00VltxSEy6dz2x6HeJ5BcRM8rDA=",
"owner": "cargo2nix",
"repo": "cargo2nix",
"rev": "c149357cc3d17f2849c73eb7a09d07a307cdcfe8",
"type": "github"
},
"original": {
"owner": "cargo2nix",
"repo": "cargo2nix",
"type": "github"
}
},
"clean-s3-cache": {
"flake": false,
"locked": {
"lastModified": 1654955107,
"narHash": "sha256-eOT9UWpp75gchFDhgnwj1UpVBAZZG5nJUl6N+JAIkT8=",
"ref": "refs/heads/main",
"rev": "1a4dc9cc727b1f824507f28d35cbc93008d7de76",
"revCount": 2,
"type": "git",
"url": "https://gist.github.com/DarkKirb/533e9e8b9b6dd1badf9b103b4285dc4e"
},
"original": {
"type": "git",
"url": "https://gist.github.com/DarkKirb/533e9e8b9b6dd1badf9b103b4285dc4e"
}
},
"crane": {
"flake": false,
"locked": {
@ -245,22 +160,6 @@
"type": "github"
}
},
"drone-runner-docker": {
"flake": false,
"locked": {
"lastModified": 1655209621,
"narHash": "sha256-ZpkVfzqeltZSYrKYB6dXtlVjl1uFpQdl2fa+c5ApiW4=",
"owner": "drone-runners",
"repo": "drone-runner-docker",
"rev": "47ee73d829ac4796415b8ccb6c96bbbf43da8d18",
"type": "github"
},
"original": {
"owner": "drone-runners",
"repo": "drone-runner-docker",
"type": "github"
}
},
"ema": {
"flake": false,
"locked": {
@ -283,15 +182,16 @@
"ema": "ema",
"flake-parts": "flake-parts",
"haskell-flake": "haskell-flake",
"heist-extra": "heist-extra",
"nixpkgs": "nixpkgs_2",
"tailwind-haskell": "tailwind-haskell"
},
"locked": {
"lastModified": 1663457373,
"narHash": "sha256-bUbodi7k4olGBuf6WFOEcQwwt766NWnZtKifUN47u24=",
"lastModified": 1664240759,
"narHash": "sha256-vrF0MIaxHFXyjvAeCDg6L5JDsydb/VDUdKqOyNE0Dy8=",
"owner": "EmaApps",
"repo": "emanote",
"rev": "61fd13fb7466bab05eb417824f744a7251334df8",
"rev": "c6f87e7f52f058626ee88e32831048cbebb62c5d",
"type": "github"
},
"original": {
@ -316,22 +216,6 @@
"type": "github"
}
},
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1650374568,
"narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "b4a34015c698c7793d592d66adbab377907a2be8",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": {
"inputs": {
"nixpkgs": [
@ -445,21 +329,6 @@
}
},
"flake-utils_7": {
"locked": {
"lastModified": 1653893745,
"narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_8": {
"locked": {
"lastModified": 1659877975,
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
@ -474,25 +343,6 @@
"type": "github"
}
},
"gomod2nix": {
"inputs": {
"nixpkgs": "nixpkgs_7",
"utils": "utils"
},
"locked": {
"lastModified": 1660809738,
"narHash": "sha256-/yM36JkONdmYsQAW3F2YAXse2cgEb3QffOjBn8sqEXw=",
"ref": "refs/heads/master",
"rev": "10983293d08a6e3d6fa277eba417b8e399e361a5",
"revCount": 171,
"type": "git",
"url": "https://git.chir.rs/darkkirb/gomod2nix"
},
"original": {
"type": "git",
"url": "https://git.chir.rs/darkkirb/gomod2nix"
}
},
"haskell-flake": {
"locked": {
"lastModified": 1661726764,
@ -508,6 +358,22 @@
"type": "github"
}
},
"heist-extra": {
"flake": false,
"locked": {
"lastModified": 1663962912,
"narHash": "sha256-AxzbGM1/l4Sm6zI5aunMA3cbdlDNHBecROKTaAEawxU=",
"owner": "srid",
"repo": "heist-extra",
"rev": "29c719ded6606da19c21b182cf465b9620cda0b2",
"type": "github"
},
"original": {
"owner": "srid",
"repo": "heist-extra",
"type": "github"
}
},
"helix": {
"inputs": {
"nci": "nci",
@ -515,11 +381,11 @@
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1663860810,
"narHash": "sha256-NJubeVByiZz+0oU6f+OCaltxOZnUW4AGUipnj0RBYnk=",
"lastModified": 1664475105,
"narHash": "sha256-+Q7jyAMgXcCba6Z+2oA1ahXWKkmMqn0dPgz9t3DyEiQ=",
"owner": "helix-editor",
"repo": "helix",
"rev": "eb6fd283dcf041ecf822fd8f2d4520abb2a26df9",
"rev": "8a7a6e4cff1db3ef65a2c20e0e90c60b44516e27",
"type": "github"
},
"original": {
@ -552,11 +418,11 @@
"hosts-list": {
"flake": false,
"locked": {
"lastModified": 1663439809,
"narHash": "sha256-MJPWv8Cg9zpHqe5jSy21VA1HPkVo4qLjVRbmncQ58SA=",
"lastModified": 1664505343,
"narHash": "sha256-Q77ks/5m/7Af7C+DnEomQY/TYxhiJj8G/J1dHdJgLqA=",
"owner": "StevenBlack",
"repo": "hosts",
"rev": "4b00782ca09da629ea343a3c24c46442ce38f770",
"rev": "76453b4ca4983a7305a42ac27b852b52e0060702",
"type": "github"
},
"original": {
@ -570,7 +436,6 @@
"newNixpkgs": "newNixpkgs",
"nix": "nix",
"nixpkgs": [
"nix-packages",
"hydra",
"nix",
"nixpkgs"
@ -595,7 +460,7 @@
"inputs": {
"android-nixpkgs": "android-nixpkgs",
"flake-utils": "flake-utils_6",
"nixpkgs": "nixpkgs_4"
"nixpkgs": "nixpkgs_5"
},
"locked": {
"lastModified": 1661695658,
@ -611,22 +476,6 @@
"url": "https://git.chir.rs/darkkirb/Programmierbeleg"
}
},
"kreative-open-relay": {
"flake": false,
"locked": {
"lastModified": 1662351068,
"narHash": "sha256-gV/1CnIPrFeTBHU0WyBBc9SdbnExai2RnRfhceCvvsw=",
"owner": "kreativekorp",
"repo": "open-relay",
"rev": "cbaca8d9d6d65bddbc05dd3e20b7063639f6664a",
"type": "github"
},
"original": {
"owner": "kreativekorp",
"repo": "open-relay",
"type": "github"
}
},
"libnbtplusplus": {
"flake": false,
"locked": {
@ -675,118 +524,6 @@
"type": "github"
}
},
"matrix-media-repo": {
"flake": false,
"locked": {
"lastModified": 1660710533,
"narHash": "sha256-6brtTyWmkYhHiaT/sRIKy6L1LHH27BZBQBWk+o1j42E=",
"owner": "turt2live",
"repo": "matrix-media-repo",
"rev": "b821ac0a9e2bb152fc3f572e6d502c3266e99ea5",
"type": "github"
},
"original": {
"owner": "turt2live",
"repo": "matrix-media-repo",
"type": "github"
}
},
"mautrix-discord": {
"flake": false,
"locked": {
"lastModified": 1663622286,
"narHash": "sha256-j/LjX41ajTzUTrwsvLO8fjPCJXwHkSe8P9ClYOj51I4=",
"owner": "mautrix",
"repo": "discord",
"rev": "6be531685f308f081675034904d89c9e920be996",
"type": "github"
},
"original": {
"owner": "mautrix",
"repo": "discord",
"type": "github"
}
},
"mautrix-signal": {
"flake": false,
"locked": {
"lastModified": 1663683205,
"narHash": "sha256-g+4V9tQosxv9PuoRSl313aYeazYEWs+8ChyvSfH8P+8=",
"owner": "mautrix",
"repo": "signal",
"rev": "f68e2a8b597132f4bc0b3a9b02170a659f0507a9",
"type": "github"
},
"original": {
"owner": "mautrix",
"repo": "signal",
"type": "github"
}
},
"mautrix-telegram": {
"flake": false,
"locked": {
"lastModified": 1663763261,
"narHash": "sha256-TLR5IdZi5RrUjMtBQV6t5PBNzGN/9HpbWL4oTQK/Ix8=",
"owner": "mautrix",
"repo": "telegram",
"rev": "bcb30ce807c32304787244bf5a441da89900bcfc",
"type": "github"
},
"original": {
"owner": "mautrix",
"repo": "telegram",
"type": "github"
}
},
"mautrix-whatsapp": {
"flake": false,
"locked": {
"lastModified": 1663684272,
"narHash": "sha256-eEHB+VtXFdUroiC437E9FzcHHU6VyEwaupC2nthx3Rc=",
"owner": "mautrix",
"repo": "whatsapp",
"rev": "f0401ee81e2e71262498d4e34e25c141b5b92acd",
"type": "github"
},
"original": {
"owner": "mautrix",
"repo": "whatsapp",
"type": "github"
}
},
"miifox-net": {
"flake": false,
"locked": {
"lastModified": 1648216492,
"narHash": "sha256-OKGPwQZjZXbXziJLSOE8K/0fCWCnvU/I2Lm3Vc8KD/o=",
"ref": "refs/heads/master",
"rev": "7826b9a3bec5dddd4b8a879c3396a1406fc37370",
"revCount": 5,
"type": "git",
"url": "https://git.chir.rs/CarolineHusky/MiiFox.net"
},
"original": {
"type": "git",
"url": "https://git.chir.rs/CarolineHusky/MiiFox.net"
}
},
"nasin-nanpa": {
"flake": false,
"locked": {
"lastModified": 1653261911,
"narHash": "sha256-f92PUd4pIS7wK5W0vJ79Qvtw1d8VVW0gquBWW1XWSpw=",
"owner": "ETBCOR",
"repo": "nasin-nanpa",
"rev": "4cf4a762576d8ca2818683139ab1d04d149c9bec",
"type": "github"
},
"original": {
"owner": "ETBCOR",
"repo": "nasin-nanpa",
"type": "github"
}
},
"nci": {
"inputs": {
"devshell": "devshell",
@ -832,9 +569,9 @@
},
"nix": {
"inputs": {
"lowdown-src": "lowdown-src_2",
"nixpkgs": "nixpkgs_8",
"nixpkgs-regression": "nixpkgs-regression_2"
"lowdown-src": "lowdown-src",
"nixpkgs": "nixpkgs_4",
"nixpkgs-regression": "nixpkgs-regression"
},
"locked": {
"lastModified": 1654014617,
@ -853,9 +590,9 @@
},
"nix-hotfix": {
"inputs": {
"lowdown-src": "lowdown-src",
"nixpkgs": "nixpkgs_5",
"nixpkgs-regression": "nixpkgs-regression"
"lowdown-src": "lowdown-src_2",
"nixpkgs": "nixpkgs_6",
"nixpkgs-regression": "nixpkgs-regression_2"
},
"locked": {
"lastModified": 1657886512,
@ -872,60 +609,19 @@
"type": "github"
}
},
"nix-neovim": {
"nix-packages": {
"inputs": {
"flake-utils": "flake-utils_7",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1650651888,
"narHash": "sha256-2lC6oeQMTke7/bx8VxLNJr54A/WGkdAv2H0iebTmACY=",
"owner": "syberant",
"repo": "nix-neovim",
"rev": "6f03a1c206ff2c5bea209c73f861ebd8088de53b",
"type": "github"
},
"original": {
"owner": "syberant",
"repo": "nix-neovim",
"type": "github"
}
},
"nix-packages": {
"inputs": {
"akkoma": "akkoma",
"akkoma-admin-fe": "akkoma-admin-fe",
"akkoma-fe": "akkoma-fe",
"cargo2nix": "cargo2nix",
"clean-s3-cache": "clean-s3-cache",
"drone-runner-docker": "drone-runner-docker",
"flake-utils": "flake-utils_8",
"gomod2nix": "gomod2nix",
"hydra": "hydra",
"kreative-open-relay": "kreative-open-relay",
"matrix-media-repo": "matrix-media-repo",
"mautrix-discord": "mautrix-discord",
"mautrix-signal": "mautrix-signal",
"mautrix-telegram": "mautrix-telegram",
"mautrix-whatsapp": "mautrix-whatsapp",
"miifox-net": "miifox-net",
"nasin-nanpa": "nasin-nanpa",
"nixpkgs": [
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable",
"nvim-telescope-file-browser": "nvim-telescope-file-browser",
"plover": "plover",
"plover-machine-hid": "plover-machine-hid",
"steno-dictionaries": "steno-dictionaries"
},
"locked": {
"lastModified": 1664006624,
"narHash": "sha256-zYthffO/8lMY4z3zt4O1yJIt1LCu0fKn5rb+Wwiktco=",
"lastModified": 1664552229,
"narHash": "sha256-0C+cZr+O/VUUN+GV3jaiucmX48ap1VzFGbhZsJismfQ=",
"ref": "main",
"rev": "c772008ceb0a38c7f85f7ae7bbcd83b021da7081",
"revCount": 249,
"rev": "d67f5025c97c769a6db52bf7c516eb3ff9a1ddde",
"revCount": 292,
"type": "git",
"url": "https://git.chir.rs/DarkKirb/nix-packages"
},
@ -937,11 +633,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1663229557,
"narHash": "sha256-1uU4nsDLXKG0AHc/VCsNBAEPkTA/07juYhcEWRb1O1E=",
"lastModified": 1664452918,
"narHash": "sha256-SfnQ2t5b9RTSIqO3PQBDlwrWn4l3t0F65sZtCKTl8eA=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "a0df6cd6e199df4a78c833c273781ea92fa62cfb",
"rev": "12f905b731494bc59010f05a7467df8abdcf8d63",
"type": "github"
},
"original": {
@ -967,11 +663,11 @@
},
"nixpkgs-22_05": {
"locked": {
"lastModified": 1663433994,
"narHash": "sha256-Bpthhv1PdZRrIFct8KbHACNvOu9bsYAMEaqoH83cvqM=",
"lastModified": 1664201777,
"narHash": "sha256-cUW9DqELUNi1jNMwVSbfq4yl5YGyOfeu+UHUUImbby0=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "17989edb05615c4f61803b9c427d80b84c289c6b",
"rev": "00f877f4927b6f7d7b75731b5a1e2ae7324eaf14",
"type": "github"
},
"original": {
@ -1023,10 +719,9 @@
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
"id": "nixpkgs",
"rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2",
"type": "github"
"type": "indirect"
}
},
"nixpkgs-regression_2": {
@ -1039,24 +734,9 @@
"type": "github"
},
"original": {
"id": "nixpkgs",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2",
"type": "indirect"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1663760840,
"narHash": "sha256-ym5Iycs5H4cOaLfE2/vC0tsLp8XuBJQIHGV8/uXSy8M=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9bdbbaa634aa666eb6a27096bdcb991c59181244",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-22.05",
"repo": "nixpkgs",
"type": "github"
}
},
@ -1093,6 +773,21 @@
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1645296114,
"narHash": "sha256-y53N7TyIkXsjMpOG7RhvqJFGDacLs9HlyHeSTBioqYU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "530a53dcbc9437363471167a5e4762c5fcfa34a1",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-21.05-small",
"type": "indirect"
}
},
"nixpkgs_5": {
"locked": {
"lastModified": 1661323386,
"narHash": "sha256-7BxU3dM5oCAwMs8ggblXV0yAIGCfVK6l0vfDvoEIBs8=",
@ -1107,7 +802,7 @@
"type": "github"
}
},
"nixpkgs_5": {
"nixpkgs_6": {
"locked": {
"lastModified": 1657693803,
"narHash": "sha256-G++2CJ9u0E7NNTAi9n5G8TdDmGJXcIjkJ3NF8cetQB8=",
@ -1123,60 +818,13 @@
"type": "github"
}
},
"nixpkgs_6": {
"locked": {
"lastModified": 1654275867,
"narHash": "sha256-pt14ZE4jVPGvfB2NynGsl34pgXfOqum5YJNpDK4+b9E=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "7a20c208aacf4964c19186dcad51f89165dc7ed0",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "release-22.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_7": {
"locked": {
"lastModified": 1658285632,
"narHash": "sha256-zRS5S/hoeDGUbO+L95wXG9vJNwsSYcl93XiD0HQBXLk=",
"lastModified": 1664552672,
"narHash": "sha256-JtlIZLmjiVJG9V77eYYbzYTYTyUDEV4lGuvlMkZYEGk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5342fc6fb59d0595d26883c3cadff16ce58e44f3",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "master",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_8": {
"locked": {
"lastModified": 1645296114,
"narHash": "sha256-y53N7TyIkXsjMpOG7RhvqJFGDacLs9HlyHeSTBioqYU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "530a53dcbc9437363471167a5e4762c5fcfa34a1",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-21.05-small",
"type": "indirect"
}
},
"nixpkgs_9": {
"locked": {
"lastModified": 1663891222,
"narHash": "sha256-0+RuOLFaxhD5U+JAGggoNt1cCMwLsT2k56VLizjvkos=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "374f1f40ccedbd5d4cbe5c01e85e0062f49596dc",
"rev": "b881869205e82652b4c5ce7ebff3b3fea5a4817b",
"type": "github"
},
"original": {
@ -1187,11 +835,11 @@
},
"nur": {
"locked": {
"lastModified": 1663871140,
"narHash": "sha256-1HLjTL67ubOdPnIyECioP9TPNtL+NuxlY9D/qHpk7rA=",
"lastModified": 1664539007,
"narHash": "sha256-fu1K8bB5/M3muw7F/HtsDfnrdKXc+jsjz1Y/EZDqkXk=",
"owner": "nix-community",
"repo": "NUR",
"rev": "a643ef20f4722ae40f8949be4c453271172be25a",
"rev": "0f445a1a765ced3874dba231303a14593d0b61bc",
"type": "github"
},
"original": {
@ -1200,69 +848,20 @@
"type": "github"
}
},
"nvim-telescope-file-browser": {
"flake": false,
"locked": {
"lastModified": 1663305358,
"narHash": "sha256-25nYpWCprrisPeaXCNVucdBwBpwWLEleQIQ6bqzZ1TY=",
"owner": "nvim-telescope",
"repo": "telescope-file-browser.nvim",
"rev": "60bcf4e70ecb9392445c2a2205ee8181dff964d5",
"type": "github"
},
"original": {
"owner": "nvim-telescope",
"repo": "telescope-file-browser.nvim",
"type": "github"
}
},
"plover": {
"flake": false,
"locked": {
"lastModified": 1648942277,
"narHash": "sha256-SiGt8tgB3haT+NsU7BOZZRSZ6FkrkHlabDPOoiCPoNw=",
"owner": "benoit-pierre",
"repo": "plover",
"rev": "9aa7c562ba8c6cf8fdd56b0a8304865cc58bc322",
"type": "github"
},
"original": {
"owner": "benoit-pierre",
"ref": "wayland-sway",
"repo": "plover",
"type": "github"
}
},
"plover-machine-hid": {
"flake": false,
"locked": {
"lastModified": 1658954470,
"narHash": "sha256-iuu32Q5pdgyRybaBv8NQajgziicdwWwqvZV7DwIO64s=",
"ref": "refs/heads/main",
"rev": "f11d7586a993522832efed78cfa5e3654bb48258",
"revCount": 16,
"type": "git",
"url": "https://git.chir.rs/darkkirb/plover-machine-hid"
},
"original": {
"type": "git",
"url": "https://git.chir.rs/darkkirb/plover-machine-hid"
}
},
"polymc": {
"inputs": {
"flake-compat": "flake-compat_2",
"flake-compat": "flake-compat",
"libnbtplusplus": "libnbtplusplus",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1663673313,
"narHash": "sha256-W9cQrsSwoqVbMtWjs6tCCB7OXC3OEUN7OflTVSI3zbc=",
"lastModified": 1664191512,
"narHash": "sha256-QaRSbfR8G/HkBiEZVLDPYkmfhaoSD4WpUnbLjpSG+c8=",
"owner": "PolyMC",
"repo": "PolyMC",
"rev": "c6bcb6228b421983006d16c93f7cda091dc9679b",
"rev": "370c3aa5985698351e706e61c660a3a566a5f09b",
"type": "github"
},
"original": {
@ -1279,12 +878,12 @@
"helix": "helix",
"home-manager": "home-manager",
"hosts-list": "hosts-list",
"hydra": "hydra",
"invtracker": "invtracker",
"nix-hotfix": "nix-hotfix",
"nix-neovim": "nix-neovim",
"nix-packages": "nix-packages",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_9",
"nixpkgs": "nixpkgs_7",
"nixpkgs-fluffychat": "nixpkgs-fluffychat",
"nixpkgs-noto-variable": "nixpkgs-noto-variable",
"nur": "nur",
@ -1314,33 +913,6 @@
"type": "github"
}
},
"rust-overlay_2": {
"inputs": {
"flake-utils": [
"nix-packages",
"cargo2nix",
"flake-utils"
],
"nixpkgs": [
"nix-packages",
"cargo2nix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1653878966,
"narHash": "sha256-T51Gck/vrJZi1m+uTbhEFTRgZmE59sydVONadADv358=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "8526d618af012a923ca116be9603e818b502a8db",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"sops-nix": {
"inputs": {
"nixpkgs": [
@ -1349,11 +921,11 @@
"nixpkgs-22_05": "nixpkgs-22_05"
},
"locked": {
"lastModified": 1663475375,
"narHash": "sha256-uIhMyLFkU8Tp0uxLd7tKn++G/yHsB9r7YRvsBdoGvsk=",
"lastModified": 1664204020,
"narHash": "sha256-LAey3hr8b9EAt3n304Wt9Vm4uQFd8pSRtLX8leuYFDs=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "bae718a9d1e31ec478ddfcb75149f66e9625a825",
"rev": "912f9ff41fd9353dec1f783170793699789fe9aa",
"type": "github"
},
"original": {
@ -1362,22 +934,6 @@
"type": "github"
}
},
"steno-dictionaries": {
"flake": false,
"locked": {
"lastModified": 1661648632,
"narHash": "sha256-tt/2uR9Nw0d7Imz6aPXj6YDqg1p8MAbNq7m4+Pou/j0=",
"owner": "didoesdigital",
"repo": "steno-dictionaries",
"rev": "f706309c530d0d52f5ace3175834d29c7b1ba8fd",
"type": "github"
},
"original": {
"owner": "didoesdigital",
"repo": "steno-dictionaries",
"type": "github"
}
},
"tailwind-haskell": {
"inputs": {
"flake-utils": "flake-utils_2",
@ -1400,21 +956,6 @@
"repo": "tailwind-haskell",
"type": "github"
}
},
"utils": {
"locked": {
"lastModified": 1653893745,
"narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
}
},
"root": "root",

View file

@ -22,11 +22,7 @@ rec {
invtracker.url = "git+https://git.chir.rs/darkkirb/Programmierbeleg";
nixpkgs-fluffychat.url = "github:Luis-Hebendanz/nixpkgs/fix_mkFlutterApp";
helix.url = "github:helix-editor/helix";
nix-neovim = {
url = "github:syberant/nix-neovim";
inputs.nixpkgs.follows = "nixpkgs";
};
hydra.url = "git+https://git.chir.rs/darkkirb/hydra?ref=hack";
nix-packages.url = "git+https://git.chir.rs/DarkKirb/nix-packages?ref=main";
nix-packages.inputs.nixpkgs.follows = "nixpkgs";

View file

@ -34,26 +34,26 @@ with lib; let
# Make sure that the cake is reset
${optionalString (opts.shapeEgress.bandwidth != null) ''
${pkgs.iproute}/bin/tc qdisc del dev ${name} root || true
${pkgs.iproute}/bin/tc qdisc del dev ${name} ingress || true
${pkgs.iproute2}/bin/tc qdisc del dev ${name} root || true
${pkgs.iproute2}/bin/tc qdisc del dev ${name} ingress || true
''}
${optionalString (opts.shapeIngress.bandwidth != null) ''
${pkgs.iproute}/bin/tc qdisc del dev ${opts.shapeIngress.ifb} root || true
${pkgs.iproute}/bin/tc qdisc del dev ${opts.shapeIngress.ifb} ingress || true
${pkgs.iproute2}/bin/tc qdisc del dev ${opts.shapeIngress.ifb} root || true
${pkgs.iproute2}/bin/tc qdisc del dev ${opts.shapeIngress.ifb} ingress || true
''}
# Ingress control.
${optionalString (opts.shapeIngress.bandwidth != null) ''
${pkgs.iproute}/bin/tc qdisc add dev ${name} handle ffff: ingress
${pkgs.iproute}/bin/ip link add name ${opts.shapeIngress.ifb} type ifb || true
${pkgs.iproute}/bin/ip link set ${opts.shapeIngress.ifb} up
${pkgs.iproute}/bin/tc qdisc add dev ${opts.shapeIngress.ifb} root cake bandwidth ${opts.shapeIngress.bandwidth} ingress
${pkgs.iproute}/bin/tc filter add dev ${name} parent ffff: protocol all u32 match u32 0 0 action mirred egress redirect dev ${opts.shapeIngress.ifb}
${pkgs.iproute2}/bin/tc qdisc add dev ${name} handle ffff: ingress
${pkgs.iproute2}/bin/ip link add name ${opts.shapeIngress.ifb} type ifb || true
${pkgs.iproute2}/bin/ip link set ${opts.shapeIngress.ifb} up
${pkgs.iproute2}/bin/tc qdisc add dev ${opts.shapeIngress.ifb} root cake bandwidth ${opts.shapeIngress.bandwidth} ingress
${pkgs.iproute2}/bin/tc filter add dev ${name} parent ffff: protocol all u32 match u32 0 0 action mirred egress redirect dev ${opts.shapeIngress.ifb}
''}
# Egress control.
${optionalString (opts.shapeEgress.bandwidth != null) ''
${pkgs.iproute}/bin/tc qdisc add dev ${name} root cake bandwidth ${opts.shapeEgress.bandwidth} ${opts.shapeEgress.extraArgs}
${pkgs.iproute2}/bin/tc qdisc add dev ${name} root cake bandwidth ${opts.shapeEgress.bandwidth} ${opts.shapeEgress.extraArgs}
''}
'';
};
@ -66,13 +66,13 @@ with lib; let
# Ingress control.
${optionalString (opts.shapeIngress.bandwidth != null) ''
${pkgs.iproute}/bin/tc qdisc del dev ${opts.shapeIngress.ifb} root
${pkgs.iproute}/bin/tc qdisc del dev ${name} parent ffff:
${pkgs.iproute2}/bin/tc qdisc del dev ${opts.shapeIngress.ifb} root
${pkgs.iproute2}/bin/tc qdisc del dev ${name} parent ffff:
''}
# Egress control.
${optionalString (opts.shapeEgress.bandwidth != null) ''
${pkgs.iproute}/bin/tc qdisc del dev ${name} root
${pkgs.iproute2}/bin/tc qdisc del dev ${name} root
''}
# Offloading.