beginning of dendritic rebuild

This commit is contained in:
serenity-F 2026-04-22 03:15:28 +10:00
parent 080e929cbc
commit d924909d3b
No known key found for this signature in database
56 changed files with 121 additions and 149 deletions

18
old/home/terminal/btop.nix Executable file
View file

@ -0,0 +1,18 @@
{
programs = {
btop = {
enable = true;
settings = {
color_theme = "adapta";
theme_background = false;
};
#package = with pkgs; [
#btop
#];
};
};
}

18
old/home/terminal/default.nix Executable file
View file

@ -0,0 +1,18 @@
{ ... }:
{
imports = [
./git.nix # Version control
./yazi.nix # File browser
./fish.nix # Shell prompt
./btop.nix # Task manager
./kitty.nix # Catgirl terminal
#./fetch # CHOOSE FETCH PROVIDER
#./neofetch.nix # OG fetch
./fastfetch.nix # New fetch
./nvim # Neovim config, stolen
];
}

34
old/home/terminal/fastfetch.nix Executable file
View file

@ -0,0 +1,34 @@
{ config, pkgs, ... }:
{
home = {
packages = with pkgs; [
peaclock # neat terminal clock applet
cmatrix # funky terminal matrix rain
];
};
programs.fastfetch = {
enable = true;
#package = with pkgs; [
#fastfetch
#fastfetchMinimal
#];
#settings = {
#"$schema" = "https://github.com/fastfetch=cli/fastfetch/raw/dev/doc/json_schema.json";
#logo = {
#};
#display = {
#};
#};
};
}

245
old/home/terminal/fish.nix Executable file
View file

