Compare commits

1 Commits

Author SHA1 Message Date
76613c5e1c update 2026-03-28 14:32:05 +01:00
79 changed files with 1369 additions and 1588 deletions

View File

@@ -6,9 +6,9 @@ in
{ {
# ── Steam & Printer ─────────────────────────────────────────────────── # ── Steam & Printer ───────────────────────────────────────────────────
imports = [ imports = [
./system/steam.nix ./builds/steam.nix
./system/printer.nix ./builds/printer.nix
./system/sops.nix ./builds/sops.nix
]; ];
# ── Use the systemd-boot EFI boot loader. ───────────────────────────── # ── Use the systemd-boot EFI boot loader. ─────────────────────────────
@@ -43,14 +43,11 @@ in
}; };
nix = { nix = {
# ── Flakes ─────────────────────────────────────────────────────────── # ── Flakes ───────────────────────────────────────────────────────────
settings = { settings.experimental-features = [
download-buffer-size = 524288000; "nix-command"
experimental-features = [ "flakes"
"nix-command" ];
"flakes"
];
};
# ── Garbage collect ─────────────────────────────────────────────────── # ── Garbage collect ───────────────────────────────────────────────────
gc = { gc = {

72
flake.lock generated
View File

@@ -5,11 +5,11 @@
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1774799062, "lastModified": 1774616169,
"narHash": "sha256-U9RGxFsLeKivD1+7sVXj5TltHGfB4m/dkn3dENT2fSM=", "narHash": "sha256-fP4bU3SOH5sefSl6EagqULFs+bXoo3h3VLQCCyJplo4=",
"owner": "catppuccin", "owner": "catppuccin",
"repo": "nix", "repo": "nix",
"rev": "948a8ee84858d053b83f01c8c168f9f4347937e6", "rev": "e616c61cd9f7b05b32af266bc005fa266860dacf",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -106,11 +106,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1775143651, "lastModified": 1774647770,
"narHash": "sha256-S0RqAyDPMTcv9vASMaE8eY1QexFysAOdnxUxFHIPOyE=", "narHash": "sha256-UNNi14XiqRWWjO8ykbFwA5wRwx7EscsC+GItOVpuGjc=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "d166a078541982a76f14d3e06e9665fa5c9ed85e", "rev": "02371c05a04a2876cf92e2d67a259e8f87399068",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -126,11 +126,11 @@
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_2"
}, },
"locked": { "locked": {
"lastModified": 1775138742, "lastModified": 1774656308,
"narHash": "sha256-cyipL9p0VzyZT0wa+3KkeJYvtEYzyI1PjBOnGU8z3gI=", "narHash": "sha256-k+L2Q5DtNGkPy+JgfhpTxpngdxy+FVz269iNfCYVy5E=",
"owner": "nix-community", "owner": "nix-community",
"repo": "neovim-nightly-overlay", "repo": "neovim-nightly-overlay",
"rev": "0fff256cfbc6978e711c43555df210d46940e943", "rev": "114911d841b928b2b147511bec7121af310d7a23",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -142,11 +142,11 @@
"neovim-src": { "neovim-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1774915197, "lastModified": 1774652330,
"narHash": "sha256-yor+eo8CVi7wBp7CjAMQnVoK+m197gsl7MvUzaqicns=", "narHash": "sha256-dqlsjRaLgD87D8YaC8842bhYziuRQ2qvTDgQDKL1ttQ=",
"owner": "neovim", "owner": "neovim",
"repo": "neovim", "repo": "neovim",
"rev": "dbc4800dda2b0dc3290dc79955f857256e0694e2", "rev": "f027f41e2cfba7be8c4841cb1a036827375bbd73",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -162,11 +162,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1775098553, "lastModified": 1774666058,
"narHash": "sha256-OFWIVY1vzAbPE73ksKAMsFh11AXZ3MjIymRQ90Butnc=", "narHash": "sha256-YOFC8tZvWAojaBBJHB8OD7ONUDUc9Sc8u4/TJ8s//WQ=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nix-vscode-extensions", "repo": "nix-vscode-extensions",
"rev": "361b17a5b2f4536a119c794a367a29b07691f941", "rev": "4ef48e66f28308955322a92f80b6c35e42f17a1c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -193,11 +193,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1774701658, "lastModified": 1774273680,
"narHash": "sha256-CIS/4AMUSwUyC8X5g+5JsMRvIUL3YUfewe8K4VrbsSQ=", "narHash": "sha256-a++tZ1RQsDb1I0NHrFwdGuRlR5TORvCEUksM459wKUA=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "b63fe7f000adcfa269967eeff72c64cafecbbebe", "rev": "fdc7b8f7b30fdbedec91b71ed82f36e1637483ed",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -209,11 +209,11 @@
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1775036866, "lastModified": 1774386573,
"narHash": "sha256-ZojAnPuCdy657PbTq5V0Y+AHKhZAIwSIT2cb8UgAz/U=", "narHash": "sha256-4hAV26quOxdC6iyG7kYaZcM3VOskcPUrdCQd/nx8obc=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "6201e203d09599479a3b3450ed24fa81537ebc4e", "rev": "46db2e09e1d3f113a13c0d7b81e2f221c63b8ce9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -225,11 +225,11 @@
}, },
"nixpkgs_4": { "nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1775036866, "lastModified": 1774386573,
"narHash": "sha256-ZojAnPuCdy657PbTq5V0Y+AHKhZAIwSIT2cb8UgAz/U=", "narHash": "sha256-4hAV26quOxdC6iyG7kYaZcM3VOskcPUrdCQd/nx8obc=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "6201e203d09599479a3b3450ed24fa81537ebc4e", "rev": "46db2e09e1d3f113a13c0d7b81e2f221c63b8ce9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -264,11 +264,11 @@
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1774802402, "lastModified": 1774612943,
"narHash": "sha256-L1UJ/zxKTyyaGGmytH6OYlgQ0HGSMhvPkvU+iz4Mkb8=", "narHash": "sha256-hRhq5cpDyBm/ZQyuzI+/YzQEVt35d/M6ko7ADfodw9s=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixvim", "repo": "nixvim",
"rev": "cbd8536a05d1aae2593cb5c9ace1010c8c5845cb", "rev": "2b9f8e1d659d1c7664e1b85ab1620c219672696c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -283,11 +283,11 @@
"nixpkgs": "nixpkgs_4" "nixpkgs": "nixpkgs_4"
}, },
"locked": { "locked": {
"lastModified": 1775159663, "lastModified": 1774700410,
"narHash": "sha256-KES+OClaN0Vy/BkjW60UFo3dnQWpjkd1vIKEoynnlk0=", "narHash": "sha256-2vvPMI78Wye6HttV+mQgX0QeaSQkNgkkbXaOXlt5uhM=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NUR", "repo": "NUR",
"rev": "008b7b102054965988abf26ea261314a2e6672d5", "rev": "560b181abe2bba9d130123a5dfa56f03c1d5be88",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -337,11 +337,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1774910634, "lastModified": 1774303811,
"narHash": "sha256-B+rZDPyktGEjOMt8PcHKYmgmKoF+GaNAFJhguktXAo0=", "narHash": "sha256-fhG4JAcLgjKwt+XHbjs8brpWnyKUfU4LikLm3s0Q/ic=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "19bf3d8678fbbfbc173beaa0b5b37d37938db301", "rev": "614e256310e0a4f8a9ccae3fa80c11844fba7042",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -387,11 +387,11 @@
"rust-overlay": "rust-overlay" "rust-overlay": "rust-overlay"
}, },
"locked": { "locked": {
"lastModified": 1775132067, "lastModified": 1774567340,
"narHash": "sha256-JFcGvXwV9O55bUDY9MilD2+/qUPqYg9IHsdH6oJzCGw=", "narHash": "sha256-skKD1hvAvilKkK406RgNl6X/YJgkSsoZmtHmdfeoyWI=",
"owner": "sxyazi", "owner": "sxyazi",
"repo": "yazi", "repo": "yazi",
"rev": "86b8f0779ca5406fb6fead8c248d3ab23c9b1db0", "rev": "935eb6b2989f8a7ce219a2a71a539365c8dccfbb",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -33,7 +33,6 @@
url = "github:Mic92/sops-nix"; url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
yazi.url = "github:sxyazi/yazi"; yazi.url = "github:sxyazi/yazi";
}; };

View File

@@ -57,10 +57,12 @@
programs.home-manager.enable = true; programs.home-manager.enable = true;
# ── whatsie insecure ──────────────────────────────────────────────────
nixpkgs.config = { nixpkgs.config = {
allowUnfree = true; allowUnfree = true;
permittedInsecurePackages = [ permittedInsecurePackages = [
"electron-32.3.3" "electron-32.3.3"
"qtwebengine-5.15.19"
]; ];
}; };
} }

View File

@@ -5,7 +5,7 @@
./calibre.nix ./calibre.nix
./digikam.nix ./digikam.nix
./eww ./eww
./filebrowser ./filebrowser.nix
./git.nix ./git.nix
./hyprlock.nix ./hyprlock.nix
./imv.nix ./imv.nix
@@ -28,5 +28,6 @@
./zathura.nix ./zathura.nix
./zoom.nix ./zoom.nix
./zsh.nix ./zsh.nix
./zk.nix
]; ];
} }

View File

@@ -0,0 +1,64 @@
{ inputs, pkgs, ... }:
{
home.packages = with pkgs; [
kdePackages.dolphin
kdePackages.dolphin-plugins
kdePackages.baloo-widgets
kdePackages.baloo
nautilus
udisks
];
xdg.configFile."menus/applications.menu".source =
"${pkgs.kdePackages.plasma-workspace}/etc/xdg/menus/plasma-applications.menu";
# ── Yazi ──────────────────────────────────────────────────────────────
programs.yazi = {
enable = true;
package = inputs.yazi.packages.${pkgs.stdenv.hostPlatform.system}.default;
enableZshIntegration = true;
settings = {
yazi = {
ratio = [
1
4
3
];
sort_by = "natural";
sort_sensitive = true;
sort_reverse = false;
sort_dir_first = true;
linemode = "none";
show_hidden = true;
show_symlink = true;
};
preview = {
image_filter = "lanczos3";
image_quality = 90;
tab_size = 1;
max_width = 600;
max_height = 900;
cache_dir = "";
ueberzug_scale = 1;
ueberzug_offset = [
0
0
0
0
];
};
tasks = {
micro_workers = 5;
macro_workers = 10;
bizarre_retry = 5;
};
};
};
programs.zoxide = {
enable = true;
enableZshIntegration = true;
};
}

View File

