diff --git a/config/aerc/config.nix b/config/aerc/config.nix new file mode 100644 index 0000000..b672e3f --- /dev/null +++ b/config/aerc/config.nix @@ -0,0 +1,7 @@ +{ ... }: + +{ + programs.aerc = { + enable = true; + }; +} diff --git a/config/colors/config.nix b/config/colors/config.nix index 8e53a1e..df4acc2 100644 --- a/config/colors/config.nix +++ b/config/colors/config.nix @@ -5,27 +5,51 @@ nix-colors.homeManagerModules.default ]; + # colorScheme = { + # slug = "gruvbox-light-hard"; + # name = "Gruvbox Light Hard"; + # author = "Dawid Kurek (dawikur@gmail.com), morhetz (https://github.com/morhetz/gruvbox)"; + # palette = { + # base00 = "F9F5D7"; + # base01 = "EBDBB2"; + # base02 = "D5C4A1"; + # base03 = "BDAE93"; + # base04 = "665C54"; + # base05 = "504945"; + # base06 = "3C3836"; + # base07 = "282828"; + # base08 = "9D0006"; + # base09 = "AF3A03"; + # base0A = "B57614"; + # base0B = "79740E"; + # base0C = "427B58"; + # base0D = "076678"; + # base0E = "8F3F71"; + # base0F = "D65D0E"; + # }; + # }; + colorScheme = { - slug = "ef-cyprus"; - name = "ef-cyprus"; - author = "Protesilaos Stavrou (https://protesilaos.com)"; + slug = "gruvbox-dark-hard"; + name = "Gruvbox Dark Hard"; + author = "Dawid Kurek (dawikur@gmail.com), morhetz (https://github.com/morhetz/gruvbox)"; palette = { - base00 = "FCF7EF"; - base01 = "F0ECE0"; - base02 = "E5E3D8"; - base03 = "59786F"; - base04 = "7F475A"; - base05 = "242521"; - base06 = "142010"; - base07 = "C0DF6F"; - base08 = "9F0D0F"; - base09 = "BF4400"; - base0A = "A7601F"; - base0B = "006F00"; - base0C = "1F70AF"; - base0D = "375CC6"; - base0E = "9A456F"; - base0F = "8F6F4A"; + base00 = "1D2021"; + base01 = "3C3836"; + base02 = "504945"; + base03 = "665C54"; + base04 = "BDAE93"; + base05 = "D5C4A1"; + base06 = "EBDBB2"; + base07 = "FBF1C7"; + base08 = "FB4934"; + base09 = "FE8019"; + base0A = "FABD2F"; + base0B = "B8BB26"; + base0C = "8EC07C"; + base0D = "83A598"; + base0E = "D3869B"; + base0F = "D65D0E"; }; }; } diff --git a/config/kakoune/colors.nix b/config/kakoune/colors.nix index d07e743..ff33f5a 100644 --- a/config/kakoune/colors.nix +++ b/config/kakoune/colors.nix @@ -1,89 +1,61 @@ -{ config, lib, ... }: - +{ config, ... }: let c = config.colorScheme.palette; - rgb = hex: "rgb:${lib.toLower hex}"; + rgb = hex: "rgb:${hex}"; in { xdg.configFile."kak/colors/nix-colorscheme.kak".text = '' - declare-option str bg_main '${rgb c.base00}' - declare-option str fg_main '${rgb c.base05}' - declare-option str bg_dim '${rgb c.base01}' - declare-option str fg_dim '${rgb c.base03}' - declare-option str bg_alt '${rgb c.base02}' - declare-option str fg_alt '${rgb c.base04}' - declare-option str bg_active '${rgb c.base02}' - declare-option str bg_inactive '${rgb c.base01}' - declare-option str red '${rgb c.base08}' - declare-option str red_bright '${rgb c.base08}' - declare-option str green '${rgb c.base0B}' - declare-option str green_bright '${rgb c.base0B}' - declare-option str yellow '${rgb c.base0A}' - declare-option str yellow_bright '${rgb c.base0A}' - declare-option str blue '${rgb c.base0D}' - declare-option str blue_bright '${rgb c.base0D}' - declare-option str purple '${rgb c.base0E}' - declare-option str purple_bright '${rgb c.base0E}' - declare-option str bg_mode_line '${rgb c.base07}' - declare-option str fg_mode_line '${rgb c.base06}' - declare-option str cursor '${rgb c.base0B}' - declare-option str bg_hl_line '${rgb c.base01}' - declare-option str fg_space '${rgb c.base03}' - declare-option str psel '${rgb c.base02}' - declare-option str ssel '${rgb c.base01}' + ## base16.kak — driven by nix-colors palette (${config.colorScheme.name}) - # For code - set-face global value '${rgb c.base05}' - set-face global type '${rgb c.base0D}' - set-face global variable '${rgb c.base0C}' - set-face global keyword '${rgb c.base0B}' - set-face global module '${rgb c.base05}' - set-face global function '${rgb c.base0A}' - set-face global string '${rgb c.base08}' - set-face global builtin '${rgb c.base0B}' - set-face global constant '${rgb c.base0B}' - set-face global comment '${rgb c.base0F}' - set-face global meta '${rgb c.base08}' - set-face global operator '${rgb c.base05}' - set-face global comma '${rgb c.base05}' - set-face global bracket '${rgb c.base0C}' + ## code + face global value ${rgb c.base09}+b + face global type ${rgb c.base0A} + face global variable ${rgb c.base08} + face global module ${rgb c.base0B} + face global function ${rgb c.base0D} + face global string ${rgb c.base0B} + face global keyword ${rgb c.base0E}+b + face global operator ${rgb c.base0C} + face global attribute ${rgb c.base09} + face global comment ${rgb c.base03} + face global documentation comment + face global meta ${rgb c.base0A} + face global builtin default+b - # For markup - set-face global title "%opt{purple}" - set-face global header "%opt{yellow_bright}" - set-face global bold "%opt{purple}" - set-face global italic "%opt{purple_bright}" - set-face global mono "%opt{green}" - set-face global block "%opt{blue_bright}" - set-face global link "%opt{green}" - set-face global bullet "%opt{green}" - set-face global list "%opt{fg_main}" + ## markup + face global title ${rgb c.base0D} + face global header ${rgb c.base0D} + face global mono ${rgb c.base0B} + face global block ${rgb c.base09} + face global link ${rgb c.base0D} + face global bullet ${rgb c.base0F} + face global list ${rgb c.base08} - # Builtin faces - set-face global Default "%opt{fg_main},%opt{bg_main}" - set-face global PrimarySelection "default,%opt{psel}" - set-face global SecondarySelection "default,%opt{ssel}" - set-face global PrimaryCursor "%opt{bg_main},%opt{cursor}" - set-face global SecondaryCursor "%opt{bg_main},%opt{fg_alt}" - set-face global PrimaryCursorEol "%opt{bg_main},%opt{red_bright}" - set-face global SecondaryCursorEol "%opt{bg_main},%opt{blue}" - set-face global LineNumbers "%opt{fg_dim},%opt{bg_main}" - set-face global LineNumberCursor "%opt{fg_alt},%opt{bg_main}+b" - set-face global LineNumbersWrapped "%opt{bg_dim},%opt{bg_main}+i" - set-face global MenuForeground "%opt{bg_main},%opt{fg_main}+b" - set-face global MenuBackground "%opt{fg_main},%opt{bg_alt}" - set-face global MenuInfo "%opt{fg_alt},%opt{bg_alt}" - set-face global Information "%opt{fg_mode_line},%opt{bg_mode_line}" - set-face global Error "%opt{red},%opt{bg_mode_line}" - set-face global StatusLine "%opt{fg_mode_line},%opt{bg_mode_line}" - set-face global StatusLineMode "%opt{fg_mode_line},%opt{bg_mode_line}" - set-face global StatusLineInfo "%opt{fg_mode_line},%opt{bg_mode_line}" - set-face global StatusLineValue "%opt{fg_mode_line},%opt{bg_mode_line}" - set-face global StatusCursor "%opt{fg_main},%opt{blue}" - set-face global Prompt "%opt{fg_mode_line},%opt{bg_mode_line}" - set-face global MatchingChar "%opt{blue},%opt{bg_main}" - set-face global Whitespace "%opt{fg_space},%opt{bg_main}+f" - set-face global WrapMarker Whitespace - set-face global BufferPadding "%opt{bg_main},%opt{bg_main}" + ## builtin + face global Default ${rgb c.base05},${rgb c.base00} + face global PrimarySelection ${rgb c.base00},${rgb c.base0D}+fg + face global SecondarySelection ${rgb c.base00},${rgb c.base03}+fg + face global PrimaryCursor ${rgb c.base00},${rgb c.base05}+fg + face global SecondaryCursor ${rgb c.base00},${rgb c.base05}+fg + face global PrimaryCursorEol ${rgb c.base00},${rgb c.base0C}+fg + face global SecondaryCursorEol ${rgb c.base00},${rgb c.base0C}+fg + face global LineNumbers ${rgb c.base03},${rgb c.base00} + face global LineNumberCursor ${rgb c.base05},${rgb c.base01}+b + face global MenuForeground ${rgb c.base00},${rgb c.base0D} + face global MenuBackground ${rgb c.base05},${rgb c.base01} + face global MenuInfo ${rgb c.base0C} + face global Information ${rgb c.base00},${rgb c.base0C} + face global Error ${rgb c.base00},${rgb c.base08} + face global DiagnosticError ${rgb c.base08} + face global DiagnosticWarning ${rgb c.base0A} + face global StatusLine ${rgb c.base05},${rgb c.base01} + face global StatusLineMode ${rgb c.base09} + face global StatusLineInfo ${rgb c.base0C} + face global StatusLineValue ${rgb c.base0B} + face global StatusCursor ${rgb c.base01},${rgb c.base0C} + face global Prompt ${rgb c.base00},${rgb c.base0C} + face global MatchingChar ${rgb c.base0C},${rgb c.base01}+b + face global BufferPadding ${rgb c.base03},${rgb c.base00} + face global Whitespace ${rgb c.base03}+f ''; } diff --git a/config/kakoune/config.kak b/config/kakoune/config.kak index 2dce93d..57d1ee0 100644 --- a/config/kakoune/config.kak +++ b/config/kakoune/config.kak @@ -46,17 +46,21 @@ map global buffer-mode d ':delete-buffer' -docstring 'delete buffer' map global buffer-mode k ':delete-buffer!' -docstring 'kill buffer' map global buffer-mode n ':buffer-next' -docstring 'next buffer' map global buffer-mode p ':buffer-previous' -docstring 'previous buffer' +map global buffer-mode b ':buffer ' -docstring 'buffer switch' # Comment Line map global normal '#' ':comment-line' # File Keybinds declare-user-mode file-mode -map global user f ':enter-user-mode file-mode' -docstring 'file...' +map global user f ':enter-user-mode file-mode' -docstring 'file...' map global file-mode f ':prompt -shell-script-candidates %{ fd --type f } file: %{ edit %val{text} }' -docstring 'find file' -map global file-mode c ':e ~/.config/kak/kakrc' -docstring 'open config' -map global file-mode t ':e ~/Documents/Notes/TODO.md' -docstring 'open todo' -map global file-mode a ':e ~/.config/almoxarife.yaml' -docstring 'open alconf' +map global file-mode p ':prompt -shell-script-candidates %{ fd --type f . "$(dirname "$kak_buffile")" } file: %{ edit %val{text} }' -docstring 'find file from buffer' +map global file-mode g ':grep -i ' -docstring 'grep files' + +map global file-mode c ':e ~/.config/home-manager/config/kakoune/config.kak' -docstring 'open config' +map global file-mode t ':e ~/Documents/Notes/TODO.md' -docstring 'open todo' +map global file-mode n ':e ~/.config/home-manager/home.nix' -docstring 'open nix' # Search case-insensitive by default map global normal '/' '/(?Si)' @@ -107,6 +111,7 @@ hook global InsertCompletionShow .* %{ map global normal '>' map global normal '<' +# Go to start of line intelligently based on indentation define-command smart-gh -docstring 'smart goto line start' \ %{ set-register c %val{cursor_column} @@ -126,6 +131,19 @@ map global goto h ':smart-gh' -docstring 'line begin (smart)' declare-user-mode window-mode map global user w ':enter-user-mode window-mode' -docstring 'window...' map global window-mode c ':kitty-terminal-window kak -c %val{session}' -docstring 'create new window' +map global window-mode t ':kitty-terminal-window %opt{shellpath}' -docstring 'create terminal window' + +# Selection binds +declare-user-mode select-mode +map global user s ':enter-user-mode select-mode' -docstring 'select...' +map global select-mode i '' -docstring 'select inside object' +map global select-mode a '' -docstring 'select around object' + +# Tab Indenting +hook global WinSetOption filetype=(?!makefile).* %{ + map buffer insert '' + map buffer insert '' +} # ~~~ # LSP @@ -141,7 +159,7 @@ map global goto d :lsp-definition -docstring 'LSP definition' map global goto r :lsp-references -docstring 'LSP references' map global goto y :lsp-type-definition -docstring 'LSP type definition' -map global insert ':try lsp-snippets-select-next-placeholders catch %{ execute-keys -with-hooks tab> }' -docstring 'Select next snippet placeholder' +# map global insert ':try lsp-snippets-select-next-placeholders catch %{ execute-keys -with-hooks tab> }' -docstring 'Select next snippet placeholder' map global object a 'lsp-object' -docstring 'LSP any symbol' map global object 'lsp-object' -docstring 'LSP any symbol' @@ -174,8 +192,6 @@ define-command W %{ # LSP language configs # Lua -# -# hook global BufSetOption filetype=lua %{ set-option buffer lsp_servers %exp{ # Minimal setup for luals (Lua doesn't really work with LSP, I've tried) @@ -235,6 +251,37 @@ hook global BufSetOption filetype=typst %{ [tinymist.settings] exportPdf = "onType" outputPath = "$root/target/$dir/$name" + [harper] + filetypes = ["typst"] + root_globs = ["*.typst"] + command = "harper-ls" + args = ["--stdio"] + settings_section = "_" + [harper.settings._.harper-ls] + #isolateEnglish = true # Currently very buggy + dialect = "British" + } +} + +# Markdown +hook global BufSetOption filetype=markdown %{ + set-option buffer lsp_servers %exp{ + [zk_lsp] + filetypes = ["markdown"] + root_globs = [".git/", ".zk/", ".kakrc"] + command = "zk" + args = ["lsp"] + [harper] + filetypes = ["markdown"] + root_globs = [".git/", ".zk/", ".kakrc"] + command = "harper-ls" + args = ["--stdio"] + settings_section = "_" + [harper.settings._.harper-ls] + #isolateEnglish = true # Currently very buggy + dialect = "British" + [harper.settings._.harper-ls.markdown] + IgnoreLinkTitle = true } } diff --git a/config/kakoune/config.nix b/config/kakoune/config.nix index 1c895b7..b77fbe7 100644 --- a/config/kakoune/config.nix +++ b/config/kakoune/config.nix @@ -8,6 +8,7 @@ ripgrep fd kakoune-lsp + harper ]; programs.kakoune = { @@ -16,10 +17,10 @@ extraConfig = lib.concatStringsSep "\n" [ "# Venomade's kakrc - my quest for a faster editor" + "declare-option str shellpath \"${config.shellpath}\"" (builtins.readFile ./colemak.kak) (builtins.readFile ./config.kak) (builtins.readFile ./plugins.kak) - "map global window-mode t ':kitty-terminal-window ${config.shellpath}' -docstring 'create terminal window'" ]; plugins = import ./plugins.nix { inherit pkgs lib; }; diff --git a/config/kakoune/plugins.kak b/config/kakoune/plugins.kak index 35e20b1..8d949b6 100644 --- a/config/kakoune/plugins.kak +++ b/config/kakoune/plugins.kak @@ -21,7 +21,7 @@ harpoon-add-bindings # focus: # location: https://github.com/caksoylar/kakoune-focus -map global user s ':focus-toggle' -docstring "toggle selections focus" +map global select-mode s ':focus-toggle' -docstring "selections focus" define-command focus-live-enable %{ focus-selections hook -group focus window NormalIdle .* %{ focus-extend } @@ -35,3 +35,15 @@ define-command focus-live-disable %{ # location: https://github.com/andreyorst/fzf.kak require-module fzf # map global file-mode f ':fzf-mode' -docstring 'fzf' + +# render-markdown: +# location: https://github.com/kmafeni04/render-markdown.kak +hook global WinSetOption filetype=markdown %{ + map buffer user t ':render-markdown-toggle' -docstring 'toggle rendering' +} +declare-option str render_markdown_heading_1 "{blue+fb}" +declare-option str render_markdown_heading_2 "{green+fb}" +declare-option str render_markdown_heading_3 "{yellow+fb}" +declare-option str render_markdown_heading_4 "{cyan+fb}" +declare-option str render_markdown_heading_5 "{magenta+fb}" +declare-option str render_markdown_heading_6 "{red+fb}" diff --git a/config/kakoune/plugins.nix b/config/kakoune/plugins.nix index 2296eb4..d9495be 100644 --- a/config/kakoune/plugins.nix +++ b/config/kakoune/plugins.nix @@ -1,4 +1,4 @@ -{ pkgs, lib, ... }: +{ pkgs, ... }: [ (pkgs.kakouneUtils.buildKakounePluginFrom2Nix { @@ -76,4 +76,15 @@ sha256 = "sha256-3aj39UW5wsDpjpDJm7HDFkCGjx6+VHrBTkEC0sjyKkI="; }; }) + + (pkgs.kakouneUtils.buildKakounePluginFrom2Nix { + pname = "render-markdown"; + version = "master"; + src = pkgs.fetchFromGitHub { + owner = "kmafeni04"; + repo = "render-markdown.kak"; + rev = "master"; + sha256 = "sha256-6a+pIO9viXU7KCFG8rkzwvUNak1Rqm3Jty1FxUffXJo="; + }; + }) ] diff --git a/config/lazygit/config.nix b/config/lazygit/config.nix new file mode 100644 index 0000000..761d245 --- /dev/null +++ b/config/lazygit/config.nix @@ -0,0 +1,215 @@ +{ ... }: + +{ + programs.lazygit = { + enable = true; + settings = { + gui = { + border = "single"; + }; + + keybinding = { + universal = { + quit = "q"; + quit-alt1 = ""; + suspendApp = ""; + return = ""; + quitWithoutChangingDirectory = "Q"; + togglePanel = ""; + prevItem = ""; + nextItem = ""; + prevItem-alt = "e"; + nextItem-alt = "n"; + prevPage = ","; + nextPage = "."; + scrollLeft = "H"; + scrollRight = "I"; + gotoTop = "<"; + gotoBottom = ">"; + gotoTop-alt = ""; + gotoBottom-alt = ""; + toggleRangeSelect = "v"; + rangeSelectDown = ""; + rangeSelectUp = ""; + prevBlock = ""; + nextBlock = ""; + prevBlock-alt = "h"; + nextBlock-alt = "i"; + nextBlock-alt2 = ""; + prevBlock-alt2 = ""; + jumpToBlock = [ + "1" + "2" + "3" + "4" + "5" + ]; + focusMainView = "0"; + nextMatch = "k"; + prevMatch = "K"; + startSearch = "/"; + optionMenu = ""; + optionMenu-alt1 = "?"; + select = ""; + goInto = ""; + confirm = ""; + confirmMenu = ""; + confirmSuggestion = ""; + confirmInEditor = ""; + confirmInEditor-alt = ""; + remove = "d"; + new = "n"; + edit = "j"; + openFile = "o"; + scrollUpMain = ""; + scrollDownMain = ""; + scrollUpMain-alt1 = "E"; + scrollDownMain-alt1 = "N"; + scrollUpMain-alt2 = ""; + scrollDownMain-alt2 = ""; + executeShellCommand = ":"; + createRebaseOptionsMenu = "m"; + + # 'Files' appended for legacy reasons + pushFiles = "P"; + + # 'Files' appended for legacy reasons + pullFiles = "p"; + refresh = "R"; + createPatchOptionsMenu = ""; + nextTab = "]"; + prevTab = "["; + nextScreenMode = "+"; + prevScreenMode = "_"; + undo = "z"; + redo = "Z"; + filteringMenu = ""; + diffingMenu = "W"; + diffingMenu-alt = ""; + copyToClipboard = ""; + openRecentRepos = ""; + submitEditorText = ""; + extrasMenu = "@"; + toggleWhitespaceInDiffView = ""; + increaseContextInDiffView = "}"; + decreaseContextInDiffView = "{"; + increaseRenameSimilarityThreshold = ")"; + decreaseRenameSimilarityThreshold = "("; + openDiffTool = ""; + newWorktree = "w"; + }; + + cycleDiffRenderers = "|"; + + status = { + checkForUpdate = "u"; + recentRepos = ""; + allBranchesLogGraph = "a"; + }; + + files = { + commitChanges = "c"; + commitChangesWithoutHook = "w"; + amendLastCommit = "A"; + commitChangesWithEditor = "C"; + findBaseCommitForFixup = ""; + confirmDiscard = "x"; + ignoreFile = "l"; + refreshFiles = "r"; + stashAllChanges = "s"; + viewStashOptions = "S"; + toggleStagedAll = "a"; + viewResetOptions = "D"; + fetch = "f"; + toggleTreeView = "`"; + openMergeOptions = "M"; + openStatusFilter = ""; + copyFileInfoToClipboard = "y"; + collapseAll = "-"; + expandAll = "="; + }; + + branches = { + createPullRequest = "o"; + viewPullRequestOptions = "O"; + copyPullRequestURL = ""; + checkoutBranchByName = "c"; + forceCheckoutBranch = "F"; + checkoutPreviousBranch = "-"; + rebaseBranch = "r"; + renameBranch = "R"; + mergeIntoCurrentBranch = "M"; + moveCommitsToNewBranch = "K"; + viewGitFlowOptions = "l"; + fastForward = "f"; + createTag = "T"; + pushTag = "P"; + setUpstream = "u"; + fetchRemote = "f"; + addForkRemote = "F"; + sortOrder = "s"; + }; + + commits = { + squashDown = "s"; + renameCommit = "r"; + renameCommitWithEditor = "R"; + viewResetOptions = "g"; + markCommitAsFixup = "f"; + setFixupMessage = "c"; + createFixupCommit = "F"; + squashAboveCommits = "S"; + moveDownCommit = ""; + moveUpCommit = ""; + amendToCommit = "A"; + resetCommitAuthor = "a"; + pickCommit = "p"; + revertCommit = "t"; + cherryPickCopy = "C"; + pasteCommits = "V"; + markCommitAsBaseForRebase = "B"; + tagCommit = "T"; + checkoutCommit = ""; + resetCherryPick = ""; + copyCommitAttributeToClipboard = "y"; + openLogMenu = ""; + openInBrowser = "o"; + viewBisectOptions = "b"; + startInteractiveRebase = "l"; + selectCommitsOfCurrentBranch = "*"; + }; + + amendAttribute = { + resetAuthor = "a"; + setAuthor = "A"; + addCoAuthor = "c"; + }; + + stash = { + popStash = "g"; + renameStash = "r"; + }; + + commitFiles = { + checkoutCommitFile = "c"; + }; + + main = { + toggleSelectHunk = "a"; + pickBothHunks = "b"; + editSelectHunk = "J"; + }; + + submodules = { + init = "l"; + update = "u"; + bulkMenu = "b"; + }; + + commitMessage = { + commitMenu = ""; + }; + }; + }; + }; +} diff --git a/config/programming/c.nix b/config/programming/c.nix index 11caf6e..3f6d31b 100644 --- a/config/programming/c.nix +++ b/config/programming/c.nix @@ -5,6 +5,7 @@ clang clang-tools bear + gdb # valgrind # BROKEN on darwin ]; } diff --git a/config/programming/config.nix b/config/programming/config.nix index 402e26e..762a8ba 100644 --- a/config/programming/config.nix +++ b/config/programming/config.nix @@ -2,12 +2,12 @@ { imports = [ - ./nix.nix + ./c.nix ./git.nix ./lua.nix - ./c.nix + ./markdown.nix + ./nix.nix ./rust.nix ./typst.nix - ./markdown.nix ]; } diff --git a/config/shell/config.nix b/config/shell/config.nix index 4cd18a8..591a78a 100644 --- a/config/shell/config.nix +++ b/config/shell/config.nix @@ -8,7 +8,28 @@ }; config = { - programs.bash.enable = true; + # Packages without home-manager configs + home.packages = with pkgs; [ + pv + mtr + shellcheck + wiki-tui + ddgr + ]; + + home.shellAliases = { + # Aliases to replace packages + tree = "eza --tree"; + + # Aliases to fix issues + mtr = "TERM=xterm-256color sudo mtr"; + }; + + # Packages with extra configs + programs.bash = { + enable = true; + bashrcExtra = "source ~/.profile"; + }; programs.bat = { enable = true; extraPackages = with pkgs.bat-extras; [ batdiff batman ]; diff --git a/config/yazi/config.nix b/config/yazi/config.nix index dc278b9..a50ed46 100644 --- a/config/yazi/config.nix +++ b/config/yazi/config.nix @@ -1,4 +1,5 @@ { pkgs, ... }: + { programs.yazi = { enable = true; @@ -60,6 +61,49 @@ ]; }; + + flavors.base16 = pkgs.fetchFromGitHub { + owner = "matt-dong-123"; + repo = "base16.yazi"; + rev = "master"; + hash = "sha256-1WhixzYE1zsXg9o6T/YKWJgzfRZnzsmpiUIfi+j4H9Q="; + }; + + theme = { + flavor = { + dark = "base16"; + light = "base16"; + }; + + indicator = { + padding = { open = "█"; close = "█"; }; + }; + + tabs = { + sep_inner = { open = ""; close = ""; }; + sep_outer = { open = ""; close = ""; }; + }; + + status = { + sep_left = { open = ""; close = ""; }; + sep_right = { open = ""; close = ""; }; + }; + + icon = { + globs = [ ]; + dirs = [ ]; + files = [ ]; + exts = [ ]; + conds = [ ]; + }; + + cmp = { + icon_file = ""; + icon_folder = ""; + icon_command = ""; + }; + }; + settings = { mgr = { sort_by = "mtime"; diff --git a/config/zk/config.nix b/config/zk/config.nix new file mode 100644 index 0000000..cdd6088 --- /dev/null +++ b/config/zk/config.nix @@ -0,0 +1,45 @@ +{ config, ... }: + +{ + programs.zk = { + enable = true; + settings = { + notebook = { + dir = "~/Documents/Notes"; + }; + note = { + filename = "{{slug title}}"; + template = "note.md"; + }; + extra.author = "Venomade"; + format.markdown = { + link-format = "wiki"; + hashtags = true; + colon-tags = false; + multiword-tags = true; + }; + tool = { + editor = "kak"; + shell = config.shellpath; + fzf-preview = "bat -p --color always {-1}"; + }; + lsp.diagnostics = { + wiki-title = "hint"; + dead-link = "error"; + missing-backlink = { + level = "warning"; + position = "bottom"; + }; + }; + }; + }; + + xdg.configFile."zk/templates/note.md".text = '' + --- + title: {{title}} + tags: [] + --- + + {{content}} + ''; +} diff --git a/flake.nix b/flake.nix index 5dedab2..2179ef7 100644 --- a/flake.nix +++ b/flake.nix @@ -15,7 +15,8 @@ outputs = { nixpkgs, home-manager, nix-colors, ... }: let - system = "x86_64-linux"; + # system = "x86_64-linux"; + system = "aarch64-darwin"; pkgs = nixpkgs.legacyPackages.${system}; in { diff --git a/home.nix b/home.nix index 0dfff8c..e7ba963 100644 --- a/home.nix +++ b/home.nix @@ -1,20 +1,25 @@ -{ pkgs, ... }: +{ pkgs, lib, ... }: { home.username = "venomade"; home.homeDirectory = if pkgs.stdenv.hostPlatform.isDarwin then "/Users/venomade" else "/home/venomade"; - targets.genericLinux.enable = true; - targets.genericLinux.gpu.enable = true; + targets.genericLinux = lib.mkIf (pkgs.stdenv.hostPlatform.isLinux) { + enable = true; + gpu.enable = true; + }; - imports = [ - ./config/programming/config.nix - ./config/colors/config.nix - ./config/shell/config.nix - ./config/kakoune/config.nix - ./config/kitty/config.nix - ./config/yazi/config.nix + imports = map (dir: ./config/${dir}/config.nix) [ + "colors" + "kakoune" + "kitty" + "programming" + "shell" + "yazi" + "zk" + "lazygit" + "aerc" ]; home.stateVersion = "26.05";