@ -0,0 +1,245 @@
{ pkgs, flakePath, ... }:
{
programs = {
starship = { enable = true; };
fish = {
enable = true;
loginShellInit = "";
interactiveShellInit = "";
plugins = [
{
name = "done";
src = pkgs.fishPlugins.done.src;
}
{
name = "puffer";
src = pkgs.fishPlugins.puffer.src;
}
{
name = "autopair";
src = pkgs.fishPlugins.autopair.src;
}
];
shellAbbrs = {
## Nonspecific abbreviations
reload = "exec fish";
nv = "nvim";
sc = "sudo systemctl";
trc = "tree -C";
rbu = "sudo systemctl reboot --firmware-setup";
## Nix abbreviations
nd = "cd ${flakePath}";
nxp = "nix-shell --command fish -p";
## Git abbreviations
g = "git";
ga = "git add";
gaa = "git add --all";
gau = "git add -u";
gb = "git branch";
gco = "git checkout";
gc = "git commit";
gcl = "git clone";
gd = "git diff";
gf = "git fetch";
gl = "git log";
gm = "git merge";
gp = "git push";
gpl = "git pull";
gsw = "git switch";
};
shellAliases = {
git-master-to-main =
"git branch -m master main && git push origin :master main:main";
};
functions = {
fish_greeting = ''
if type -q kitty-img
printf '💖 hiya serenity '
echo ' 'welcome to $hostname "~" 🏳️‍⚧️
else
echo 💖 hiya serenity welcome to $hostname "~" 🏳️‍⚧️
end
'';
gethost = ''
if test -f /run/.containerenv
function gethost
grep -F name= /run/.containerenv | cut -d '"' -f2;
end
else if command -v hostnamectl &> /dev/null
function gethost --wraps=hostnamectl --description 'alias gethost hostnamectl'
hostnamectl --pretty;
end
else if command -v hostname &> /dev/null
function gethost --wraps=hostname --description 'alias gethost hostname -s'
hostname -s;
end
else
function gethost --wraps=hostname --description 'alias gethost hostname'
echo host_error;
end
end
'';
mommy = ''
set -g prev_status $status
# SHELL_MOMMYS_LITTLE - what to call you~ (default: "girl")
# SHELL_MOMMYS_PRONOUNS - what pronouns mommy will use for themself~ (default: "her")
# SHELL_MOMMYS_ROLES - what role mommy will have~ (default "mommy")
set -g COLORS_LIGHT_PINK '\e[38;5;217m'
set -g COLORS_LIGHT_BLUE '\e[38;5;117m'
set -g COLORS_FAINT '\e[2m'
set -g COLORS_RESET '\e[0m'
set -g DEF_WORDS_LITTLE "girl"
set -g DEF_WORDS_PRONOUNS "her"
set -g DEF_WORDS_ROLES "mommy"
set -g DEF_MOMMY_COLOR "$COLORS_LIGHT_PINK"
set -g DEF_ONLY_NEGATIVE "false"
set -g NEGATIVE_RESPONSES \
"do you need MOMMYS_ROLE's help~? ❤️" \
"Don't give up, my love~ ❤️" \
"Don't worry, MOMMYS_ROLE is here to help you~ ❤️" \
"I believe in you, my sweet AFFECTIONATE_TERM~ ❤️" \
"It's okay to make mistakes, my dear~ ❤️" \
"just a little further, sweetie~ ❤️" \
"Let's try again together, okay~? ❤️" \
"MOMMYS_ROLE believes in you, and knows you can overcome this~ ❤️" \
"MOMMYS_ROLE believes in you~ ❤️" \
"MOMMYS_ROLE is always here for you, no matter what~ ❤️" \
"MOMMYS_ROLE is here to help you through it~ ❤️" \
"MOMMYS_ROLE is proud of you for trying, no matter what the outcome~ ❤️" \
"MOMMYS_ROLE knows it's tough, but you can do it~ ❤️" \
"MOMMYS_ROLE knows MOMMYS_PRONOUN little AFFECTIONATE_TERM can do better~ ❤️" \
"MOMMYS_ROLE knows you can do it, even if it's tough~ ❤️" \
"MOMMYS_ROLE knows you're feeling down, but you'll get through it~ ❤️" \
"MOMMYS_ROLE knows you're trying your best~ ❤️" \
"MOMMYS_ROLE loves you, and is here to support you~ ❤️" \
"MOMMYS_ROLE still loves you no matter what~ ❤️" \
"You're doing your best, and that's all that matters to MOMMYS_ROLE~ ❤️" \
"MOMMYS_ROLE is always here to encourage you~ ❤️"
set -g POSITIVE_RESPONSES \
"*pets your head*" \
"awe, what a good AFFECTIONATE_TERM~\nMOMMYS_ROLE knew you could do it~ ❤️" \
"good AFFECTIONATE_TERM~\nMOMMYS_ROLE's so proud of you~ ❤️" \
"Keep up the good work, my love~ ❤️" \
"MOMMYS_ROLE is proud of the progress you've made~ ❤️" \
"MOMMYS_ROLE is so grateful to have you as MOMMYS_PRONOUN little AFFECTIONATE_TERM~ ❤️" \
"I'm so proud of you, my love~ ❤️" \
"MOMMYS_ROLE is so proud of you~ ❤️" \
"MOMMYS_ROLE loves seeing MOMMYS_PRONOUN little AFFECTIONATE_TERM succeed~ ❤️" \
"MOMMYS_ROLE thinks MOMMYS_PRONOUN little AFFECTIONATE_TERM earned a big hug~ ❤️" \
"that's a good AFFECTIONATE_TERM~ ❤️" \
"you did an amazing job, my dear~ ❤️" \
"you're such a smart cookie~ ❤️"
# allow for overriding of default words (IF ANY SET)
if test -n "$SHELL_MOMMYS_LITTLE"
set DEF_WORDS_LITTLE "$SHELL_MOMMYS_LITTLE"
end
if test -n "$SHELL_MOMMYS_PRONOUNS"
set DEF_WORDS_PRONOUNS "$SHELL_MOMMYS_PRONOUNS"
end
if test -n "$SHELL_MOMMYS_ROLES"
set DEF_WORDS_ROLES "$SHELL_MOMMYS_ROLES"
end
if test -n "$SHELL_MOMMYS_COLOR"
set DEF_MOMMY_COLOR "$SHELL_MOMMYS_COLOR"
end
# allow overriding to true
if test "$SHELL_MOMMYS_ONLY_NEGATIVE" = "true"
set DEF_ONLY_NEGATIVE "true"
end
# if the array is set for positive/negative responses, overwrite it
if test -n "$SHELL_MOMMYS_POSITIVE_RESPONSES"
set POSITIVE_RESPONSES "$SHELL_MOMMYS_POSITIVE_RESPONSES"
end
if test -n "$SHELL_MOMMYS_NEGATIVE_RESPONSES"
set NEGATIVE_RESPONSES "$SHELL_MOMMYS_NEGATIVE_RESPONSES"
end
# split a string on forward slashes and return a random element
function pick_word
random choice (string split -n / $argv)
end
function pick_response # given a response type, pick an entry from the array
if test $argv[1] = "positive"
set element (random choice $POSITIVE_RESPONSES)
else if test $argv[1] = "negative"
set element (random choice $NEGATIVE_RESPONSES)
else
echo "Invalid response type: $argv[1]"
exit 1
end
# Return the selected response
echo "$element"
end
function sub_terms # given a response, sub in the appropriate terms
set -l response $argv
# pick_word for each term
set -l affectionate_term (pick_word $DEF_WORDS_LITTLE)
set -l pronoun (pick_word $DEF_WORDS_PRONOUNS)
set -l role (pick_word $DEF_WORDS_ROLES)
# sub in the terms, store in variable
set -l response (echo "$response" | string replace "AFFECTIONATE_TERM" "$affectionate_term")
set -l response (echo "$response" | string replace "MOMMYS_PRONOUN" "$pronoun")
set -l response (echo "$response" | string replace "MOMMYS_ROLE" "$role")
# we have string literal newlines in the response, so we need to printf it out
# print faint and colorcode
echo -e "$DEF_MOMMY_COLOR$response$COLORS_RESET"
end
function success
if test "$DEF_ONLY_NEGATIVE" = "true"
return 0
end
# pick_response for the response type
set -l response (pick_response "positive")
sub_terms "$response" >&2
return 0
end
function failure
set -l response (pick_response "negative")
sub_terms "$response" >&2
return $prev_status
end
if test $prev_status -eq 0
success
else
failure
end
'';
};
};
};
}

38
old/home/terminal/git.nix Executable file
View file

@ -0,0 +1,38 @@
{ pkgs, config, ... }:
{
programs.git = {
# Enable git with home-manager
enable = true;
settings = {
user = {
# User details
name = "serenity-F";
email = "serenity-F@noreply.codeberg.org";
# Path to user signing key
signingKey = "/home/serenity/.ssh/id_ed25519.pub";
};
# Use SSH keys for auth
gpg.format = "ssh";
commit.gpgSign = true;
# Use "main" as default branch
init.defaultBranch = "main";
# Automatically track remote branch
push.autoSetupRemote = true;
};
## OLD SETTINGS
#userName = "serenity-F";
#userEmail = "serenity-F@noreply.codeberg.org";
#extraConfig = {
#init.defaultBranch = "main";
#gpg.format = "ssh";
#commit.gpgSign = true;
#user.signingKey = "/home/serenity/.ssh/id_ed25519.pub";
#push.autoSetupRemote = true;
#};
};
}