@@ -1,252 +0,0 @@
{ inputs, pkgs, ... }:
let
exifaudio = pkgs.fetchFromGitHub {
owner = "Sonico98";
repo = "exifaudio.yazi";
rev = "4506f9d";
sha256 = "sha256-RWCqWBpbmU3sh/A+LBJPXL/AY292blKb/zZXGvIA5/o=";
};
bunny = pkgs.fetchFromGitHub {
owner = "stelcodes";
repo = "bunny.yazi";
rev = "71b14a3";
sha256 = "sha256-uQO0C00yOFPWq8KEO/kEZM6tFZRc9SiXfgN7kzlwDeA=";
};
in
{
home.packages = with pkgs; [
# kdePackages.dolphin
# kdePackages.dolphin-plugins
# kdePackages.baloo-widgets
# kdePackages.baloo
exiftool
nautilus
ouch
udisks
];
xdg.configFile."menus/applications.menu".source =
"${pkgs.kdePackages.plasma-workspace}/etc/xdg/menus/plasma-applications.menu";
# ── Yazi ──────────────────────────────────────────────────────────────
programs.yazi = {
enable = true;
package = inputs.yazi.packages.${pkgs.stdenv.hostPlatform.system}.default;
enableZshIntegration = true;
initLua = ./init.lua;
settings = {
yazi = {
ratio = [
1
4
3
];
sort_by = "natural";
sort_sensitive = true;
sort_reverse = false;
sort_dir_first = true;
linemode = "none";
show_hidden = true;
show_symlink = true;
};
preview = {
image_filter = "lanczos3";
image_quality = 90;
tab_size = 1;
max_width = 600;
max_height = 900;
cache_dir = "";
ueberzug_scale = 1;
ueberzug_offset = [
0
0
0
0
];
};
tasks = {
micro_workers = 5;
macro_workers = 10;
bizarre_retry = 5;
};
plugin = {
prepend_previewers = [
{
run = "exifaudio";
mime = "audio/*";
}
];
prepend_fetchers = [
{
id = "git";
url = "*";
run = "git";
}
{
id = "git";
url = "*/";
run = "git";
}
];
};
opener = {
extract = [
{
run = "ouch d -y %*";
desc = "Extract here with ouch";
for = "windows";
}
{
run = "ouch d -y $@";
desc = "Extract here with ouch";
for = "unix";
}
];
};
};
keymap = {
mgr.prepend_keymap = [
{
run = "plugin mount";
on = [ "M" ];
}
{
run = "plugin ouch";
on = [ "C" ];
}
{
run = "plugin bunny";
on = [
";"
];
desc = "Start bunny";
}
{
run = "plugin bunny fuzzy";
on = [
"'"
];
desc = "Start bunny fuzzy search";
}
{
run = "plugin chmod";
on = [
"c"
"m"
];
desc = "Chmod on selected files";
}
{
run = "plugin sudo -- paste";
on = [
"R"
"p"
"p"
];
desc = "sudo paste";
}
{
run = "plugin sudo -- paste --force";
on = [
"R"
"P"
];
desc = "sudo paste";
}
{
run = "plugin sudo -- rename";
on = [
"R"
"r"
];
desc = "sudo rename";
}
{
run = "plugin sudo -- link";
on = [
"R"
"p"
"l"
];
desc = "sudo link";
}
{
run = "plugin sudo -- link --relative";
on = [
"R"
"p"
"r"
];
desc = "sudo link relative path";
}
{
run = "plugin sudo -- hardlink";
on = [
"R"
"p"
"L"
];
desc = "sudo hardlink";
}
{
run = "plugin sudo -- create";
on = [
"R"
"a"
];
desc = "sudo create";
}
{
run = "plugin sudo -- remove";
on = [
"R"
"d"
];
desc = "sudo trash";
}
{
run = "plugin sudo -- remove --permanently";
on = [
"R"
"D"
];
desc = "sudo delete";
}
{
run = "plugin sudo -- chmod";
on = [
"R"
"m"
];
desc = "sudo chmod";
}
{
run = [ "plugin wl-clipboard" ];
on = [ "<C-y" ];
}
];
};
plugins = {
bunny = bunny;
chmod = pkgs.yaziPlugins.chmod;
exifaudio = exifaudio;
git = pkgs.yaziPlugins.git;
mount = pkgs.yaziPlugins.mount;
ouch = pkgs.yaziPlugins.ouch;
sudo = pkgs.yaziPlugins.sudo;
wl-clipboard = pkgs.yaziPlugins.wl-clipboard;
};
};
programs.zoxide = {
enable = true;
enableZshIntegration = true;
};
}

View File

@@ -1,29 +0,0 @@
require("bunny"):setup({
hops = {
{ key = "/", path = "/", desc = "Root" },
{ key = { "n", "c" }, path = "/etc/nixos", desc = "NixOS config" },
{ key = { "n", "s" }, path = "/nix/store", desc = "Nix store" },
{ key = "~", path = "~", desc = "Home" },
{ key = "r", path = "~/Repos", desc = "Repos" },
{ key = "d", path = "~/Downloads", desc = "Downloads" },
{ key = "D", path = "~/Documents", desc = "Documents" },
{ key = "c", path = "~/.config", desc = "Config files" },
{ key = { "N", "h" }, path = "~/Nextcloud", desc = "Nexctloud root" },
{ key = { "N", "d" }, path = "~/Nextcloud/Data/Documents", desc = "Nextcloud documents" },
{ key = { "N", "u" }, path = "~/Nextcloud/Uni", desc = "Nextcloud uni" },
{ key = { "N", "c" }, path = "~/Nextcloud/Uni/26-SoSe/26-SoSe-Francais", desc = "Nextcloud uni current" },
{ key = { "m", "b" }, path = "/mnt", desc = "Mount base" },
{ key = { "m", "r" }, path = "/mnt/remote", desc = "Mount remote" },
-- key and path attributes are required, desc is optional
},
desc_strategy = "path", -- If desc isn't present, use "path" or "filename", default is "path"
ephemeral = true, -- Enable ephemeral hops, default is true
tabs = true, -- Enable tab hops, default is true
notify = false, -- Notify after hopping, default is false
fuzzy_cmd = "fzf", -- Fuzzy searching command, default is "fzf"
})
require("git"):setup({
-- Order of status signs showing in the linemode
order = 1500,
})

View File

@@ -12,7 +12,7 @@
programs.kitty = { programs.kitty = {
enable = true; enable = true;
font = { font = {
size = 8; size = 6;
name = "Fira Code"; name = "Fira Code";
package = pkgs.fira-code; package = pkgs.fira-code;
}; };

View File

@@ -7,5 +7,6 @@
signal-desktop signal-desktop
slack slack
telegram-desktop telegram-desktop
whatsie
]; ];
} }

View File

@@ -1,4 +1,4 @@
{ pkgs, inputs, ... }: { inputs, pkgs, ... }:
{ {
imports = [ imports = [
@@ -6,37 +6,39 @@
./plugins ./plugins
]; ];
home.sessionVariables.EDITOR = "nvim"; home.sessionVariables = {
EDITOR = "nvim";
};
programs.nixvim = { programs.nixvim = {
enable = true; enable = true;
defaultEditor = true; defaultEditor = true;
extraPackages = with pkgs; [
texlive.combined.scheme-full
# papis-nvim
];
nixpkgs.useGlobalPackages = false; nixpkgs.useGlobalPackages = false;
clipboard.providers.wl-copy.enable = true; clipboard = {
keymaps = [ providers = {
{ wl-copy.enable = true;
key = "Y"; };
action = ''"+y''; };
options.silent = true;
}
{
key = "P";
action = ''"+p'';
options.silent = true;
}
];
viAlias = true; viAlias = true;
vimAlias = true; vimAlias = true;
lualoader.enable = true; lualoader.enable = true;
extraPackages = with pkgs; [
texliveFull
texlivePackages.standalone
texlivePackages.relsize # needed for BA
# papis-nvim
];
extraConfigVim = ''
filetype plugin on
set nocompatible
syntax on
'';
globals = { globals = {
mapleader = " "; mapleader = " ";
maplocalleader = ","; maplocalleader = ",";

View File

@@ -1,45 +0,0 @@
{ ... }:
{
programs.nixvim = {
plugins = {
aerial = {
enable = true;
lazyLoad.settings.cmd = [
"AerialToggle"
"AerialNavToggle"
];
};
which-key.settings.spec = [
{
__unkeyed-1 = "<leader>a";
group = "Aerial";
icon = " ";
}
];
};
keymaps = [
{
key = "<leader>at";
action = "<cmd>AerialToggle<cr>";
options.desc = "Aerial tab";
}
{
key = "<leader>an";
action = "<cmd>AerialNavToggle<cr>";
options.desc = "Aerial navgation";
}
{
key = "<leader>a.";
action = "<cmd>AerialNext<cr>";
options.desc = "Aerial next";
}
{
key = "<leader>a,";
action = "<cmd>AerialPrev<cr>";
options.desc = "Aerial previous";
}
];
};
}

View File

@@ -1,10 +1,13 @@
{ ... }: { ... }:
{ {
programs.nixvim.plugins.nvim-autopairs = { programs.nixvim.plugins = {
enable = true; nvim-autopairs = {
autoLoad = true; enable = true;
settings = {
settings.check_ts = true; check_ts = true;
};
};
}; };
} }

View File

@@ -3,9 +3,9 @@
{ {
programs.nixvim = { programs.nixvim = {
plugins = { plugins = {
barbar.enable = true; barbar = {
autoLoad = true; enable = true;
};
which-key.settings.spec = [ which-key.settings.spec = [
{ {
__unkeyed-1 = "<leader>b"; __unkeyed-1 = "<leader>b";
@@ -22,49 +22,62 @@
} }
]; ];
}; };
keymaps = [ keymaps = [
{ {
action = "<CMD>BufferPrevious<CR>"; action = "<CMD>BufferPrevious<CR>";
key = "<leader>,"; key = "<leader>,";
mode = "n"; mode = "n";
options.desc = "Tab "; options = {
desc = "Tab ";
};
} }
{ {
action = "<CMD>BufferNext<CR>"; action = "<CMD>BufferNext<CR>";
key = "<leader>."; key = "<leader>.";
mode = "n"; mode = "n";
options.desc = "Tab "; options = {
desc = "Tab ";
};
} }
{ {
action = "<CMD>BufferMovePrevious<CR>"; action = "<CMD>BufferMovePrevious<CR>";
key = "<leader>b<"; key = "<leader>b<";
mode = "n"; mode = "n";
options.desc = "Re-Order "; options = {
desc = "Re-Order ";
};
} }
{ {
action = "<CMD>BufferMoveNext<CR>"; action = "<CMD>BufferMoveNext<CR>";
key = "<leader>b>"; key = "<leader>b>";
mode = "n"; mode = "n";
options.desc = "Re-Order "; options = {
desc = "Re-Order ";
};
} }
{ {
action = "<CMD>BufferClose<CR>"; action = "<CMD>BufferClose<CR>";
key = "<leader>bc"; key = "<leader>bc";
mode = "n"; mode = "n";
options.desc = "Close"; options = {
desc = "Close";
};
} }
{ {
action = "<CMD>tabnew +Telescope\\ yazi<CR>"; # TODO: does not work action = "<CMD>tabnew +Telescope\\ file_browser<CR>";
key = "<leader>bn"; key = "<leader>bn";
mode = "n"; mode = "n";
options.desc = "Create"; options = {
desc = "Create";
};
} }
{ {
action = "<CMD>BufferPick<CR>"; action = "<CMD>BufferPick<CR>";
key = "<leader>bp"; key = "<leader>bp";
mode = "n"; mode = "n";
options.desc = "Pick Tab"; options = {
desc = "Pick Tab";
};
} }
]; ];
}; };

View File

@@ -1,65 +1,68 @@
{ ... }: { ... }:
{ {
programs.nixvim.plugins.bullets = { programs.nixvim = {
enable = true; plugins = {
lazyLoad.settings.filetypes = [ "md" "txt" "gitcommit" ]; bullets = {
enable = true;
settings = { settings = {
enabled_file_types = [ enabled_file_types = [
"markdown" "markdown"
"text" "text"
"gitcommit" "gitcommit"
]; ];
set_mappings = 0; set_mappings = 0;
checkbox_markers = " -X"; checkbox_markers = " -X";
custom_mappings = [ custom_mappings = [
[ [
"nmap" "nmap"
"<leader>mn" "o"
"<Plug>(bullets-newline)" "<Plug>(bullets-newline)"
] ]
[ [
"vmap" "vmap"
"<leader>mr" "gN"
"<Plug>(bullets-renumber)" "<Plug>(bullets-renumber)"
] ]
[ [
"nmap" "nmap"
"<leader>mr" "gN"
"<Plug>(bullets-renumber)" "<Plug>(bullets-renumber)"
] ]
[ [
"imap" "imap"
"<C-t>" "<C-t>"
"<Plug>(bullets-demote)" "<Plug>(bullets-demote)"
] ]
[ [
"nmap" "nmap"
">>" ">>"
"<Plug>(bullets-demote)" "<Plug>(bullets-demote)"
] ]
[ [
"vmap" "vmap"
">" ">"
"<Plug>(bullets-demote)" "<Plug>(bullets-demote)"
] ]
[ [
"imap" "imap"
"<C-d>" "<C-d>"
"<Plug>(bullets-promote)" "<Plug>(bullets-promote)"
] ]
[ [
"nmap" "nmap"
"<<" "<<"
"<Plug>(bullets-promote)" "<Plug>(bullets-promote)"
] ]
[ [
"vmap" "vmap"
"<" "<"
"<Plug>(bullets-promote)" "<Plug>(bullets-promote)"
] ]
]; ];
};
};
}; };
}; };
} }

View File

@@ -1,70 +1,73 @@
{ ... }: { ... }:
{ {
programs.nixvim.plugins = { programs.nixvim = {
blink-cmp = { plugins = {
enable = true; blink-cmp = {
autoLoad = true; enable = true;
settings = {
settings = { keymap = {
keymap.preset = "default"; preset = "default";
snippets.preset = "luasnip"; };
snippets = {
completion.accept = { preset = "luasnip";
auto_brackets = { };
enabled = true; completion = {
kind_resolution.enabled = true; accept = {
auto_brackets = {
semantic_token_resolution = { enabled = true;
enabled = true; kind_resolution = {
timeout_ms = 400; enabled = true;
};
semantic_token_resolution = {
enabled = true;
timeout_ms = 400;
};
};
}; };
}; };
}; sources = {
per_filetype = {
sources = { yaml = [ "papis" ];
per_filetype.yaml = [ "papis" ];
providers = {
spell = {
module = "blink-cmp-spell";
name = "Spell";
score_offset = 100;
opts = { };
}; };
providers = {
vimtex = { spell = {
name = "vimtex"; module = "blink-cmp-spell";
module = "blink.compat.source"; name = "Spell";
}; score_offset = 100;
opts = { };
dap = { };
name = "dap"; vimtex = {
module = "blink.compat.source"; name = "vimtex";
}; module = "blink.compat.source";
};
mkdnflow = { dap = {
name = "mkdnflow"; name = "dap";
module = "blink.compat.source"; module = "blink.compat.source";
};
mkdnflow = {
name = "mkdnflow";
module = "blink.compat.source";
};
}; };
default = [
"lsp"
"mkdnflow"
"path"
"snippets"
# "dap"
"vimtex"
"buffer"
"spell"
];
}; };
default = [
"lsp"
"mkdnflow"
"path"
"snippets"
# "dap"
"vimtex"
"buffer"
"spell"
];
}; };
}; };
blink-cmp-spell.enable = true;
blink-compat.enable = true;
cmp-vimtex.enable = true;
# cmp-dap.enable = true;
}; };
blink-cmp-spell.enable = true;
blink-compat.enable = true;
cmp-vimtex.enable = true;
# cmp-dap.enable = true;
}; };
} }

View File

@@ -1,15 +0,0 @@
{ ... }:
{
programs.nixvim.plugins.colorizer = {
enable = true;
lazyLoad.settings.filetypes = [
"css"
"scss"
"less"
"sass"
"html"
"svg"
];
};
}

View File

@@ -5,9 +5,7 @@
plugins = { plugins = {
comment-box = { comment-box = {
enable = true; enable = true;
autoLoad = true;
}; };
which-key.settings.spec = [ which-key.settings.spec = [
{ {
__unkeyed-1 = "<leader>c"; __unkeyed-1 = "<leader>c";
@@ -16,32 +14,41 @@
} }
]; ];
}; };
keymaps = [ keymaps = [
{ {
key = "<leader>cb"; key = "<leader>cb";
action = "<Cmd>CBccbox<CR>"; action = "<Cmd>CBccbox<CR>";
options.desc = "Box Title"; options = {
desc = "Box Title";
};
} }
{ {
key = "<leader>ct"; key = "<leader>ct";
action = "<Cmd>CBllline<CR>"; action = "<Cmd>CBllline<CR>";
options.desc = "Titled Line"; options = {
desc = "Titled Line";
};
} }
{ {
key = "<leader>cl"; key = "<leader>cl";
action = "<Cmd>CBline<CR>"; action = "<Cmd>CBline<CR>";
options.desc = "Simple Line"; options = {
desc = "Simple Line";
};
} }
{ {
key = "<leader>cm"; key = "<leader>cm";
action = "<Cmd>CBllbox14<CR>"; action = "<Cmd>CBllbox14<CR>";
options.desc = "Marked"; options = {
desc = "Marked";
};
} }
{ {
key = "<leader>cd"; key = "<leader>cd";
action = "<Cmd>CBd<CR>"; action = "<Cmd>CBd<CR>";
options.desc = "Remove a Box"; options = {
desc = "Remove a Box";
};
} }
]; ];
}; };

View File

@@ -1,10 +1,16 @@
{ ... }: { ... }:
{ {
programs.nixvim.plugins.comment = { programs.nixvim = {
enable = true; plugins = {
autoLoad = true; comment = {
enable = true;
settings.mappings.basic = true; settings = {
mappings = {
basic = true;
};
};
};
};
}; };
} }

View File

@@ -21,13 +21,13 @@
programs.nixvim.plugins = { programs.nixvim.plugins = {
conform-nvim = { conform-nvim = {
enable = true; enable = true;
autoLoad = true;
settings = { settings = {
formatters_by_ft = { formatters_by_ft = {
lua = [ "stylua" ]; lua = [ "stylua" ];
rust = [ "rustfmt" ]; rust = [ "rustfmt" ];
python = [ "black" ]; python = [
"black"
];
haskell = [ "fourmolu" ]; haskell = [ "fourmolu" ];
terraform = [ "hcl" ]; terraform = [ "hcl" ];
elixir = [ "mix" ]; elixir = [ "mix" ];
@@ -47,7 +47,9 @@
yaml = [ "prettierd" ]; yaml = [ "prettierd" ];
nu = [ "topiary_nu" ]; nu = [ "topiary_nu" ];
nix = [ "nixfmt" ]; nix = [ "nixfmt" ];
tex = [ "tex-fmt" ]; tex = [
"tex-fmt"
];
"_" = [ "_" = [
"squeeze_blanks" "squeeze_blanks"
"trim_whitespace" "trim_whitespace"
@@ -92,7 +94,9 @@
"2" "2"
]; ];
}; };
tex-fmt.command = "tex-fmt"; tex-fmt = {
command = "tex-fmt";
};
}; };
}; };
}; };

View File

@@ -1,49 +0,0 @@
{ ... }:
{
programs.nixvim = {
plugins = {
csvview = {
enable = true;
lazyLoad.settings.cmd = [
"CsvViewEnable"
"CsvViewToggle"
];
settings = {
parser.async_chunksize = 30;
view = {
display_mode = "border";
spacing = 2;
};
};
};
which-key.settings.spec = [
{
__unkeyed-1 = "<leader>z";
group = "CSV";
icon = " ";
}
];
};
keymaps = [
{
key = "<leader>ze";
action = "<Cmd>CsvViewEnable<CR>";
options.desc = "Csv enable preview";
}
{
key = "<leader>zd";
action = "<Cmd>CsvViewDisable<CR>";
options.desc = "Csv disable preview";
}
{
key = "<leader>zt";
action = "<Cmd>CsvViewToggle<CR>";
options.desc = "Csv toggle preview";
}
];
};
}

View File

@@ -1,4 +1,4 @@
{ pkgs, ... }: { config, pkgs, ... }:
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
@@ -13,13 +13,10 @@
plugins = { plugins = {
dap-python = { dap-python = {
enable = true; enable = true;
autoLoad = true;
}; };
dap = { dap = {
enable = true; enable = true;
autoLoad = true;
luaConfig.post = '' luaConfig.post = ''
local dap, dapui = require("dap"), require("dapui") local dap, dapui = require("dap"), require("dapui")
dap.listeners.before.attach.dapui_config = function() dap.listeners.before.attach.dapui_config = function()
@@ -35,13 +32,11 @@
dapui.close() dapui.close()
end end
''; '';
adapters = { adapters = {
executables = { executables = {
lldb = { lldb = {
command = "${pkgs.lldb_19}/bin/lldb-dap"; command = "${pkgs.lldb_19}/bin/lldb-dap";
}; };
gdb = { gdb = {
command = "${pkgs.gdb}/bin/gdb"; command = "${pkgs.gdb}/bin/gdb";
args = [ args = [
@@ -50,7 +45,6 @@
"set print pretty on" "set print pretty on"
]; ];
}; };
rust-gdb = { rust-gdb = {
command = "${pkgs.rustc}/bin/rust-gdb"; command = "${pkgs.rustc}/bin/rust-gdb";
args = [ args = [
@@ -61,8 +55,9 @@
}; };
}; };
}; };
signs = {
signs.dapBreakpoint.text = ""; dapBreakpoint.text = "";
};
configurations = { configurations = {
cpp = [ cpp = [
{ {
@@ -109,7 +104,6 @@
cwd = "\${workspaceFolder}"; cwd = "\${workspaceFolder}";
} }
]; ];
c = [ c = [
{ {
name = "Launch file"; name = "Launch file";
@@ -142,7 +136,6 @@
args = { }; args = { };
} }
]; ];
rust = [ rust = [
{ {
name = "Launch"; name = "Launch";
@@ -189,17 +182,12 @@
]; ];
}; };
}; };
dap-ui = { dap-ui = {
enable = true; enable = true;
autoLoad = true;
}; };
dap-virtual-text = { dap-virtual-text = {
enable = true; enable = true;
autoLoad = true;
}; };
which-key.settings.spec = [ which-key.settings.spec = [
{ {
__unkeyed-1 = "<leader>d"; __unkeyed-1 = "<leader>d";
@@ -208,55 +196,70 @@
} }
]; ];
}; };
keymaps = [ keymaps = [
{ {
key = "<leader>dt"; key = "<leader>dt";
action.__raw = "function() require('dap').toggle_breakpoint() end"; action.__raw = "function() require('dap').toggle_breakpoint() end";
mode = [ "n" ]; mode = [ "n" ];
options.desc = "Toggle Breakpoint"; options = {
desc = "Toggle Breakpoint";
};
} }
{ {
key = "<leader>dc"; key = "<leader>dc";
action.__raw = "function() require('dap').continue() end"; action.__raw = "function() require('dap').continue() end";
mode = [ "n" ]; mode = [ "n" ];
options.desc = "Continue"; options = {
desc = "Continue";
};
} }
{ {
key = "<leader>dc"; key = "<leader>dc";
action.__raw = "function() require('dap').continue() end"; action.__raw = "function() require('dap').continue() end";
mode = [ "n" ]; mode = [ "n" ];
options.desc = "Continue"; options = {
desc = "Continue";
};
} }
{ {
key = "<leader>di"; key = "<leader>di";
action.__raw = "function() require('dap').step_into() end"; action.__raw = "function() require('dap').step_into() end";
mode = [ "n" ]; mode = [ "n" ];
options.desc = "Step Into"; options = {
desc = "Step Into";
};
} }
{ {
key = "<leader>do"; key = "<leader>do";
action.__raw = "function() require('dap').step_over() end"; action.__raw = "function() require('dap').step_over() end";
mode = [ "n" ]; mode = [ "n" ];
options.desc = "Step Over"; options = {
desc = "Step Over";
};
} }
{ {
key = "<leader>du"; key = "<leader>du";
action.__raw = "function() require('dap').step_out() end"; action.__raw = "function() require('dap').step_out() end";
mode = [ "n" ]; mode = [ "n" ];
options.desc = "Step Out"; options = {
desc = "Step Out";
};
} }
{ {
key = "<leader>dr"; key = "<leader>dr";
action.__raw = "function() require('dap').repl.open() end"; action.__raw = "function() require('dap').repl.open() end";
mode = [ "n" ]; mode = [ "n" ];
options.desc = "Open REPL"; options = {
desc = "Open REPL";
};
} }
{ {
key = "<leader>dl"; key = "<leader>dl";
action.__raw = "function() require('dap').run_last() end"; action.__raw = "function() require('dap').run_last() end";
mode = [ "n" ]; mode = [ "n" ];
options.desc = "Run Last"; options = {
desc = "Run Last";
};
} }
{ {
key = "<leader>dq"; key = "<leader>dq";
@@ -269,21 +272,27 @@
end end
''; '';
mode = [ "n" ]; mode = [ "n" ];
options.desc = "Terminate"; options = {
desc = "Terminate";
};
} }
{ {
key = "<leader>db"; key = "<leader>db";
action.__raw = "function() require('dap').list_breakpoints() end"; action.__raw = "function() require('dap').list_breakpoints() end";
mode = [ "n" ]; mode = [ "n" ];
options.desc = "List Breakpoints"; options = {
desc = "List Breakpoints";
};
} }
{ {
key = "<leader>de"; key = "<leader>de";
action.__raw = "function() require('dap').set_exception_breakpoints({ ' all ' }) end"; action.__raw = "function() require('dap').set_exception_breakpoints({ ' all ' }) end";
mode = [ "n" ]; mode = [ "n" ];
options.desc = "Set Exception Breakpoints"; options = {
desc = "Set Exception Breakpoints";
};
} }
]; ];
}; };
} }

View File

@@ -1,24 +1,23 @@
{ {
imports = [ imports = [
./aerial.nix
./autopairs.nix ./autopairs.nix
./barbar.nix ./barbar.nix
./bullets.nix ./bullets.nix
./cmp.nix ./cmp.nix
./colorizor.nix
./comment-box.nix ./comment-box.nix
./comment.nix ./comment.nix
./conform.nix ./conform.nix
./csvview.nix
./dap.nix ./dap.nix
./diffview.nix
./dynomark.nix ./dynomark.nix
./edgy.nix ./edgy.nix
./gitsigns.nix ./gitsigns.nix
./img-clip.nix ./haskell-tools.nix
./knap.nix ./knap.nix
./lualine.nix ./leap.nix
./lsp.nix ./lsp.nix
./lz-n.nix ./ltex-extra.nix
./lualine.nix
./markdown-preview.nix ./markdown-preview.nix
./mkdnflow.nix ./mkdnflow.nix
./neoscroll.nix ./neoscroll.nix
@@ -26,16 +25,18 @@
./noice.nix ./noice.nix
./notify.nix ./notify.nix
./oil.nix ./oil.nix
./openscad.nix
./otter.nix ./otter.nix
./papis.nix ./papis.nix
./rainbow.nix ./peek.nix
./render-markdown.nix ./markdown-preview.nix
./rustaceanvim.nix
./smart-splits.nix ./smart-splits.nix
./snippets.nix ./snippets.nix
./sniprun.nix ./sniprun.nix
./startup.nix ./startup.nix
./surround.nix ./surround.nix
./telescope.nix
./texpresso.nix
./todo-comments.nix ./todo-comments.nix
./toggleterm.nix ./toggleterm.nix
./treesitter.nix ./treesitter.nix
@@ -43,12 +44,10 @@
./typst-preview.nix ./typst-preview.nix
./typst-vim.nix ./typst-vim.nix
./undotree.nix ./undotree.nix
./unified.nix
./vimtex.nix ./vimtex.nix
./web-devicons.nix ./web-devicons.nix
./which-key.nix ./which-key.nix
./wilder.nix ./yanky.nix
./yazi.nix ./zk.nix
./yuck.nix
]; ];
} }

View File

@@ -0,0 +1,12 @@
{ pkgs, ... }:
{
programs.nixvim = {
plugins = {
diffview = {
enable = true;
};
};
};
}

View File

@@ -14,7 +14,11 @@ let
in in
{ {
programs.nixvim = { programs.nixvim = {
extraPlugins = [ dynomark-nvim ];
extraPlugins = [
dynomark-nvim
];
extraConfigLua = "require('dynomark').setup({})"; extraConfigLua = "require('dynomark').setup({})";
keymaps = [ keymaps = [
@@ -22,13 +26,17 @@ in
key = "<leader>v"; key = "<leader>v";
action = "<Plug>(DynomarkToggle)"; action = "<Plug>(DynomarkToggle)";
mode = [ "n" ]; mode = [ "n" ];
options.desc = "Toggle Dynomark"; options = {
desc = "Toggle Dynomark";
};
} }
{ {
key = "<leader>V"; key = "<leader>V";
action = "<Plug>(DynomarkRun)"; action = "<Plug>(DynomarkRun)";
mode = [ "n" ]; mode = [ "n" ];
options.desc = "Run Dynomark query under cursor"; options = {
desc = "Run Dynomark query under cursor";
};
} }
]; ];
}; };

View File

@@ -9,12 +9,10 @@
# To prevent this, set `splitkeep` to either `screen` or `topline`. # To prevent this, set `splitkeep` to either `screen` or `topline`.
splitkeep = "screen"; splitkeep = "screen";
}; };
plugins = { plugins = {
edgy = { edgy = {
enable = true; enable = true;
autoLoad = true; autoLoad = true;
settings = { settings = {
bottom.__raw = '' bottom.__raw = ''
{ {
@@ -39,7 +37,6 @@
} }
} }
''; '';
left.__raw = '' left.__raw = ''
{ {
-- Neo-tree filesystem always takes half the screen height -- Neo-tree filesystem always takes half the screen height
@@ -80,3 +77,4 @@
}; };
}; };
} }

View File

@@ -1,8 +1,11 @@
{ ... }: { ... }:
{ {
programs.nixvim.plugins.gitsigns = { programs.nixvim = {
enable = true; plugins = {
autoLoad = true; gitsigns = {
enable = true;
};
};
}; };
} }

View File

@@ -12,6 +12,8 @@
haskellPackages.ghci-dap haskellPackages.ghci-dap
]; ];
extraPlugins = with pkgs.vimPlugins; [ haskell-tools-nvim ]; extraPlugins = with pkgs.vimPlugins; [
haskell-tools-nvim
];
}; };
} }