82
old/home/terminal/kitty.nix Executable file
View file

@ -0,0 +1,82 @@
{ config, pkgs, ... }:
{
home = { packages = with pkgs; [ kitty ]; };
#programs.alacritty.enable = true;
programs.fzf = {
# CLI fuzzy find
enable = true;
enableFishIntegration = true;
};
## Enables kitty via home-manager
programs.kitty = {
enable = true;
## Declares "spleen" as the font
font = {
name = "spleen 32x64";
size = 12;
};
## Unsure if this is needed, but it should enhance fish integration ?
shellIntegration.enableFishIntegration = true;
settings = {
## This enables fish as the default shell
shell = "${pkgs.fish}/bin/fish";
## Misc.
url_style = "curly";
scrollback_lines = 10000;
disable_ligatures = "never";
enable_audio_bell = false;
update_check_interval = 0;
confirm_os_window_close = "0";
## Cursor
cursor_shape = "Underline";
cursor_underline_thickness = 1;
cursor_shape_unfocused = "unchanged";
## Window
window_padding_width = 5;
initial_window_width = 1200;
initial_window_height = 600;
remember_window_size = "no";
## Colours
cursor = "#" + config.theme.colors.fg;
cursor_text_color = "#" + config.theme.colors.bg;
background = "#" + config.theme.colors.bg;
background_blur = 2;
background_opacity = "0.82";
selection_foreground = "#" + config.theme.colors.primary-fg;
selection_background = "#" + config.theme.colors.primary-bg;
url_color = "#" + config.theme.colors.primary-fg;
## Declared in home/resources/themes/${themeName}
color0 = "#" + config.theme.colors.color0;
color8 = "#" + config.theme.colors.color8;
color1 = "#" + config.theme.colors.color1;
color9 = "#" + config.theme.colors.color9;
color2 = "#" + config.theme.colors.color2;
color10 = "#" + config.theme.colors.color10;
color3 = "#" + config.theme.colors.color3;
color11 = "#" + config.theme.colors.color11;
color4 = "#" + config.theme.colors.color4;
color12 = "#" + config.theme.colors.color12;
color5 = "#" + config.theme.colors.color5;
color13 = "#" + config.theme.colors.color13;
color6 = "#" + config.theme.colors.color6;
color14 = "#" + config.theme.colors.color14;
color7 = "#" + config.theme.colors.color7;
color15 = "#" + config.theme.colors.color15;
};
};
}

143
old/home/terminal/neofetch.nix Executable file
View file

@ -0,0 +1,143 @@
{ options, lib, pkgs, config, ... }:
{
home.packages = with pkgs; [ hyfetch neofetch ];
xdg.configFile."neofetch/ascii.txt".text = ''
''${c6}
@@
@@@
@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@
@@@
@@
'';
xdg.configFile."neofetch/config.conf".text = ''
print_info() {
prin "\n"
prin "\n \n OS" "SerenityOS"
info "\n \n Distro" distro
info "\n \n Kernel" kernel
info "\n \n Packages" packages
info "\n \n Desktop" de
#prin "\n \n Desktop" "Hyprland (wayland)"
info "\n \n Shell" shell
#prin "\n \n Shell" "Fish"
info "\n \n Editor" editor
#prin "\n \n Editor" "Neovim"
info "\n \n Terminal" term
#prin "\n \n Terminal" "Kitty"
info "\n \n Terminal Font" term_font
#prin "\n \n Terminal Font" "Spleen"
#info "\n \n Model" model
#prin "\n \n Motherboard" "MSI Z97 G3"
prin "\n \n Device" "Hades"
info "\n \n Processor" cpu
info "\n \n Memory" memory
info "\n \n GPU" gpu
#prin "\n \n Graphics" "Radeon RX 5700XT"
#info "\n \n Resolution" resolution
#info "\n \n Uptime" uptime
prin "\n"
#prin "\n"
}
reset="\033[0m"
gray="\033[1;90m"
red="\033[1;31m"
green="\033[1;32m"
yellow="\033[1;33m"
blue="\033[1;34m"
magenta="\033[1;35m"
cyan="\033[1;36m"
white="\033[1;37m"
cl0="''${gray}"
cl1="''${red}"
cl2="''${green}"
cl3="''${yellow}"
cl4="''${blue}"
cl5="''${magenta}"
cl6="''${cyan}"
cl7="''${white}"
title_fqdn="off"
kernel_shorthand="on"
distro_shorthand="on"
os_arch="off"
uptime_shorthand="on"
memory_percent="off"
memory_unit="mib"
mem_precision=0
package_managers="on"
shell_path="off"
shell_version="on"
speed_type="bios_limit"
speed_shorthand="on"
cpu_brand="off"
cpu_speed="on"
cpu_cores="off"
cpu_temp="off"
gpu_brand="off"
gpu_type="dedicated"
refresh_rate="off"
gtk_shorthand="on"
gtk2="on"
gtk3="on"
de_version="on"
disk_show=('/storage/emulated' '/' '/server')
disk_subtitle="none"
disk_percent="on"
music_player="auto"
song_format="%artist% - %album% - %title%"
song_shorthand="off"
mpc_args=()
colors=(${toString config.theme.colors.primary-ansi-16-number} 1 ${
toString config.theme.colors.primary-ansi-16-number
} ${toString config.theme.colors.primary-ansi-16-number} 7)
bold="on"
underline_enabled="on"
underline_char="-"
separator=":"
block_range=(0 15)
color_blocks="on"
block_width=3
block_height=1
col_offset="auto"
bar_char_elapsed="-"
bar_char_total="="
bar_border="on"
bar_length=15
bar_color_elapsed="distro"
bar_color_total="distro"
cpu_display="off"
memory_display="on"
battery_display="off"
disk_display="off"
image_backend="ascii"
image_source="$HOME/.config/neofetch/ascii.txt"
ascii_distro="auto"
ascii_colors=(distro)
ascii_bold="on"
image_loop="off"
thumbnail_dir="''${XDG_CACHE_HOME:-''${HOME}/.cache}/thumbnails/neofetch"
crop_mode="normal"
crop_offset="center"
image_size="auto"
gap=2
yoffset=0
xoffset=0
background_color=
stdout="off"
'';
}