View File

@@ -1,22 +0,0 @@
{ ... }:
{
programs.nixvim = {
plugins.img-clip = {
enable = true;
lazyLoad.settings.filetypes = [
"md"
"tex"
"typ"
];
};
keymaps = [
{
key = "<leader>p";
action = "<cmd>PasteImage<cr>";
options.desc = "Paste image";
}
];
};
}

View File

@@ -1,5 +1,6 @@
{ pkgs, ... }: { pkgs, ... }:
# TODO: Make filetype keybindings work
let let
keys = [ keys = [
{ {
@@ -10,7 +11,9 @@ let
"v" "v"
"i" "i"
]; ];
options.desc = "Close Viewer (knap)"; options = {
desc = "Close Viewer (knap)";
};
} }
{ {
action.__raw = "function() require('knap').toggle_autopreviewing() end"; action.__raw = "function() require('knap').toggle_autopreviewing() end";
@@ -20,7 +23,9 @@ let
"v" "v"
"i" "i"
]; ];
options.desc = "Toggle Auto-Processing (knap)"; options = {
desc = "Toggle Auto-Processing (knap)";
};
} }
{ {
action.__raw = "function() require('knap').forward_jump() end"; action.__raw = "function() require('knap').forward_jump() end";
@@ -30,7 +35,9 @@ let
"v" "v"
"i" "i"
]; ];
options.desc = "SyncTeX Forward Search (Knap)"; options = {
desc = "SyncTeX Forward Search (Knap)";
};
} }
]; ];
in in
@@ -40,18 +47,22 @@ in
texliveFull texliveFull
rubber rubber
]; ];
programs.nixvim = { programs.nixvim = {
extraPlugins = with pkgs.vimPlugins; [ knap ]; extraPlugins = with pkgs.vimPlugins; [ knap ];
globals.knap_settings = { globals = {
htmltohtmlviewerlaunch = "luakit %outputfile%"; knap_settings = {
mdtohtmlviewerlaunch = "luakit %outputfile%"; htmltohtmlviewerlaunch = "luakit %outputfile%";
markdowntohtmlviewerlaunch = "luakit %outputfile%"; mdtohtmlviewerlaunch = "luakit %outputfile%";
markdowntohtmlviewerlaunch = "luakit %outputfile%";
};
}; };
files = { files = {
"ftplugin/latex.lua".keymaps = keys; "ftplugin/latex.lua" = {
"ftplugin/markdown.lua".keymaps = keys; keymaps = keys;
};
"ftplugin/markdown.lua" = {
keymaps = keys;
};
}; };
}; };
} }

View File

@@ -0,0 +1,30 @@
{ ... }:
{
programs.nixvim = {
plugins = {
leap = {
enable = true;
settings = {
case_sensitive = false;
};
};
};
keymaps = [
{
key = "s";
action = "<Plug>(leap)";
mode = [
"n"
"x"
"o"
];
}
{
key = "S";
action = "<Plug>(leap-from-window)";
mode = [ "n" ];
}
];
};
}

View File

@@ -7,10 +7,7 @@
]; ];
programs.nixvim = { programs.nixvim = {
plugins.lsp = { plugins.lsp.enable = true;
enable = true;
autoLoad = true;
};
lsp = { lsp = {
luaConfig = { luaConfig = {
@@ -20,29 +17,65 @@
''; '';
}; };
servers = { servers = {
nixd.enable = false; nixd = {
rust_analyzer.enable = true; enable = false;
leanls.enable = true; };
rust_analyzer = {
enable = true;
};
leanls = {
enable = true;
};
nil_ls = { nil_ls = {
enable = !config.programs.nixvim.plugins.lsp.servers.nixd.enable; enable = !config.programs.nixvim.plugins.lsp.servers.nixd.enable;
config = { config = {
nil = { nil = {
formatting.command = [ "nixfmt" ]; formatting = {
diagnostics.ignored = [ ]; command = [
nix.flake.autoArchive = true; "nixfmt"
];
};
diagnostics = {
ignored = [ ];
};
nix = {
flake = {
autoArchive = true;
};
};
}; };
}; };
}; };
nushell.enable = true; nushell = {
pylsp.enable = true; enable = true;
pylyzer.enable = false; };
pyright.enable = true; pylsp = {
clangd.enable = true; enable = true;
zk.enable = true; };
elixirls.enable = true; pylyzer = {
marksman.enable = true; enable = false;
texlab.enable = true; };
lua_ls.enable = true; pyright = {
enable = true;
};
clangd = {
enable = true;
};
zk = {
enable = true;
};
elixirls = {
enable = true;
};
marksman = {
enable = true;
};
texlab = {
enable = true;
};
lua_ls = {
enable = true;
};
ltex_plus = { ltex_plus = {
enable = true; enable = true;
package = pkgs.ltex-ls-plus; package = pkgs.ltex-ls-plus;
@@ -60,7 +93,9 @@
}; };
}; };
}; };
tinymist.enable = true; tinymist = {
enable = true;
};
}; };
}; };
}; };