View file

@ -0,0 +1,57 @@
{ inputs, ... }: {
imports = [
inputs.nixvim.homeModules.nixvim # uses the module channel from `flake.nix`
./keymaps.nix # keybinds
## Neovim plugins
./plugins/utils.nix
./plugins/ui.nix
./plugins/lsp.nix
./plugins/markdown.nix
./plugins/telescope.nix
];
## Enables nixvim
programs = {
nixvim = {
enable = true;
globals = { mapleader = " "; };
opts = {
updatetime = 50; # Faster completion
number = true;
relativenumber = true;
autoindent = true;
clipboard = "unnamed,unnamedplus";
expandtab = true;
tabstop = 2;
softtabstop = 2;
shiftwidth = 2;
smartindent = true;
breakindent = true;
ignorecase = true;
incsearch = true;
hlsearch = true;
smartcase = true;
wildmode = "list:longest";
completeopt = [ "menuone" "noselect" "noinsert" ];
signcolumn = "yes";
cursorline = false;
scrolloff = 8;
mouse = "a";
termguicolors = true;
showmode = false;
wrap = false;
swapfile = false;
undofile = true;
conceallevel = 3;
};
};
};
}

View file

@ -0,0 +1,310 @@
{
programs.nixvim = {
plugins.which-key = {
enable = true;
settings = {
delay = 600;
icons = {
breadcrumb = "»";
group = "+";
separator = ""; # ➜
mappings = false;
};
spec = [
# General Mappings
{
__unkeyed-1 = "<leader>c";
mode = [ "n" "v" ];
group = "+code";
}
{
__unkeyed-1 = "<leader>d";
mode = [ "n" "v" ];
group = "+debug";
}
{
__unkeyed-1 = "<leader>s";
mode = "n";
group = "+search";
}
{
__unkeyed-1 = "<leader>m";
mode = "n";
group = "+markdown";
}
{
__unkeyed-1 = "<leader>t";
mode = "n";
group = "+trouble";
}
{
__unkeyed-1 = "<leader>u";
mode = "n";
group = "+ui";
}
{
__unkeyed-1 = "<leader>w";
mode = "n";
group = "+windows";
}
{
__unkeyed-1 = "<leader>h";
mode = "n";
group = "+harpoon";
}
];
win = {
border = "rounded";
wo.winblend = 0;
};
};
};
keymaps = [
# General Mappings
{
key = "<leader>e";
action = "<cmd>Oil --float<cr>";
options.desc = "Oil";
}
{
key = "-";
action = "<cmd>Oil<cr>";
options.desc = "Oil";
}
{
key = "<leader>E";
action = "<cmd>Neotree toggle<cr>";
options.desc = "Neotree";
}
{
key = "s";
action = "<cmd>lua require('flash').jump()<cr>";
options.desc = "Flash";
}
{
key = "K";
action = "<cmd>lua vim.lsp.buf.hover()<cr>";
options.desc = "LSP Hover";
}
{
key = "<C-h>";
action = "<cmd>TmuxNavigateLeft<cr>";
}
{
key = "<C-j>";
action = "<cmd>TmuxNavigateDown<cr>";
}
{
key = "<C-k>";
action = "<cmd>TmuxNavigateUp<cr>";
}
{
key = "<C-l>";
action = "<cmd>TmuxNavigateRight<cr>";
}
# UI
{
key = "<leader>uz";
action = "<cmd>ZenMode<cr>";
options.desc = "Toggle ZenMode";
}
{
key = "<leader>uw";
action = "<cmd>set wrap!<cr>";
options.desc = "Toggle word wrapping";
}
{
key = "<leader>ul";
action = "<cmd>set linebreak!<cr>";
options.desc = "Toggle linebreak";
}
{
key = "<leader>us";
action = "<cmd>set spell!<cr>";
options.desc = "Toggle spellcheck";
}
{
key = "<leader>uc";
action = "<cmd>set cursorline!<cr>";
options.desc = "Toggle cursorline";
}
{
key = "<leader>un";
action = "<cmd>set number!<cr>";
options.desc = "Toggle line numbers";
}
{
key = "<leader>ur";
action = "<cmd>set relativenumber!<cr>";
options.desc = "Toggle relative line numbers";
}
{
key = "<leader>ut";
action = "<cmd>set showtabline=2<cr>";
options.desc = "Show tabline";
}
{
key = "<leader>uT";
action = "<cmd>set showtabline=0<cr>";
options.desc = "Hide tabline";
}
# Search
{
key = "<leader> ";
action = "<cmd>lua require('telescope.builtin').find_files()<cr>";
options.desc = "Telescope";
}
{
key = "<leader>sg";
action = "<cmd>lua require('telescope.builtin').live_grep()<cr>";
options.desc = "Livegrep";
}
{
key = "<leader>sf";
action = "<cmd>lua require('telescope.builtin').find_files()<cr>";
options.desc = "Find Files";
}
{
key = "<leader>sb";
action = "<cmd>lua require('telescope.builtin').buffers()<cr>";
options.desc = "Buffers";
}
{
key = "<leader>sh";
action = "<cmd>lua require('telescope.builtin').help_tags()<cr>";
options.desc = "Help Tags";
}
{
key = "<leader>sc";
action = "<cmd>lua require('telescope.builtin').commands()<cr>";
options.desc = "Commands";
}
{
key = "<leader>sm";
action = "<cmd>lua require('telescope.builtin').marks()<cr>";
options.desc = "Marks";
}
{
key = "<leader>so";
action = "<cmd>lua require('telescope.builtin').oldfiles()<cr>";
options.desc = "Oldfiles";
}
{
key = "<leader>ss";
action = "<cmd>lua require('telescope.builtin').spell_suggest()<cr>";
options.desc = "Spell Suggest";
}
{
key = "<leader>sr";
action = "<cmd>:noh<return><esc>";
options.desc = "Reset search";
}
{
key = "<leader>st";
action = "<cmd>TodoTelescope<cr>";
options.desc = "Todos";
}
# Trouble
{
key = "<leader>tx";
action = "<cmd>Trouble diagnostics toggle<cr>";
options.desc = "Diagnostics (Trouble)";
}
{
key = "<leader>tX";
action = "<cmd>Trouble diagnostics toggle filter.buf=0<cr>";
options.desc = "Buffer Diagnostics (Trouble)";
}
{
key = "<leader>ts";
action = "<cmd>Trouble symbols toggle focus=false<cr>";
options.desc = "Symbols (Trouble)";
}
{
key = "<leader>tl";
action = "<cmd>Trouble lsp toggle focus=false win.position=right<cr>";
options.desc = "LSP Definitions / references / ... (Trouble)";
}
{
key = "<leader>tL";
action = "<cmd>Trouble loclist toggle<cr>";
options.desc = "Location List (Trouble)";
}
{
key = "<leader>tQ";
action = "<cmd>Trouble qflist toggle<cr>";
options.desc = "Quickfix List (Trouble)";
}
# Windows
{
key = "<leader>ws";
action = "<cmd>split<cr>";
options.desc = "Split";
}
{
key = "<leader>wv";
action = "<cmd>vsplit<cr>";
options.desc = "VSplit";
}
{
key = "<leader>wd";
action = "<cmd>close<cr>";
options.desc = "Close";
}
# Code
{
key = "<leader>cd";
action = "<cmd>lua vim.lsp.buf.definition()<cr>";
options.desc = "LSP Definition";
}
{
key = "<leader>cr";
action = "<cmd>lua vim.lsp.buf.references()<cr>";
options.desc = "LSP References";
}
{
key = "<leader>ct";
action = "<cmd>lua vim.lsp.buf.type_definition()<cr>";
options.desc = "LSP Type Definition";
}
{
key = "<leader>ca";
action = "<cmd>lua vim.lsp.buf.code_action()<cr>";
options.desc = "LSP Code Action";
}
{
key = "<leader>cf";
action = "<cmd>lua vim.lsp.buf.formatting()<cr>";
options.desc = "LSP Formatting";
}
{
key = "<leader>cn";
action = "<cmd>lua vim.lsp.diagnostic.goto_next()<cr>";
options.desc = "LSP Next Diagnostic";
}
{
key = "<leader>cp";
action = "<cmd>lua vim.lsp.diagnostic.goto_prev()<cr>";
options.desc = "LSP Previous Diagnostic";
}
{
key = "<leader>cu";
action = "<cmd>lua require('dapui').toggle()<CR>";
options.desc = "Toggle Dapui";
}
{
key = "<leader>cb";
action = "<cmd>lua require('dap').toggle_breakpoint()<CR>";
options.desc = "Toggle breakpoint";
}
];
};
}

View file

@ -0,0 +1,169 @@
{
programs.nixvim.plugins = {
## Misc. LSP related plugins
web-devicons.enable = true;
bufferline.enable = true;
## Language syntax processing
lsp-format.enable = true;
lsp = {
enable = true;
servers = {
html.enable = true; # HTML
cssls.enable = true; # CSS
marksman.enable = true; # Markdown
bashls.enable = true; # Bash
fish_lsp.enable = true; # Fish
pyright.enable = true; # Python
rls.enable = true; # Rust
hls = {
enable = true; # Haskell
installGhc = true; # GHC
};
nixd = {
enable = true; # Nix
extraOptions = { expr = "import <nixpkgs> {}"; }; # uhhh
};
};
keymaps.lspBuf = {
"gd" = "definition";
"gD" = "references";
"gt" = "type_definition";
"gi" = "implementation";
"K" = "hover";
};
};
none-ls = {
enable = true;
sources = {
diagnostics = {
golangci_lint.enable = true;
statix.enable = true;
};
formatting = {
tidy.enable = true;
markdownlint.enable = true;
shfmt.enable = true;
shellharden.enable = true;
nixfmt.enable = true;
};
};
};
## Completion
luasnip.enable = true;
cmp-buffer = { enable = true; };
cmp-emoji = { enable = true; };
cmp-nvim-lsp = { enable = true; };
cmp-path = { enable = true; };
cmp_luasnip = { enable = true; };
cmp = {
enable = true;
settings = {
snippet.expand =
"function(args) require('luasnip').lsp_expand(args.body) end";
sources = [
{ name = "nvim_lsp"; }
{ name = "luasnip"; }
{
name = "buffer";
option.get_bufnrs.__raw = "vim.api.nvim_list_bufs";
}
{ name = "nvim_lua"; }
{ name = "mkdnflow"; }
{ name = "path"; }
];
formatting = {
fields = [ "abbr" "kind" "menu" ];
format =
# lua
''
function(_, item)
local icons = {
Namespace = "󰌗",
Text = "󰉿",
Method = "󰆧",
Function = "󰆧",
Constructor = "",
Field = "󰜢",
Variable = "󰀫",
Class = "󰠱",
Interface = "",
Module = "",
Property = "󰜢",
Unit = "󰑭",
Value = "󰎠",
Enum = "",
Keyword = "󰌋",
Snippet = "",
Color = "󰏘",
File = "󰈚",
Reference = "󰈇",
Folder = "󰉋",
EnumMember = "",
Constant = "󰏿",
Struct = "󰙅",
Event = "",
Operator = "󰆕",
TypeParameter = "󰊄",
Table = "",
Object = "󰅩",
Tag = "",
Array = "[]",
Boolean = "",
Number = "",
Null = "󰟢",
String = "󰉿",
Calendar = "",
Watch = "󰥔",
Package = "",
Copilot = "",
Codeium = "",
TabNine = "",
}
local icon = icons[item.kind] or ""
item.kind = string.format("%s %s", icon, item.kind or "")
return item
end
'';
};
window = {
completion = {
winhighlight =
"FloatBorder:CmpBorder,Normal:CmpPmenu,Search:PmenuSel";
scrollbar = false;
sidePadding = 0;
border = [ "╭" "─" "╮" "│" "╯" "─" "╰" "│" ];
};
documentation = {
border = [ "╭" "─" "╮" "│" "╯" "─" "╰" "│" ];
winhighlight =
"FloatBorder:CmpBorder,Normal:CmpPmenu,Search:PmenuSel";
};
};
mapping = {
"<C-n>" = "cmp.mapping.select_next_item()";
"<C-p>" = "cmp.mapping.select_prev_item()";
"<Down>" = "cmp.mapping.select_next_item()";
"<Up>" = "cmp.mapping.select_prev_item()";
"<C-j>" = "cmp.mapping.select_next_item()";
"<C-k>" = "cmp.mapping.select_prev_item()";
"<C-d>" = "cmp.mapping.scroll_docs(-4)";
"<C-f>" = "cmp.mapping.scroll_docs(4)";
"<C-Space>" = "cmp.mapping.complete()";
"<C-e>" = "cmp.mapping.close()";
"<CR>" =
"cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Insert, select = true })";
};
};
};
};
}