View File

@@ -0,0 +1,9 @@
{ ... }:
{
programs.nixvim.plugins = {
ltex-extra = {
enable = true;
};
};
}

View File

@@ -1,8 +1,48 @@
{ ... }: { ... }:
{ {
programs.nixvim.plugins.lualine = { programs.nixvim.plugins = {
enable = true; lualine = {
autoLoad = true; enable = true;
# settings = {
# sections = {
# lualine_c = [
# {
# __unkeyed-1 = {
# __raw = ''
# function()
# require("trouble").statusline({
# mode = "lsp_document_symbols",
# groups = {},
# title = false,
# filter = { range = true },
# format = "{kind_icon}{symbol.name:Normal}",
# -- The following line is needed to fix the background color
# -- Set it to the lualine section you want to use
# hl_group = "lualine_c_normal",
# }
# ).get
# end
# '';
# };
# cond = {
# __raw = ''
# require("trouble").statusline({
# mode = "lsp_document_symbols",
# groups = {},
# title = false,
# filter = { range = true },
# format = "{kind_icon}{symbol.name:Normal}",
# -- The following line is needed to fix the background color
# -- Set it to the lualine section you want to use
# hl_group = "lualine_c_normal",
# }).has
# '';
# };
# }
# ];
# };
# };
};
}; };
} }

View File

@@ -1,7 +0,0 @@
{ ... }:
{
programs.nixvim.plugins.lz-n = {
enable = true;
};
}

View File

@@ -1,8 +1,9 @@
{ ... }: { ... }:
{ {
programs.nixvim.plugins.markdown-preview = { programs.nixvim.plugins = {
enable = true; markdown-preview = {
lazyLoad.settings.filetypes = [ "md" ]; enable = true;
};
}; };
} }

View File