View file

@ -0,0 +1,190 @@
# The render-markdown.nvim plugin is a plugin that renders markdown files in a neovim in a more readable way.
{ config, ... }:
let
accent = "#${config.theme.colors.color15}";
accent-alt = "#${config.theme.colors.color6}";
muted = "#${config.theme.colors.secondary-bg}";
background = "#${config.theme.colors.primary-bg}";
in {
programs.nixvim = {
plugins.mkdnflow = {
enable = true;
settings = {
modules = { conceal = false; };
to_do.symbols = [ " " "-" "x" "!" "/" ];
mappings = {
MkdnCreateLink = false;
MkdnCreateLinkFromClipboard = {
key = "<leader>ml";
modes = [ "n" "v" ];
};
MkdnDecreaseHeading = {
key = "<leader>m-";
modes = "n";
};
MkdnDestroyLink = false;
MkdnEnter = {
key = "<CR>";
modes = [ "v" ];
};
MkdnExtendList = false;
MkdnFoldSection = {
key = "<leader>mf";
modes = "n";
};
MkdnUnfoldSection = {
key = "<leader>mF";
modes = "n";
};
MkdnFollowLink = {
key = "gd";
modes = "n";
};
MkdnGoBack = false;
MkdnGoForward = false;
MkdnIncreaseHeading = {
key = "<leader>m+";
modes = "n";
};
MkdnMoveSource = false;
MkdnNewListItem = false;
MkdnNewListItemAboveInsert = {
key = "O";
modes = "n";
};
MkdnNewListItemBelowInsert = {
key = "o";
modes = "n";
};
MkdnNextHeading = {
key = "<leader>m#";
modes = "n";
};
MkdnNextLink = false;
MkdnPrevLink = false;
MkdnPrevHeading = {
key = "<leader>m*";
modes = "n";
};
MkdnSTab = false;
MkdnTab = false;
MkdnTableNewColAfter = {
key = "<leader>mc";
modes = "n";
};
MkdnTableNewColBefore = {
key = "<leader>mC";
modes = "n";
};
MkdnTableNewRowAbove = {
key = "<leader>mR";
modes = "n";
};
MkdnTableNewRowBelow = {
key = "<leader>mr";
modes = "n";
};
MkdnTableNextCell = {
key = "<S-Tab>";
modes = "n";
};
MkdnTableNextRow = false;
MkdnTablePrevCell = {
key = "<S-Tab>";
modes = "n";
};
MkdnTablePrevRow = false;
MkdnToggleToDo = {
key = "<C-Space>";
modes = [ "n" "v" ];
};
MkdnUpdateNumbering = {
key = "<leader>mn";
modes = "n";
};
MkdnYankAnchorLink = {
key = "ya";
modes = "n";
};
MkdnYankFileAnchorLink = {
key = "yfa";
modes = "n";
};
};
};
};
extraFiles = {
"after/ftplugin/markdown.lua".text = ''
vim.bo.tabstop = 2
vim.bo.shiftwidth = 2
vim.bo.expandtab = true
'';
};
highlight = {
RenderMarkdownBg.bg = background;
RenderMarkdownH1.fg = accent;
RenderMarkdownH2.fg = accent;
RenderMarkdownH3.fg = accent-alt;
RenderMarkdownH4.fg = accent-alt;
RenderMarkdownH5.fg = accent-alt;
RenderMarkdownH6.fg = accent-alt;
RenderMarkdownTodo.fg = muted;
RenderMarkdownWarning.fg = accent;
};
plugins.headlines = {
enable = true;
settings = {
markdown = {
headline_highlights = [
"RenderMarkdownH1"
"RenderMarkdownH2"
"RenderMarkdownH3"
"RenderMarkdownH4"
"RenderMarkdownH5"
"RenderMarkdownH6"
];
fat_headlines = false;
};
};
};
plugins.render-markdown = {
enable = true;
settings = {
heading = {
icons = [ "# " "󰲣 " "󰲥 " "󰲧 " "󰲩 " "󰲫 " ];
backgrounds = [ "RenderMarkdownBg" ];
foregrounds = [
"RenderMarkdownH1"
"RenderMarkdownH2"
"RenderMarkdownH3"
"RenderMarkdownH4"
"RenderMarkdownH5"
"RenderMarkdownH6"
];
};
checkbox = {
unchecked = { highlight = "RenderMarkdownTodo"; };
checked = { highlight = "RenderMarkdownTodo"; };
custom = {
pending = {
raw = "[-]";
rendered = "󰥔 ";
highlight = "RenderMarkdownTodo";
};
important = {
raw = "[!]";
rendered = " ";
highlight = "RenderMarkdownWarning";
};
cancel = {
raw = "[/]";
rendered = "󱋬 ";
highlight = "RenderMarkdownTodo";
};
};
};
};
};
};
}

View file

@ -0,0 +1,75 @@
{ config, ... }:
let
accent = "#${config.theme.colors.color15}";
background = "#${config.theme.colors.primary-bg}";
background-alt = "#${config.theme.colors.secondary-bg}";
in {
programs.nixvim = {
highlight = {
TelescopePromptPrefix.fg = accent;
TelescopeSelectionCaret = {
fg = accent;
bg = background-alt;
};
TelescopeSelection.bg = background-alt;
TelescopePromptTitle = {
bg = background;
fg = accent;
};
TelescopePromptNormal.bg = background;
TelescopePromptBorder = {
bg = background;
fg = accent;
};
};
plugins = {
telescope = {
enable = true;
extensions.fzf-native = { enable = true; };
settings.defaults = { selection_caret = "❚ "; };
};
## Tree
treesitter-context.enable = true;
neo-tree.enable = true;
oil = {
enable = true;
settings = {
default_file_explorer = false;
skip_confirm_for_simple_edits = true;
win_options = {
concealcursor = "ncv";
conceallevel = 3;
cursorcolumn = false;
foldcolumn = "0";
list = false;
signcolumn = "no";
spell = false;
wrap = false;
};
float = { padding = 5; };
keymaps = {
"-" = "actions.parent";
"b" = "actions.parent";
"<C-c>" = "actions.close";
"<C-h>" = "actions.select_split";
"<C-l>" = "actions.refresh";
"<C-p>" = "actions.preview";
"<C-s>" = "actions.select_vsplit";
"<C-t>" = "actions.select_tab";
"<CR>" = "actions.select";
_ = "actions.open_cwd";
"`" = "actions.cd";
"g." = "actions.toggle_hidden";
"g?" = "actions.show_help";
"g\\" = "actions.toggle_trash";
gs = "actions.change_sort";
gx = "actions.open_external";
"~" = "actions.tcd";
};
};
};
};
};
}

View file