@@ -2,13 +2,13 @@
{ {
programs.nixvim = { programs.nixvim = {
extraConfigLua = ''vim.api.nvim_create_autocmd("FileType", {pattern = "markdown", command = "set awa"})''; extraConfigLua = ''
vim.api.nvim_create_autocmd("FileType", {pattern = "markdown", command = "set awa"})
'';
plugins = { plugins = {
mkdnflow = { mkdnflow = {
enable = true; enable = true;
lazyLoad.settings.filetypes = [ "md" ];
settings = { settings = {
links = { links = {
style = "wiki"; style = "wiki";
@@ -31,7 +31,6 @@
end end
''; '';
}; };
modules = { modules = {
conceal = true; conceal = true;
cursor = true; cursor = true;
@@ -43,12 +42,10 @@
tables = true; tables = true;
yaml = true; yaml = true;
}; };
filetypes = { filetypes = {
markdown = true; markdown = true;
qmd = true; qmd = true;
}; };
to_do = { to_do = {
symbols = [ symbols = [
" " " "
@@ -57,7 +54,6 @@
]; ];
status_propagation.up = true; status_propagation.up = true;
}; };
foldtext = { foldtext = {
title_transformer.__raw = '' title_transformer.__raw = ''
function() function()
@@ -108,7 +104,6 @@
middle = ""; middle = "";
}; };
}; };
mappings = { mappings = {
MkdnEnter = [ MkdnEnter = [
[ [
@@ -170,7 +165,6 @@
"<C-Space>" "<C-Space>"
]; ];
}; };
create_dirs = true; create_dirs = true;
new_file_template = { new_file_template = {
use_template = true; use_template = true;
@@ -179,14 +173,10 @@
date = "os_date"; date = "os_date";
}; };
template = '' template = ''
--- ---
title: {{ title }} title: {{ title }}
description:
published: true
date: {{ date }} date: {{ date }}
tags: private tags: []
editor: markdown
dateCreated: {{ date }}
--- ---
# {{ title }} # {{ title }}
''; '';

View File

@@ -4,8 +4,6 @@
programs.nixvim.plugins = { programs.nixvim.plugins = {
neoscroll = { neoscroll = {
enable = true; enable = true;
autoLoad = true;
settings = { settings = {
cursor_scrolls_alone = true; cursor_scrolls_alone = true;
easing_function = "quadratic"; easing_function = "quadratic";
@@ -24,6 +22,7 @@
respect_scrolloff = false; respect_scrolloff = false;
stop_eof = true; stop_eof = true;
}; };
}; };
}; };
} }

View File

@@ -1,10 +1,14 @@
{ ... }: { ... }:
{ {
programs.nixvim.plugins.neo-tree = { programs.nixvim = {
enable = true; plugins = {
autoLoad = true; neo-tree = {
enable = true;
settings.enable_git_status = true; settings = {
enable_git_status = true;
};
};
};
}; };
} }

View File

@@ -1,22 +1,21 @@
{ ... }: { ... }:
{ {
programs.nixvim.plugins.noice = { programs.nixvim.plugins = {
enable = true; noice = {
autoLoad = true; enable = true;
settings = {
settings = { lsp.override = {
lsp.override = { "vim.lsp.util.convert_input_to_markdown_lines" = true;
"vim.lsp.util.convert_input_to_markdown_lines" = true; "vim.lsp.util.stylize_markdown" = true;
"vim.lsp.util.stylize_markdown" = true; };
}; prests = {
bottom_search = true;
prests = { command_palette = true;
bottom_search = true; inc_rename = false;
command_palette = true; long_message_to_split = true;
inc_rename = false; lsp_doc_border = false;
long_message_to_split = true; };
lsp_doc_border = false;
}; };
}; };
}; };

View File

@@ -2,13 +2,16 @@
{ {
programs.nixvim = { programs.nixvim = {
plugins.notify = { plugins = {
enable = true; notify = {
autoLoad = true; enable = true;
settings = {
settings.render = "wrapped-compact"; render = "wrapped-compact";
};
};
};
opts = {
termguicolors = true;
}; };
opts.termguicolors = true;
}; };
} }

View File

@@ -1,8 +1,9 @@
{ ... }: { ... }:
{ {
programs.nixvim.plugins.oil = { programs.nixvim.plugins = {
enable = true; oil = {
autoLoad = true; enable = true;
};
}; };
} }

View File

@@ -3,8 +3,6 @@
{ {
programs.nixvim.plugins.openscad = { programs.nixvim.plugins.openscad = {
enable = true; enable = true;
lazyLoad.settings.filetype = [ "scad" ];
luaConfig.post = '' luaConfig.post = ''
vim.g.openscad_fuzzy_finder = 'skim' vim.g.openscad_fuzzy_finder = 'skim'
-- when the pdf_command is run, the last argument will be the pdf filename -- when the pdf_command is run, the last argument will be the pdf filename

View File

@@ -1,8 +1,9 @@
{ ... }: { ... }:
{ {
programs.nixvim.plugins.otter = { programs.nixvim.plugins = {
enable = true; otter = {
autoLoad = true; enable = true;
};
}; };
} }

View File

@@ -2,13 +2,15 @@
{ {
programs.nixvim = { programs.nixvim = {
plugins.papis = { plugins = {
enable = true; papis = {
autoLoad = true; enable = true;
settings = {
settings = { yq_bin = "${pkgs.yq-go}/bin/yq";
yq_bin = "${pkgs.yq-go}/bin/yq"; search = {
search.provider = "telescope"; provider = "telescope";
};
};
}; };
}; };
@@ -17,7 +19,9 @@
key = "<leader>pp"; key = "<leader>pp";
action = "<CMD>Papis search<CR>"; action = "<CMD>Papis search<CR>";
mode = [ "n" ]; mode = [ "n" ];
options.desc = "Papis"; options = {
desc = "Papis";
};
} }
]; ];
}; };

View File

@@ -0,0 +1,12 @@
{ ... }:
{
programs.nixvim.plugins = {
peek = {
enable = true;
settings = {
app = "firefox";
};
};
};
}

View File

@@ -1,77 +0,0 @@
{ ... }:
{
programs.nixvim.plugins.rainbow = {
enable = true;
autoLoad = true;
settings = {
active = 1;
conf = {
guifgs = [
"#f5c2e7"
"#eba0ac"
"#a6e3a1"
"#74c7ec"
"#f5e0dc"
"#cba6f7"
"#fab387"
"#94e2d5"
"#89b4fa"
"#f2cdcd"
"#f38ba8"
"#f9e2af"
"#89dceb"
"#b4befe"
];
operators = "_,_";
parentheses = [
"start=/(/ end=/)/ fold"
"start=/{/ end=/}/ fold"
"start=/\\[/ end=/\\]/ fold"
"start=/\\begin/ end=/\\end/ fold"
];
separately = {
"*".parentheses = [
"start=/(/ end=/)/ fold"
"start=/{/ end=/}/ fold"
"start=/\\[/ end=/\\]/ fold"
];
css = 0;
haskell.parentheses = [
"start=/(/ end=/)/ fold"
"start=/\[/ end=/\]/ fold"
"start=/\v\{\ze[^-]/ end=/}/ fold"
];
lisp.guifgs = [
"#f5c2e7"
"#eba0ac"
"#a6e3a1"
"#74c7ec"
"#f5e0dc"
"#cba6f7"
"#fab387"
"#94e2d5"
"#89b4fa"
"#f2cdcd"
"#f38ba8"
"#f9e2af"
"#89dceb"
"#b4befe"
];
markdown.parentheses_options = "containedin=markdownCode contained";
nerdtree = 0;
perl.syn_name_prefix = "perlBlockFoldRainbow";
stylus.parentheses = [ "start=/{/ end=/}/ fold contains=@colorableGroup" ];
tex.parentheses = [
"start=/(/ end=/)/ fold"
"start=/{/ end=/}/ fold"
"start=/\\[/ end=/\\]/ fold"
"start=/\\begin/ end=/\\end/ fold"
];
vim.parentheses_options = "containedin=vimFuncBody";
};
};
};
};
}

View File

@@ -3,44 +3,27 @@
{ {
home.packages = with pkgs; [ python312Packages.pylatexenc ]; home.packages = with pkgs; [ python312Packages.pylatexenc ];
programs.nixvim = { programs.nixvim.plugins = {
plugins = { render-markdown = {
render-markdown = { enable = true;
enable = true; settings = {
lazyLoad.settings.filetypes = [ "md" ]; ft = [
"markdown"
settings = { "quarto"
ft = [ "markdown" ]; ];
latex.enabled = false; latex = {
completions.lsp.enabled = true; enabled = false;
};
code = { completions = {
width = "block"; lsp = {
min_width = 45; enabled = true;
left_pad = 2;
language_pad = 2;
}; };
heading.icons = [ "󰎤 " "󰎧 " "󰎪 " "󰎭 " "󰎱 " "󰎳 " ];
}; };
}; };
which-key.settings.spec = [
{
__unkeyed-1 = "<leader>m";
group = "Markdown";
icon = " ";
}
];
}; };
keymaps = [ web-devicons = {
{ enable = true;
action = "<CMD>RenderMarkdown toggle<CR>"; };
key = "<leader>ms";
mode = "n";
options.desc = "Toggle markdown preview";
}
];
}; };
} }

View File

@@ -1,44 +0,0 @@
{ pkgs, ... }:
{
programs.nixvim = {
extraPackages = with pkgs; [ rust-analyzer ];
plugins.rustaceanvim = {
enable = true;
lazyload.settings.filetype = [ "rs" ];
};
files."ftplugin/rust.lua" = {
keymaps = [
{
action.__raw = ''
function()
vim.cmd.RustAnalyzer('codeAction')
end
'';
key = "<leader>a";
mode = [ "n" ];
options = {
desc = "Code action";
silent = true;
buffer.__raw = "vim.api.nvim_get_current_buf()";
};
}
{
action.__raw = ''
function()
vim.cmd.RustAnalyzer({'hover', 'actions'})
end
'';
key = "K";
mode = [ "n" ];
options = {
silent = true;
buffer.__raw = "vim.api.nvim_get_current_buf()";
};
}
];
};
};
}

View File

@@ -1,108 +1,104 @@
{ ... }: { ... }:
{ {
programs.nixvim = { programs.nixvim.plugins = {
plugins = { smart-splits = {
smart-splits = { enable = true;
enable = true;
autoLoad = true;
};
}; };
keymaps = [
{
action.__raw = "require('smart-splits').move_cursor_left";
key = "<C-S-p>h";
mode = "n";
}
{
action.__raw = "require('smart-splits').move_cursor_right";
key = "<C-S-p>l";
mode = "n";
}
{
action.__raw = "require('smart-splits').move_cursor_down";
key = "<C-S-p>j";
mode = "n";
}
{
action.__raw = "require('smart-splits').move_cursor_up";
key = "<C-S-p>k";
mode = "n";
}
{
action.__raw = "require('smart-splits').resize_left";
key = "<C-S-r>h";
mode = "n";
}
{
action.__raw = "require('smart-splits').resize_right";
key = "<C-S-r>l";
mode = "n";
}
{
action.__raw = "require('smart-splits').resize_down";
key = "<C-S-r>j";
mode = "n";
}
{
action.__raw = "require('smart-splits').resize_up";
key = "<C-S-r>k";
mode = "n";
}
{
action = "<CMD>silent !kitten @ launch --location=hsplit<CR>";
key = "<C-S-p>s";
mode = [
"n"
"v"
"i"
];
}
{
action = "<CMD>silent !kitten @ launch --location=vsplit<CR>";
key = "<C-S-p>v";
mode = [
"n"
"v"
"i"
];
}
{
action = "<CMD>silent !kitten @ launch --location=hsplit --cwd=current --bias=35<CR>";
key = "<C-S-p>p";
mode = [
"n"
"v"
"i"
];
}
{
action = "<CMD>silent !kitten @ close-window<CR>";
key = "<C-S-p>q";
mode = [
"n"
"v"
"i"
];
}
{
action = "<CMD>silent !kitten @ action layout_action rotate<CR>";
key = "<C-S-p>r";
mode = [
"n"
"v"
"i"
];
}
{
action = "<CMD>silent !kitten @ action toggle_layout stack<CR>";
key = "<C-S-p>f";
mode = [
"n"
"v"
"i"
];
}
];
}; };
programs.nixvim.keymaps = [
{
action.__raw = "require('smart-splits').move_cursor_left";
key = "<C-S-p>h";
mode = "n";
}
{
action.__raw = "require('smart-splits').move_cursor_right";
key = "<C-S-p>l";
mode = "n";
}
{
action.__raw = "require('smart-splits').move_cursor_down";
key = "<C-S-p>j";
mode = "n";
}
{
action.__raw = "require('smart-splits').move_cursor_up";
key = "<C-S-p>k";
mode = "n";
}
{
action.__raw = "require('smart-splits').resize_left";
key = "<C-S-r>h";
mode = "n";
}
{
action.__raw = "require('smart-splits').resize_right";
key = "<C-S-r>l";
mode = "n";
}
{
action.__raw = "require('smart-splits').resize_down";
key = "<C-S-r>j";
mode = "n";
}
{
action.__raw = "require('smart-splits').resize_up";
key = "<C-S-r>k";
mode = "n";
}
{
action = "<CMD>silent !kitten @ launch --location=hsplit<CR>";
key = "<C-S-p>s";
mode = [
"n"
"v"
"i"
];
}
{
action = "<CMD>silent !kitten @ launch --location=vsplit<CR>";
key = "<C-S-p>v";
mode = [
"n"
"v"
"i"
];
}
{
action = "<CMD>silent !kitten @ launch --location=hsplit --cwd=current --bias=35<CR>";
key = "<C-S-p>p";
mode = [
"n"
"v"
"i"
];
}
{
action = "<CMD>silent !kitten @ close-window<CR>";
key = "<C-S-p>q";
mode = [
"n"
"v"
"i"
];
}
{
action = "<CMD>silent !kitten @ action layout_action rotate<CR>";
key = "<C-S-p>r";
mode = [
"n"
"v"
"i"
];
}
{
action = "<CMD>silent !kitten @ action toggle_layout stack<CR>";
key = "<C-S-p>f";
mode = [
"n"
"v"
"i"
];
}
];
} }

View File

@@ -1,17 +1,15 @@
{ ... }: {...}:
{ {
programs.nixvim.plugins = { programs.nixvim.plugins = {
luasnip = { luasnip = {
enable = true; enable = true;
autoLoad = true;
fromVscode = [ { } ]; fromVscode = [ { } ];
}; };
friendly-snippets = { friendly-snippets = {
enable = true; enable = true;
lazyLoad.enable = false;
}; };
}; };
} }

View File

@@ -1,25 +1,26 @@
{ ... }: { ... }:
{ {
programs.nixvim.plugins.sniprun = { programs.nixvim = {
enable = true; plugins = {
autoLoad = true; sniprun = {
enable = true;
settings = { settings = {
display = [ "VirtualLine" ]; display = [ "VirtualLine" ];
snipruncolors = { snipruncolors = {
SniprunVirtualTextOk = { SniprunVirtualTextOk = {
bg = "#91d7e3"; bg = "#91d7e3";
fg = "#000000"; fg = "#000000";
ctermbg = "Cyan"; ctermbg = "Cyan";
ctermfg = "Black"; ctermfg = "Black";
}; };
SniprunVirtualTextErr = {
SniprunVirtualTextErr = { bg = "#ee99a0";
bg = "#ee99a0"; fg = "#000000";
fg = "#000000"; ctermbg = "DarkRed";
ctermbg = "DarkRed"; ctermfg = "Black";
ctermfg = "Black"; };
};
}; };
}; };
}; };

View File

@@ -1,69 +1,69 @@
{ ... }: { ... }:
{ {
programs.nixvim.plugins.startup = { programs.nixvim = {
enable = true; plugins = {
autoLoad = true; startup = {
enable = true;
settings = { settings = {
theme = "dashboard"; theme = "dashboard";
sections = { sections = {
body = { body = {
align = "center"; align = "center";
content = [ content = [
[ [
" Find File" " Find File"
"Telescope find_files" "Telescope find_files"
"<leader>ff" "<leader>ff"
] ]
[ [
"󰍉 Find Word" "󰍉 Find Word"
"Telescope live_grep" "Telescope live_grep"
"<leader>lg" "<leader>lg"
] ]
[ [
" Recent Files" " Recent Files"
"Telescope oldfiles" "Telescope oldfiles"
"<leader>of" "<leader>of"
] ]
[ [
" Yazi" " File Browser"
"Telescope file_browser" "Telescope file_browser"
"<leader>yf" "<leader>fb"
] ]
[ [
" Colorschemes" " Colorschemes"
"Telescope colorscheme" "Telescope colorscheme"
"<leader>cs" "<leader>cs"
] ]
[ [
" New File" " New File"
"lua require'startup'.new_file()" "lua require'startup'.new_file()"
"<leader>nf" "<leader>nf"
] ]
]; ];
defaultColor = "";
defaultColor = ""; foldSection = true;
foldSection = true; highlight = "String";
highlight = "String"; margin = 5;
margin = 5; oldfilesAmount = 0;
oldfilesAmount = 0; title = "Basic Commands";
title = "Basic Commands"; type = "mapping";
type = "mapping"; };
}; header = {
align = "center";
header = { content = {
align = "center"; __raw = "require('startup.headers').hydra_header";
content = { };
__raw = "require('startup.headers').hydra_header"; defaultColor = "";
foldSection = false;
highlight = "Statement";
margin = 5;
oldfilesAmount = 0;
title = "Header";
type = "text";
};
}; };
defaultColor = "";
foldSection = false;
highlight = "Statement";
margin = 5;
oldfilesAmount = 0;
title = "Header";
type = "text";
}; };
}; };
}; };

View File

@@ -1,172 +1,162 @@
{ ... }: { ... }:
{ {
programs.nixvim.plugins.nvim-surround = { programs.nixvim.plugins = {
enable = true; nvim-surround = {
autoLoad = true; enable = true;
luaConfig.post = # lua
''
local M = {}
luaConfig.post = '' M.get_input = function(prompt)
local M = {} local input = require("nvim-surround.input")
return input.get_input(prompt)
end
M.get_input = function(prompt) M.get_selection = function(args)
local input = require("nvim-surround.input") if args.char then
return input.get_input(prompt) return M.get_find(args.char)(args.char)
end elseif args.motion then
return require("nvim-surround.motions").get_selection(args.motion)
elseif args.node then
return require("nvim-surround.treesitter").get_selection(args.node)
elseif args.pattern then
return require("nvim-surround.patterns").get_selection(args.pattern)
elseif args.query then
return require("nvim-surround.queries").get_selection(args.query.capture, args.query.type)
else
vim.notify("Invalid key provided for `:h nvim-surround.config.get_selection()`.", vim.log.levels.ERROR)
end
end
M.get_selection = function(args) surrounds = {
if args.char then ["("] = {
return M.get_find(args.char)(args.char) add = { "( ", " )" },
elseif args.motion then find = function()
return require("nvim-surround.motions").get_selection(args.motion) return M.get_selection({ motion = "a(" })
elseif args.node then end,
return require("nvim-surround.treesitter").get_selection(args.node) delete = "^(. ?)().-( ?.)()$",
elseif args.pattern then },
return require("nvim-surround.patterns").get_selection(args.pattern) [")"] = {
elseif args.query then add = { "(", ")" },
return require("nvim-surround.queries").get_selection(args.query.capture, args.query.type) find = function()
else return M.get_selection({ motion = "a)" })
vim.notify("Invalid key provided for `:h nvim-surround.config.get_selection()`.", vim.log.levels.ERROR) end,
end delete = "^(.)().-(.)()$",
end },
["{"] = {
surrounds = { add = { "{ ", " }" },
["("] = { find = function()
add = { "( ", " )" }, return M.get_selection({ motion = "a{" })
find = function() end,
return M.get_selection({ motion = "a(" }) delete = "^(. ?)().-( ?.)()$",
end, },
delete = "^(. ?)().-( ?.)()$", ["}"] = {
}, add = { "{", "}" },
find = function()
[")"] = { return M.get_selection({ motion = "a}" })
add = { "(", ")" }, end,
find = function() delete = "^(.)().-(.)()$",
return M.get_selection({ motion = "a)" }) },
end, ["<"] = {
delete = "^(.)().-(.)()$", add = { "< ", " >" },
}, find = function()
return M.get_selection({ motion = "a<" })
["{"] = { end,
add = { "{ ", " }" }, delete = "^(. ?)().-( ?.)()$",
find = function() },
return M.get_selection({ motion = "a{" }) [">"] = {
end, add = { "<", ">" },
delete = "^(. ?)().-( ?.)()$", find = function()
}, return M.get_selection({ motion = "a>" })
end,
["}"] = { delete = "^(.)().-(.)()$",
add = { "{", "}" }, },
find = function() ["["] = {
return M.get_selection({ motion = "a}" }) add = { "[ ", " ]" },
end, find = function()
delete = "^(.)().-(.)()$", return M.get_selection({ motion = "a[" })
}, end,
delete = "^(. ?)().-( ?.)()$",
["<"] = { },
add = { "< ", " >" }, ["]"] = {
find = function() add = { "[", "]" },
return M.get_selection({ motion = "a<" }) find = function()
end, return M.get_selection({ motion = "a]" })
delete = "^(. ?)().-( ?.)()$", end,
}, delete = "^(.)().-(.)()$",
},
[">"] = { ["'"] = {
add = { "<", ">" }, add = { "'", "'" },
find = function() find = function()
return M.get_selection({ motion = "a>" }) return M.get_selection({ motion = "a'" })
end, end,
delete = "^(.)().-(.)()$", delete = "^(.)().-(.)()$",
}, },
['"'] = {
["["] = { add = { '"', '"' },
add = { "[ ", " ]" }, find = function()
find = function() return M.get_selection({ motion = 'a"' })
return M.get_selection({ motion = "a[" }) end,
end, delete = "^(.)().-(.)()$",
delete = "^(. ?)().-( ?.)()$", },
}, ["`"] = {
add = { "`", "`" },
["]"] = { find = function()
add = { "[", "]" }, return M.get_selection({ motion = "a`" })
find = function() end,
return M.get_selection({ motion = "a]" }) delete = "^(.)().-(.)()$",
end, },
delete = "^(.)().-(.)()$", ["i"] = {
}, add = function()
local left_delimiter = M.get_input("Enter the left delimiter: ")
["'"] = { local right_delimiter = left_delimiter and M.get_input("Enter the right delimiter: ")
add = { "'", "'" }, if right_delimiter then
find = function() return { { left_delimiter }, { right_delimiter } }
return M.get_selection({ motion = "a'" }) end
end, end,
delete = "^(.)().-(.)()$", find = function() end,
}, delete = function() end,
},
['"'] = { }
add = { '"', '"' }, '';
find = function() settings = {
return M.get_selection({ motion = 'a"' }) aliases = {
end, "a" = ">";
delete = "^(.)().-(.)()$", "b" = ")";
}, "B" = "}";
"r" = "]";
["`"] = { "q" = [
add = { "`", "`" }, "\""
find = function() "'"
return M.get_selection({ motion = "a`" }) "`"
end, ];
delete = "^(.)().-(.)()$", "Q" = "''";
}, "s" = [
"}"
["i"] = { "]"
add = function() ")"
local left_delimiter = M.get_input("Enter the left delimiter: ") ">"
local right_delimiter = left_delimiter and M.get_input("Enter the right delimiter: ") "\""
if right_delimiter then "'"
return { { left_delimiter }, { right_delimiter } } "`"
end ];
end, };
find = function() end, keymaps = {
delete = function() end, insert = "<C-g>s";
}, insert_line = "<C-g>S";
} normal = "ys";
''; normal_cur = "yss";
normal_line = "yS";
settings.aliases = { normal_cur_line = "ySS";
"a" = ">"; visual = "S";
"b" = ")"; visual_line = "gS";
"B" = "}"; delete = "ds";
"r" = "]"; # TODO: This keymap clashed with comment boxses
"q" = [ change = "cs";
"\"" change_line = "cS";
"'" };
"`" };
];
"Q" = "''";
"s" = [
"}"
"]"
")"
">"
"\""
"'"
"`"
];
};
keymaps = {
insert = "<C-g>s";
insert_line = "<C-g>S";
normal = "ys";
normal_cur = "yss";
normal_line = "yS";
normal_cur_line = "ySS";
visual = "S";
visual_line = "gS";
delete = "ds";
# TODO: This keymap clashed with comment boxses
change = "cs";
change_line = "cS";
}; };
}; };
} }

View File

@@ -0,0 +1,49 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
ripgrep
fd
];
programs.nixvim.plugins = {
telescope = {
enable = true;
extensions = {
fzf-native.enable = true;
ui-select.enable = true;
undo.enable = true;
file-browser = {
enable = true;
settings = {
hijack_netrw = true;
};
};
};
keymaps = {
"<leader>ff" = {
action = "find_files";
options.desc = "List Files";
};
"<leader>fb" = {
action = "file_browser path=%:p:h select_buffer=true";
options.desc = "File Browser";
};
"<leader>fs" = {
action = "buffers";
options.desc = "List Open Buffers";
};
"<leader>fu" = {
action = "undo";
options.desc = "Undo Tree";
};
};
};
which-key.settings.spec = [
{
__unkeyed-1 = "<leader>f";
group = "Telescope";
icon = "󰭎 ";
}
];
};
}

View File

@@ -0,0 +1,30 @@
{ ... }:
# TODO: Make filetype keybindings work
{
programs.nixvim = {
plugins = {
texpresso = {
enable = false;
};
};
files = {
"ftplugin/latex.lua" = {
keymaps = [
{
action = "<CMD>Texpresso %<CR>";
key = "<C-k>t";
mode = [
"n"
"v"
"i"
];
options = {
desc = "Start Texpresso";
};
}
];
};
};
};
}

View File

@@ -4,47 +4,38 @@
programs.nixvim.plugins = { programs.nixvim.plugins = {
todo-comments = { todo-comments = {
enable = true; enable = true;
autoLoad = true;
settings = { settings = {
highlight = { highlight = {
comments_only = false; comments_only = false;
}; };
colors = { colors = {
default = [ default = [
"Identifier" "Identifier"
"#7C3AED" "#7C3AED"
]; ];
error = [ error = [
"DiagnosticError" "DiagnosticError"
"ErrorMsg" "ErrorMsg"
"#DC2626" "#DC2626"
]; ];
hint = [ hint = [
"DiagnosticHint" "DiagnosticHint"
"#10B981" "#10B981"
]; ];
info = [ info = [
"DiagnosticInfo" "DiagnosticInfo"
"#2563EB" "#2563EB"
]; ];
test = [ test = [
"Identifier" "Identifier"
"#FF00FF" "#FF00FF"
]; ];
warning = [ warning = [
"DiagnosticWarn" "DiagnosticWarn"
"WarningMsg" "WarningMsg"
"#FBBF24" "#FBBF24"
]; ];
}; };
keywords = { keywords = {
FIX = { FIX = {
alt = [ alt = [
@@ -56,12 +47,10 @@
color = "error"; color = "error";
icon = " "; icon = " ";
}; };
HACK = { HACK = {
color = "warning"; color = "warning";
icon = " "; icon = " ";
}; };
NOTE = { NOTE = {
alt = [ alt = [
"INFO" "INFO"
@@ -69,7 +58,6 @@
color = "hint"; color = "hint";
icon = " "; icon = " ";
}; };
PERF = { PERF = {
alt = [ alt = [
"OPTIM" "OPTIM"
@@ -78,7 +66,6 @@
]; ];
icon = " "; icon = " ";
}; };
TEST = { TEST = {
alt = [ alt = [
"TESTING" "TESTING"
@@ -88,12 +75,10 @@
color = "test"; color = "test";
icon = " "; icon = " ";
}; };
TODO = { TODO = {
color = "info"; color = "info";
icon = " "; icon = " ";
}; };
WARN = { WARN = {
alt = [ alt = [
"WARNING" "WARNING"

View File

@@ -5,46 +5,38 @@
plugins = { plugins = {
toggleterm = { toggleterm = {
enable = true; enable = true;
lazyLoad.settings.cmd = [
"ToggleTermSendCurrentLine"
"ToggleTermSendVisualLines"
"ToggleTermSendVisualSelection"
];
settings = { settings = {
open_mapping.__raw = "[[<c-,>]]"; open_mapping.__raw = "[[<c-,>]]";
insert_mappings = true; insert_mappings = true;
shade_terminals = false; shade_terminals = false;
}; };
}; };
which-key.settings.spec = [
{
__unkeyed-1 = "<leader>s";
group = "Terminal";
icon = " ";
}
];
}; };
keymaps = [ keymaps = [
{ {
action = "<CMD>ToggleTermSendCurrentLine<CR>"; action = "<CMD>ToggleTermSendCurrentLine<CR>";
key = "<leader>sl"; key = "<leader>sts";
mode = "n"; mode = "n";
options.desc = "Send Current Line"; options = {
desc = "Send Current Line";
};
} }
{ {
action = "<CMD>ToggleTermSendVisualLines<CR>"; action = "<CMD>ToggleTermSendVisualLines<CR>";
key = "<leader>sv"; key = "<leader>stv";
mode = "x"; mode = "x";
options.desc = "Send all the (whole) lines in selection"; options = {
desc = "Send all the (whole) lines in selection";
};
} }
{ {
action = "<CMD>ToggleTermSendVisualSelection<CR>"; action = "<CMD>ToggleTermSendVisualSelection<CR>";
key = "<leader>ss"; key = "<leader>sts";
mode = "x"; mode = "x";
options.desc = "Send selection"; options = {
desc = "Send selection";
};
} }
]; ];
}; };

View File

@@ -4,8 +4,6 @@
programs.nixvim.plugins = { programs.nixvim.plugins = {
treesitter = { treesitter = {
enable = true; enable = true;
autoLoad = true;
folding.enable = false; folding.enable = false;
settings = { settings = {
auto_install = false; auto_install = false;
@@ -15,7 +13,6 @@
ts-context-commentstring = { ts-context-commentstring = {
enable = true; enable = true;
lazyLoad.enable = false;
}; };
}; };
} }

View File

@@ -5,8 +5,6 @@
plugins = { plugins = {
trouble = { trouble = {
enable = true; enable = true;
lazyLoad.settings.cmd = "Trouble";
settings = { settings = {
modes = { modes = {
diagnostics = { diagnostics = {
@@ -16,7 +14,9 @@
# Diagnostics for the current buffer only # Diagnostics for the current buffer only
diagnostics_buffer = { diagnostics_buffer = {
mode = "diagnostics"; mode = "diagnostics";
filter.buf = 0; filter = {
buf = 0;
};
}; };
}; };
focus = false; focus = false;

View File

@@ -2,29 +2,37 @@
{ {
programs.nixvim = { programs.nixvim = {
plugins.typst-preview = { plugins = {
enable = true; typst-preview = {
lazyLoad = { enable = true;
lazyLoad = {
settings = {
ft = "typst";
cmd = "TypstPreview";
};
};
settings = { settings = {
ft = [ "typst" ]; open_command = "qutebrowser --target tab %s";
cmd = "TypstPreview";
}; };
}; };
settings.open_command = "qutebrowser --target tab %s";
}; };
files = {
files."ftplugin/typst.lua".keymaps = [ "ftplugin/typst.lua" = {
{ keymaps = [
action = "<CMD>TypstPreview<CR>"; {
key = "<C-k>t"; action = "<CMD>TypstPreview<CR>";
mode = [ key = "<C-k>t";
"n" mode = [
"v" "n"
"i" "v"
"i"
];
options = {
desc = "Typst Preview";
};
}
]; ];
options.desc = "Typst Preview"; };
} };
];
}; };
} }

View File

@@ -1,15 +1,17 @@
{ ... }: { ... }:
# TODO: conceal does not work # TODO: coneal does not work
{ {
programs.nixvim.plugins.typst-vim = { programs.nixvim = {
enable = true; plugins = {
lazyLoad.settings.filetypes = [ "typst" ]; typst-vim = {
enable = true;
settings = { settings = {
conceal = 1; conceal = 1;
conceal_math = 1; conceal_math = 1;
conceal_emoji = 1; conceal_emoji = 1;
};
};
}; };
}; };
} }

View File

@@ -5,38 +5,7 @@
plugins = { plugins = {
undotree = { undotree = {
enable = true; enable = true;
lazyLoad.settings.cmd = "UndotreeShow";
}; };
which-key.settings.spec = [
{
__unkeyed-1 = "<leader>t";
group = "Undotree";
icon = " ";
}
];
}; };
keymaps = [
{
key = "<leader>th";
action = "<cmd>UndotreeHide<cr>";
options.desc = "Hide undotree";
}
{
key = "<leader>tf";
action = "<cmd>UndotreeFocus<cr>";
options.desc = "Focus undotree";
}
{
key = "<leader>tp";
action = "<cmd>UndotreePersistUndo<cr>";
options.desc = "Persist undo";
}
{
key = "<leader>ts";
action = "<cmd>UndotreeShow<cr>";
options.desc = "Show undotree";
}
];
}; };
} }

View File

@@ -1,33 +0,0 @@
{ ... }:
{
programs.nixvim = {
plugins = {
unified = {
enable = true;
lazyLoad.settings.cmd = "Unified";
};
which-key.settings.spec = [
{
__unkeyed-1 = "<leader>u";
group = "Unified";
icon = " ";
}
];
};
keymaps = [
{
key = "<leader>us";
action = "<cmd>Unified<cr>";
options.desc = "Start Unified";
}
{
key = "<leader>uq";
action = "<cmd>Unified reset<cr><cmd>Unified reset<cr>";
options.desc = "Stop Unified";
}
];
};
}

View File

@@ -1,45 +1,17 @@
{ pkgs,... }: { ... }:
{ {
programs.nixvim = { programs.nixvim = {
extraPackages = with pkgs; [
texliveFull
texlivePackages.standalone
texlivePackages.relsize # needed for BA
# papis-nvim
];
plugins = { plugins = {
vimtex = { vimtex = {
enable = true; enable = true;
lazyLoad.settings.filetype = [ "tex" ];
settings = { settings = {
view_automatic = false; view_automatic = false;
mappings_disable = { mappings_disable = {
"n" = [ "K" ]; "n" = [ "K" ];
}; };
view_method = "zathura";
}; };
}; };
ltex-extra = {
enable = true;
lazyLoad.settings.filetype = [ "tex" ];
};
texpresso = {
enable = true;
lazyload.settings.filetype = [ "tex" ];
};
which-key.settings.spec = [
{
__unkeyed-1 = "<leader>v";
group = "Vimtex";
icon = " ";
}
];
}; };
autoGroups = { autoGroups = {
@@ -64,36 +36,5 @@
''; '';
} }
]; ];
keymaps = [
{
key = "<leader>vc";
action = "<cmd>VimtexCompile<cr>";
options.desc = "Start Vimtex";
}
{
key = "<leader>vs";
action = "<cmd>VimtexStop<cr>";
options.desc = "Stop Vimtex";
}
{
key = "<leader>vr";
action = "<cmd>VimtexClean<cr>";
options.desc = "Clean Vimtex";
}
];
files."ftplugin/latex.lua".keymaps = [
{
action = "<CMD>Texpresso %<CR>";
key = "<C-k>t";
mode = [
"n"
"v"
"i"
];
options.desc = "Start Texpresso";
}
];
}; };
} }

View File

@@ -1,8 +1,9 @@
{ ... }: { ... }:
{ {
programs.nixvim.plugins.web-devicons = { programs.nixvim = {
enable = true; plugins = {
autoLoad = true; web-devicons.enable = true;
};
}; };
} }

View File

@@ -1,8 +1,9 @@
{ ... }: { ... }:
{ {
programs.nixvim.plugins.which-key = { programs.nixvim.plugins = {
enable = true; which-key = {
autoLoad = true; enable = true;
};
}; };
} }

View File

@@ -1,48 +0,0 @@
{ ... }:
{
programs.nixvim.plugins.wilder = {
enable = true;
autoLoad = true;
settings.modes = [
":"
"/"
"?"
];
# Configure the wilder engine
options = {
pipeline.__raw = ''
wilder.branch(
wilder.cmdline_pipeline({
fuzzy = 1,
set_device = 1,
}),
wilder.vim_search_pipeline()
)
'';
renderer.__raw = ''
wilder.popupmenu_renderer(
wilder.popupmenu_border_theme({
highlighter = wilder.basic_highlighter(),
highlights = {
accent = "WilderAccent",
},
border = "rounded",
left = { " ", wilder.popupmenu_devicons() },
right = { " ", wilder.popupmenu_scrollbar() },
})
)
'';
};
};
# Define the custom highlight group for the accent color
programs.nixvim.highlight = {
WilderAccent = {
fg = "#f5c2e7";
bold = true;
};
};
}

View File

@@ -0,0 +1,69 @@
{ ... }:
{
programs.nixvim = {
plugins = {
yanky = {
enable = true;
settings = {
ring = {
storage = "sqlite";
};
};
};
sqlite-lua = {
enable = true;
};
};
keymaps = [
{
key = "p";
action = "<Plug>(YankyPutAfter)";
mode = [
"n"
"x"
];
}
{
key = "P";
action = "<Plug>(YankyPutBefore)";
mode = [
"n"
"x"
];
}
{
key = "gp";
action = "<Plug>(YankyGPutAfter)";
mode = [
"n"
"x"
];
}
{
key = "gP";
action = "<Plug>(YankyGPutBefore)";
mode = [
"n"
"x"
];
}
{
key = "<c-p>";
action = "<Plug>(YankyPreviousEntry)";
mode = [
"n"
];
}
{
key = "<c-n>";
action = "<Plug>(YankyNextEntry)";
mode = [
"n"
];
}
];
};
}

View File

@@ -1,37 +0,0 @@
{ ... }:
{
programs.nixvim = {
plugins = {
yazi = {
enable = true;
autoLoad = true;
};
which-key.settings.spec = [
{
__unkeyed-1 = "<leader>y";
group = "Yazi";
icon = " ";
}
];
};
keymaps = [
{
key = "<leader>yf";
action = "<cmd>Yazi<cr>";
options.desc = "Open yazi at the current file";
}
{
key = "<leader>yw";
action = "<cmd>Yazi cwd<cr>";
options.desc = "Open yazi at the current working directory";
}
{
key = "<leader>yl";
action = "<cmd>Yazi toggle<cr>";
options.desc = "Resume the last session";
}
];
};
}

View File

@@ -1,8 +0,0 @@
{ ... }:
{
programs.nixvim.plugins.yuck = {
enable = true;
lazyLoad.settings.filetypes = [ "yuck" ];
};
}

View File

@@ -0,0 +1,95 @@
{ ... }:
{
programs.nixvim = {
plugins = {
zk = {
enable = true;
settings = {
picker = "telescope";
};
};
which-key.settings.spec = [
{
__unkeyed-1 = "<leader>z";
group = "Zettelkasten";
icon = "󰝰 ";
}
];
};
keymaps = [
{
key = "<leader>zn";
action = "<Cmd>ZkNew { title = vim.fn.input('Title: ') }<CR>";
mode = [ "n" ];
options = {
desc = "Create";
};
}
{
key = "<leader>zo";
action = "<Cmd>ZkNotes { sort = { 'modified' } }<CR>";
mode = [ "n" ];
options = {
desc = "Open";
};
}
{
key = "<leader>zt";
action = "<Cmd>ZkTags<CR>";
mode = [ "n" ];
options = {
desc = "Open Tags";
};
}
{
key = "<leader>zf";
action = "<Cmd>ZkNotes { sort = { 'modified' }, match = { vim.fn.input('Search: ') } }<CR>";
mode = [ "n" ];
options = {
desc = "Search";
};
}
{
key = "<leader>zf";
action = ":'<,'>ZkMatch<CR>";
mode = [ "v" ];
options = {
desc = "Search (Matching the Selection)";
};
}
];
files = {
# TODO: Add descriptions
# TODO: Did the sytnax change?
"ftplugin/markdown.lua" = {
extraConfigLua = # lua
''
-- Add the key mappings only for Markdown files in a zk notebook.
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 }
-- 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)
-- Open notes linked by the current buffer.
map("n", "<leader>zl", "<Cmd>ZkLinks<CR>", opts)
-- Preview a linked note.
map("n", "K", "<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)
end
'';
};
};
};
}

0
home/programs/taskwarrior/hooks/on-add.sh Normal file → Executable file
View File

43
home/programs/zk.nix Normal file
View File

@@ -0,0 +1,43 @@
{ ... }:
{
programs.zk = {
enable = true;
settings = {
note.template = "default.md";
format.markdow = {
hashtags = true;
colon-tags = false;
multiword-tags = false;
};
tool.fzf-preview = "bat -p --color always {-1}";
notebook = {
dir = "~/Nextcloud/zettelkasten";
};
alias = {
n = "zk new inbox/$@";
i = "zk edit -x inbox,journals -i";
ls = "zk list -x inbox,journals $@";
ed = "zk edit -x inbox,journals $@";
rm = ''zk list --interactive --quiet --format "{{abs-path}}" --delimiter0 $@ | xargs -0 rm -vf --'';
recent = "zk edit --sort created- --created-after 'last two weeks' --interactive";
inbox = "zk edit -t inbox --interactive";
};
};
};
home.file = {
"/Nextcloud/zettelkasten/.zk/templates/default.md" = {
text = ''
---
title: {{ title }}
date: {{format-date now "long"}}
tags: [inbox]
---
# {{ title }}
{{ content }}
'';
};
};
}

View File

@@ -2,6 +2,7 @@
{ {
imports = [ imports = [
./emanote.nix
./flameshot.nix ./flameshot.nix
./fnott.nix ./fnott.nix
./gpg-agent.nix ./gpg-agent.nix

23
home/services/emanote.nix Normal file
View File

@@ -0,0 +1,23 @@
{ config, ... }:
let
emanote = import (
builtins.fetchTarball {
url = "https://github.com/srid/emanote/archive/master.tar.gz";
sha256 = "0kr8bbq1awg2c2ra1mwjxqa9m7is9b6cdksvh48g4w354h5pqbnv";
}
);
in
{
imports = [ emanote.homeManagerModule ];
services.emanote = {
enable = true;
# host = "127.0.0.1"; # default listen address is 127.0.0.1
# port = 7000; # default http port is 7000
notes = [
"/home/elias/Nextcloud/zettelkasten"
];
# TODO: currentSystem
package = emanote.packages."x86_64-linux".default;
};
}