@ -0,0 +1,253 @@
{ config, pkgs, ... }:
let
accent = "#${config.theme.colors.color14}";
muted = "#${config.theme.colors.secondary-bg}";
foreground = "#${config.theme.colors.primary-fg}";
in {
home.packages = with pkgs; [ ctags ];
programs = {
nixvim = {
dependencies.ctags = {
enable = true;
#package = with pkgs; [ universal-ctags ];
};
highlight = {
AlphaHeaderColor.fg = accent;
AlphaTextColor.fg = foreground;
AlphaShortcutColor.fg = muted;
};
colorschemes = {
modus = {
enable = true;
settings = {
transparent = true;
style = "modus_vivendi";
styles = {
comments = {
italic = true;
#bg = "";
fg = "#cccccc";
};
variables = {
#bg = "";
fg = "#00c0ff";
};
functions = {
#bg = "";
fg = "#d0fffe";
};
keywords = {
bold = true;
#bg = "";
fg = "#00dfff";
};
};
};
};
};
plugins = {
#transparent.enable = true;
lualine = {
enable = true;
settings = {
options.disabled_filetypes.statusline =
[ "dashboard" "alpha" "neo-tree" ];
alwaysDivideMiddle = true;
globalstatus = true;
ignoreFocus = [ "neo-tree" ];
extensions = [ "fzf" ];
theme = "auto";
componentSeparators = {
left = "|";
right = "|";
};
sectionSeparators = {
left = "█"; # 
right = "█"; # 
};
sections = {
lualine_a = [ "mode" ];
lualine_b = [ "branch" "diff" "diagnostics" ];
lualine_c = [ "filename" ];
lualine_x = [ "filetype" ];
lualine_y = [ "progress" ];
lualine_z = [ ''" " .. os.date("%R")'' ];
};
};
};
web-devicons.enable = true;
noice.enable = true;
notify = {
enable = true;
settings = { level = "warn"; };
};
gitsigns = {
enable = true;
settings.current_line_blame = false;
};
trouble.enable = true;
indent-blankline.enable = true;
colorizer.enable = true;
tagbar = {
enable = true;
#tagsPackage = pkgs.universal-ctags;
};
alpha = {
enable = true;
settings.layout = [
{
type = "padding";
val = 4;
}
{
type = "text";
opts = {
position = "center";
hl = "AlphaHeaderColor";
};
val = [
" "
" ████ ██████ █████ ██ "
" ███████████ █████ "
" █████████ ███████████████████ ███ ███████████ "
" █████████ ███ █████████████ █████ ██████████████ "
" █████████ ██████████ █████████ █████ █████ ████ █████ "
" ███████████ ███ ███ █████████ █████ █████ ████ █████ "
" ██████ █████████████████████ ████ █████ █████ ████ ██████ "
" "
];
}
{
type = "padding";
val = 4;
}
{
type = "group";
val = [
{
type = "button";
val = "󰭎 Find file";
on_press.__raw =
"function() vim.cmd[[Telescope find_files]] end";
opts = {
shortcut = "nf";
position = "center";
cursor = 3;
width = 50;
align_shortcut = "right";
hl_shortcut = "AlphaShortcutColor";
hl = "AlphaTextColor";
};
}
{
type = "button";
val = " New file";
on_press.__raw = "function() vim.cmd[[ene]] end";
opts = {
shortcut = "nn";
position = "center";
cursor = 3;
width = 50;
align_shortcut = "right";
hl_shortcut = "AlphaShortcutColor";
hl = "AlphaTextColor";
};
}
{
type = "button";
val = " NixOs Config";
on_press.__raw =
"function() vim.cmd[[Neotree /home/serenity/flakes/nixdots/home/common/dotconfig/nvim]] end";
opts = {
shortcut = "nc";
position = "center";
cursor = 3;
width = 50;
align_shortcut = "right";
hl_shortcut = "AlphaShortcutColor";
hl = "AlphaTextColor";
};
}
{
type = "button";
val = " Keybindings";
on_press.__raw =
"function() vim.cmd[[e /home/serenity/flakes/nixdots/home/common/dotconfig/nvim/docs/KEYBINDINGS.md]] end";
opts = {
shortcut = "nc";
position = "center";
cursor = 3;
width = 50;
align_shortcut = "right";
hl_shortcut = "AlphaShortcutColor";
hl = "AlphaTextColor";
};
}
{
type = "button";
val = " Recently used";
on_press.__raw =
"function() vim.cmd[[Telescope oldfiles]] end";
opts = {
shortcut = "no";
position = "center";
cursor = 3;
width = 50;
align_shortcut = "right";
hl_shortcut = "AlphaShortcutColor";
hl = "AlphaTextColor";
};
}
{
type = "button";
val = "󰱽 Find text";
on_press.__raw =
"function() vim.cmd[[Telescope live_grep]] end";
opts = {
shortcut = "nt";
position = "center";
cursor = 3;
width = 50;
align_shortcut = "right";
hl_shortcut = "AlphaShortcutColor";
hl = "AlphaTextColor";
};
}
{
type = "button";
val = "󰩈 Quit Neovim";
on_press.__raw = "function() vim.cmd[[qa]] end";
opts = {
shortcut = "nq";
position = "center";
cursor = 3;
width = 50;
align_shortcut = "right";
hl_shortcut = "AlphaShortcutColor";
hl = "AlphaTextColor";
};
}
];
}
];
};
};
};
};
}

View file

@ -0,0 +1,77 @@
{ config, pkgs, ... }: {
programs.nixvim = {
highlightOverride = { FloatBorder.fg = "#${config.theme.colors.color15}"; };
plugins = {
comment.enable = true;
todo-comments.enable = true;
tmux-navigator.enable = true;
nvim-autopairs.enable = true;
friendly-snippets.enable = true;
flash.enable = true;
image = {
enable = true;
settings.integrations.markdown = {
clearInInsertMode = true;
onlyRenderImageAtCursor = true;
};
};
treesitter = {
enable = true;
nixGrammars = true;
settings = {
indent.enable = true;
highlight.enable = true;
};
};
harpoon = {
enable = true;
enableTelescope = true;
#keymapsSilent = true;
#keymaps = {
#addFile = "<leader>ha";
#toggleQuickMenu = "<leader>hu";
#navNext = "<leader>hl";
#navPrev = "<leader>hh";
#navFile = {
#"1" = "<leader>h1";
#"2" = "<leader>h2";
#"3" = "<leader>h3";
#"4" = "<leader>h4";
#};
#};
};
dap = {
enable = true;
adapters = { };
signs = {
dapBreakpoint = {
text = "●";
texthl = "DapBreakpoint";
};
dapBreakpointCondition = {
text = "●";
texthl = "DapBreakpointCondition";
};
dapLogPoint = {
text = "◆";
texthl = "DapLogPoint";
};
};
};
dap-ui = { enable = true; };
dap-virtual-text = { enable = true; };
dap-go = {
enable = true;
settings = { delve.path = "${pkgs.delve}/bin/dlv"; };
};
};
};
}

19
old/home/terminal/yazi.nix Executable file
View file

@ -0,0 +1,19 @@
{
programs.yazi = {
enable = true;
enableFishIntegration = true;
settings = {
log = { enabled = false; };
manager = {
show_hidden = true;
#linemode = "none"
sort_by = "mtime";
sort_dir_first = true;
sort_reverse = false;
};
};
#plugins = { };
};
}