feat: add nvf config
This commit is contained in:
parent
9e46058abb
commit
898d56ebd6
24 changed files with 3367 additions and 95 deletions
2306
flake.lock
generated
2306
flake.lock
generated
File diff suppressed because it is too large
Load diff
|
|
@ -36,12 +36,18 @@
|
|||
url = "github:KZDKM/Hyprspace";
|
||||
inputs.hyprland.follows = "hyprland";
|
||||
};
|
||||
|
||||
nvf = {
|
||||
url = "github:notashelf/nvf";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs =
|
||||
{
|
||||
nixpkgs,
|
||||
nix-index-database,
|
||||
nvf,
|
||||
...
|
||||
}@inputs:
|
||||
let
|
||||
|
|
@ -61,6 +67,7 @@
|
|||
nixosConfigurations = {
|
||||
dn-pre7780 = nixpkgs.lib.nixosSystem {
|
||||
modules = [
|
||||
nvf.nixosModules.default
|
||||
nix-index-database.nixosModules.nix-index
|
||||
./system/dev/dn-pre7780
|
||||
];
|
||||
|
|
|
|||
|
|
@ -1,11 +1,14 @@
|
|||
{ nix-version, username, ... }:
|
||||
|
||||
{
|
||||
imports = [ ./user ];
|
||||
home.username = username;
|
||||
home.homeDirectory = "/home/${username}";
|
||||
|
||||
home.stateVersion = nix-version;
|
||||
nix-version,
|
||||
username,
|
||||
...
|
||||
}: {
|
||||
imports = [./user];
|
||||
home = {
|
||||
inherit username;
|
||||
homeDirectory = "/home/${username}";
|
||||
stateVersion = nix-version;
|
||||
};
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
{ ... }:
|
||||
let
|
||||
configDir = ../config;
|
||||
in
|
||||
{
|
||||
in {
|
||||
home.file = {
|
||||
".config/wallpapers".source = "${configDir}/wallpapers";
|
||||
".config/kitty".source = "${configDir}/kitty";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
{ inputs, ... }:
|
||||
{
|
||||
{inputs, ...}: {
|
||||
imports = [
|
||||
./git.nix
|
||||
./gtk.nix
|
||||
|
|
@ -11,15 +10,15 @@
|
|||
./virtualization.nix
|
||||
./hyprland.nix
|
||||
./swaync.nix
|
||||
./neovim.nix
|
||||
./desktop.nix
|
||||
./neovim.nix
|
||||
inputs.hyprland.homeManagerModules.default
|
||||
];
|
||||
|
||||
nixpkgs = {
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
allowUnfreePredicate = (_: true);
|
||||
allowUnfreePredicate = _: true;
|
||||
|
||||
permittedInsecurePackages = [
|
||||
"electron-25.9.0" # Obsidian
|
||||
|
|
|
|||
|
|
@ -1,10 +1,12 @@
|
|||
{ pkgs, xcursor-size, ... }:
|
||||
let
|
||||
{
|
||||
pkgs,
|
||||
xcursor-size,
|
||||
...
|
||||
}: let
|
||||
cursorName = "catppuccin-macchiato-lavender-cursors";
|
||||
themeName = "catppuccin-macchiato-lavender-compact";
|
||||
cursorSize = pkgs.lib.strings.toInt xcursor-size;
|
||||
in
|
||||
{
|
||||
in {
|
||||
gtk = {
|
||||
enable = true;
|
||||
|
||||
|
|
@ -17,7 +19,7 @@ in
|
|||
theme = {
|
||||
name = themeName;
|
||||
package = pkgs.catppuccin-gtk.override {
|
||||
accents = [ "lavender" ];
|
||||
accents = ["lavender"];
|
||||
size = "compact";
|
||||
variant = "macchiato";
|
||||
};
|
||||
|
|
@ -59,9 +61,7 @@ in
|
|||
};
|
||||
|
||||
xdg.configFile = {
|
||||
"Kvantum/Catppuccin-Macchiato-Lavender/Catppuccin-Macchiato-Blue/Catppuccin-Macchiato-Blue.kvconfig".source =
|
||||
"${pkgs.catppuccin-kvantum}/share/Kvantum/Catppuccin-Macchiato-Lavender/Cattpuccin-Macchiato-Blue.kvconfig";
|
||||
"Kvantum/Catppuccin-Macchiato-Lavender/Catppuccin-Macchiato-Blue/Catppuccin-Macchiato-Blue.svg".source =
|
||||
"${pkgs.catppuccin-kvantum}/share/Kvantum/Catppuccin-Macchiato-Lavender/Cattpuccin-Macchiato-Blue.svg";
|
||||
"Kvantum/Catppuccin-Macchiato-Lavender/Catppuccin-Macchiato-Blue/Catppuccin-Macchiato-Blue.kvconfig".source = "${pkgs.catppuccin-kvantum}/share/Kvantum/Catppuccin-Macchiato-Lavender/Cattpuccin-Macchiato-Blue.kvconfig";
|
||||
"Kvantum/Catppuccin-Macchiato-Lavender/Catppuccin-Macchiato-Blue/Catppuccin-Macchiato-Blue.svg".source = "${pkgs.catppuccin-kvantum}/share/Kvantum/Catppuccin-Macchiato-Lavender/Cattpuccin-Macchiato-Blue.svg";
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@
|
|||
|
||||
# Steam
|
||||
"workspace: 5 silent, class: ^(steam)$"
|
||||
"workspace: unset, class: ^(steam)$, floating: 1"
|
||||
|
||||
# Line
|
||||
"workspace: 2, initialTitle: ^(LINE)$"
|
||||
|
|
|
|||
|
|
@ -7,9 +7,7 @@
|
|||
xcursor-size,
|
||||
nvidia-offload-enabled,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
}: let
|
||||
terminal = "ghostty";
|
||||
startScript = import ./hypr/exec.nix {
|
||||
inherit
|
||||
|
|
@ -32,8 +30,7 @@ let
|
|||
song_info=$(playerctl metadata --format '{{title}} {{artist}}')
|
||||
echo "$song_info"
|
||||
'';
|
||||
in
|
||||
{
|
||||
in {
|
||||
home.packages = with pkgs; [
|
||||
hyprpaper
|
||||
hyprcursor
|
||||
|
|
@ -55,14 +52,14 @@ in
|
|||
hyprexpo
|
||||
hyprwinwrap
|
||||
])
|
||||
++ ([
|
||||
++ [
|
||||
inputs.hyprgrass.packages.${system}.default
|
||||
]);
|
||||
];
|
||||
|
||||
settings =
|
||||
{
|
||||
bind = import ./hypr/bind.nix { inherit mainMod nvidia-offload-enabled; };
|
||||
bindm = import ./hypr/bindm.nix { inherit mainMod; };
|
||||
bind = import ./hypr/bind.nix {inherit mainMod nvidia-offload-enabled;};
|
||||
bindm = import ./hypr/bindm.nix {inherit mainMod;};
|
||||
monitor = import ./hypr/monitor.nix;
|
||||
plugin = plugins;
|
||||
exec-once = ''${startScript}'';
|
||||
|
|
@ -83,8 +80,8 @@ in
|
|||
services.hyprpaper = {
|
||||
enable = true;
|
||||
settings = {
|
||||
preload = [ "~/.config/wallpapers/wall.png" ];
|
||||
wallpaper = [ ", ~/.config/wallpapers/wall.png" ];
|
||||
preload = ["~/.config/wallpapers/wall.png"];
|
||||
wallpaper = [", ~/.config/wallpapers/wall.png"];
|
||||
splash = false;
|
||||
ipc = "on";
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
{ pkgs, lib, ... }:
|
||||
let
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
vesktop = pkgs.vesktop.overrideAttrs (oldAttrs: {
|
||||
desktopItems = lib.optional pkgs.stdenv.hostPlatform.isLinux (
|
||||
(lib.head oldAttrs.desktopItems).override {
|
||||
|
|
@ -8,40 +11,41 @@ let
|
|||
}
|
||||
);
|
||||
});
|
||||
in
|
||||
{
|
||||
home.packages = (with pkgs; [
|
||||
# Dev stuff
|
||||
gcc
|
||||
go
|
||||
nodePackages.pnpm
|
||||
(python3.withPackages
|
||||
(python-pkgs: [ python-pkgs.pip python-pkgs.requests ]))
|
||||
rustup
|
||||
pkgsCross.mingwW64.stdenv.cc
|
||||
pkgsCross.mingwW64.windows.pthreads
|
||||
postman
|
||||
cz-cli
|
||||
in {
|
||||
home.packages =
|
||||
(with pkgs; [
|
||||
# Dev stuff
|
||||
gcc
|
||||
go
|
||||
nodePackages.pnpm
|
||||
(python3.withPackages
|
||||
(python-pkgs: [python-pkgs.pip python-pkgs.requests]))
|
||||
rustup
|
||||
pkgsCross.mingwW64.stdenv.cc
|
||||
pkgsCross.mingwW64.windows.pthreads
|
||||
postman
|
||||
cz-cli
|
||||
|
||||
# Work stuff
|
||||
libreoffice-qt
|
||||
# Work stuff
|
||||
libreoffice-qt
|
||||
|
||||
# Bluetooth
|
||||
blueberry
|
||||
# Bluetooth
|
||||
blueberry
|
||||
|
||||
# Gaming
|
||||
steam-run
|
||||
# Gaming
|
||||
steam-run
|
||||
|
||||
# Downloads
|
||||
qbittorrent
|
||||
# Downloads
|
||||
qbittorrent
|
||||
|
||||
# Utils
|
||||
viewnior
|
||||
catppuccin-cursors.macchiatoLavender
|
||||
catppuccin-gtk
|
||||
cava
|
||||
papirus-folders
|
||||
]) ++ ([
|
||||
vesktop # discord
|
||||
]);
|
||||
# Utils
|
||||
viewnior
|
||||
catppuccin-cursors.macchiatoLavender
|
||||
catppuccin-gtk
|
||||
cava
|
||||
papirus-folders
|
||||
])
|
||||
++ [
|
||||
vesktop # discord
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,9 +5,6 @@
|
|||
y = "yazi";
|
||||
g = "git";
|
||||
t = "tmux";
|
||||
vim = "nvim";
|
||||
vi = "nvim";
|
||||
v = "nvim";
|
||||
|
||||
# Nixos
|
||||
rebuild = "sudo nixos-rebuild switch --flake /etc/nixos";
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
# config from https://github.com/shub39/dotfiles
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
{...}: {
|
||||
services.swaync = {
|
||||
enable = true;
|
||||
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ in
|
|||
../../modules
|
||||
../../modules/wireguard.nix
|
||||
../../modules/dn-ca.nix
|
||||
../../modules/gaming.nix
|
||||
];
|
||||
|
||||
# Overrides
|
||||
|
|
|
|||
|
|
@ -7,9 +7,7 @@
|
|||
username,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
}: let
|
||||
hyprcursor-size = "32";
|
||||
xcursor-size = "24";
|
||||
nvidia-mode = "offload";
|
||||
|
|
@ -17,8 +15,7 @@ let
|
|||
intel-bus-id = "PCI:0:2:0";
|
||||
nvidia-bus-id = "PCI:1:0:0";
|
||||
nvidia-offload-enabled = config.hardware.nvidia.prime.offload.enable;
|
||||
in
|
||||
{
|
||||
in {
|
||||
imports = [
|
||||
inputs.home-manager.nixosModules.default
|
||||
./hardware-configuration.nix
|
||||
|
|
@ -61,7 +58,9 @@ in
|
|||
;
|
||||
};
|
||||
users."${username}" = {
|
||||
imports = [ ../../../home ];
|
||||
imports = [
|
||||
../../../home
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
{...}: {
|
||||
imports = [
|
||||
./plymouth.nix # Boot splash
|
||||
./fonts.nix
|
||||
|
|
|
|||
|
|
@ -1,10 +1,16 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
nix = {
|
||||
settings = {
|
||||
warn-dirty = false;
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
auto-optimise-store = true;
|
||||
substituters = [ "https://nix-gaming.cachix.org" ];
|
||||
trusted-public-keys = [
|
||||
|
|
@ -26,7 +32,8 @@
|
|||
hardware.steam-hardware.enable = true;
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nixpkgs.config.allowUnfreePredicate = pkg:
|
||||
nixpkgs.config.allowUnfreePredicate =
|
||||
pkg:
|
||||
builtins.elem (lib.getName pkg) [
|
||||
"steam"
|
||||
"steam-original"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
{ pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
withUWSM = true;
|
||||
|
|
@ -50,12 +52,11 @@
|
|||
"flakes"
|
||||
];
|
||||
auto-optimise-store = true;
|
||||
substituters = [ "https://hyprland.cachix.org" ];
|
||||
substituters = ["https://hyprland.cachix.org"];
|
||||
|
||||
trusted-public-keys = [
|
||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
6
system/modules/nvf/binds/default.nix
Normal file
6
system/modules/nvf/binds/default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
let
|
||||
general = import ./general.nix;
|
||||
telescope = import ./telescope.nix;
|
||||
neoTree = import ./neo-tree.nix;
|
||||
in
|
||||
general ++ telescope ++ neoTree
|
||||
508
system/modules/nvf/binds/general.nix
Normal file
508
system/modules/nvf/binds/general.nix
Normal file
|
|
@ -0,0 +1,508 @@
|
|||
let
|
||||
directions = ["h" "j" "k" "l"];
|
||||
generateMappings = direction: {
|
||||
key = "<C-${direction}>";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<C-w>${direction}";
|
||||
};
|
||||
naviMappings = map generateMappings directions;
|
||||
resizeStep = "2";
|
||||
resizeMappings = [
|
||||
{
|
||||
key = "<C-Left>";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>vertical resize -${resizeStep}<CR>";
|
||||
}
|
||||
{
|
||||
key = "<C-Right>";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>vertical resize +${resizeStep}<CR>";
|
||||
}
|
||||
{
|
||||
key = "<C-Up>";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>resize +${resizeStep}<CR>";
|
||||
}
|
||||
{
|
||||
key = "<C-Down>";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>resize -${resizeStep}<CR>";
|
||||
}
|
||||
];
|
||||
moveLineMappings = [
|
||||
{
|
||||
key = "<A-j>";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>m .+1<CR>==";
|
||||
}
|
||||
{
|
||||
key = "<A-k>";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>m .-2<CR>==";
|
||||
}
|
||||
];
|
||||
saveMappings = [
|
||||
# Save File
|
||||
{
|
||||
key = "<C-s>";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>w<CR><ESC>";
|
||||
noremap = true;
|
||||
}
|
||||
{
|
||||
key = "<C-s>";
|
||||
mode = ["i"];
|
||||
silent = true;
|
||||
action = "<cmd>w<CR><ESC>";
|
||||
noremap = true;
|
||||
}
|
||||
{
|
||||
key = "<C-s>";
|
||||
mode = ["x"];
|
||||
silent = true;
|
||||
action = "<cmd>w<CR><ESC>";
|
||||
noremap = true;
|
||||
}
|
||||
{
|
||||
key = "<C-s>";
|
||||
mode = ["s"];
|
||||
silent = true;
|
||||
action = "<cmd>w<CR><ESC>";
|
||||
noremap = true;
|
||||
}
|
||||
];
|
||||
generalMappings = [
|
||||
{
|
||||
key = "<S-h>";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>bprevious<CR>";
|
||||
} # Prev Buffer
|
||||
{
|
||||
key = "<S-l>";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>bnext<CR>";
|
||||
} # Next Buffer
|
||||
{
|
||||
key = "[b";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>bprevious<CR>";
|
||||
} # Prev Buffer
|
||||
{
|
||||
key = "]b";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>bnext<CR>";
|
||||
} # Next Buffer
|
||||
{
|
||||
key = "<leader>bb";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>buffer #<CR>";
|
||||
} # Switch to Other Buffer
|
||||
{
|
||||
key = "<leader>`";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>buffer #<CR>";
|
||||
} # Switch to Other Buffer
|
||||
{
|
||||
key = "<leader>bd";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>bd<CR>";
|
||||
} # Delete Buffer
|
||||
{
|
||||
key = "<leader>bo";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>bufdo bd<CR>";
|
||||
} # Delete Other Buffers
|
||||
{
|
||||
key = "<leader>bD";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>bd | :q<CR>";
|
||||
} # Delete Buffer and Window
|
||||
{
|
||||
key = "<esc>";
|
||||
mode = ["i" "n" "s"];
|
||||
silent = true;
|
||||
action = "<cmd>noh<CR>";
|
||||
} # Escape and Clear hlsearch
|
||||
{
|
||||
key = "<leader>ur";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<Cmd>nohlsearch<Bar>diffupdate<Bar>normal! <C-L><CR>";
|
||||
desc = "Redraw / Clear hlsearch / Diff Update";
|
||||
} # Redraw / Clear hlsearch / Diff Update
|
||||
{
|
||||
key = "n";
|
||||
mode = ["n" "x" "o"];
|
||||
silent = true;
|
||||
action = "n";
|
||||
} # Next Search Result
|
||||
{
|
||||
key = "N";
|
||||
mode = ["n" "x" "o"];
|
||||
silent = true;
|
||||
action = "N";
|
||||
} # Prev Search Result
|
||||
{
|
||||
key = "<C-s>";
|
||||
mode = ["i" "x" "n" "s"];
|
||||
silent = true;
|
||||
action = "<cmd>w<CR>";
|
||||
} # Save File
|
||||
{
|
||||
key = "<leader>K";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>norm! K<cr>";
|
||||
} # Keywordprg
|
||||
{
|
||||
key = "gco";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "o<esc>Vcx<esc><cmd>normal gcc<cr>fxa<bs>";
|
||||
} # Add Comment Below
|
||||
{
|
||||
key = "gcO";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "O<esc>Vcx<esc><cmd>normal gcc<cr>fxa<bs>";
|
||||
} # Add Comment Above
|
||||
{
|
||||
key = "<leader>fn";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>enew<CR>";
|
||||
} # New File
|
||||
{
|
||||
key = "<leader>xl";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>lopen<CR>";
|
||||
} # Location List
|
||||
{
|
||||
key = "<leader>xq";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>copen<CR>";
|
||||
} # Quickfix List
|
||||
{
|
||||
key = "[q";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
lua = true;
|
||||
action = "vim.cmd.cprev";
|
||||
} # Previous Quickfix
|
||||
{
|
||||
key = "]q";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
lua = true;
|
||||
action = "vim.cmd.cnext";
|
||||
} # Next Quickfix
|
||||
{
|
||||
key = "<leader>cf";
|
||||
mode = ["n" "v"];
|
||||
silent = true;
|
||||
action = "<cmd>normal! gq<CR>";
|
||||
} # Format
|
||||
{
|
||||
key = "<leader>cd";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>LspDiagnostics<CR>";
|
||||
} # Line Diagnostics
|
||||
{
|
||||
key = "]d";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>lnext<CR>";
|
||||
} # Next Diagnostic
|
||||
{
|
||||
key = "[d";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>lprevious<CR>";
|
||||
} # Prev Diagnostic
|
||||
{
|
||||
key = "]e";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>lnext<CR>";
|
||||
} # Next Error
|
||||
{
|
||||
key = "[e";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>lprevious<CR>";
|
||||
} # Prev Error
|
||||
{
|
||||
key = "]w";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>lnext<CR>";
|
||||
} # Next Warning
|
||||
{
|
||||
key = "[w";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>lprevious<CR>";
|
||||
} # Prev Warning
|
||||
{
|
||||
key = "<leader>uf";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>ToggleAutoFormat<CR>";
|
||||
} # Toggle Auto Format (Global)
|
||||
{
|
||||
key = "<leader>uF";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>ToggleAutoFormatBuffer<CR>";
|
||||
} # Toggle Auto Format (Buffer)
|
||||
{
|
||||
key = "<leader>us";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>setlocal spell!<CR>";
|
||||
} # Toggle Spelling
|
||||
{
|
||||
key = "<leader>uw";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>set wrap!<CR>";
|
||||
} # Toggle Wrap
|
||||
{
|
||||
key = "<leader>uL";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>set relativenumber!<CR>";
|
||||
} # Toggle Relative Number
|
||||
{
|
||||
key = "<leader>ud";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>LspDiagnosticsToggle<CR>";
|
||||
} # Toggle Diagnostics
|
||||
{
|
||||
key = "<leader>ul";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>set number!<CR>";
|
||||
} # Toggle Line Numbers
|
||||
{
|
||||
key = "<leader>uc";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>set conceallevel=3<CR>";
|
||||
} # Toggle Conceal Level
|
||||
{
|
||||
key = "<leader>uA";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>set showtabline=2<CR>";
|
||||
} # Toggle Tabline
|
||||
{
|
||||
key = "<leader>uT";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>TSToggleHighlight<CR>";
|
||||
} # Toggle Treesitter Highlight
|
||||
{
|
||||
key = "<leader>ub";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>set background=dark<CR>";
|
||||
} # Toggle Dark Background
|
||||
{
|
||||
key = "<leader>uD";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>ToggleDimming<CR>";
|
||||
} # Toggle Dimming
|
||||
{
|
||||
key = "<leader>ua";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>ToggleAnimations<CR>";
|
||||
} # Toggle Animations
|
||||
{
|
||||
key = "<leader>ug";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>IndentGuidesToggle<CR>";
|
||||
} # Toggle Indent Guides
|
||||
{
|
||||
key = "<leader>uS";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>SmoothScrollToggle<CR>";
|
||||
} # Toggle Smooth Scroll
|
||||
{
|
||||
key = "<leader>dpp";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>ToggleProfiler<CR>";
|
||||
} # Toggle Profiler
|
||||
{
|
||||
key = "<leader>dph";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>ToggleProfilerHighlights<CR>";
|
||||
} # Toggle Profiler Highlights
|
||||
{
|
||||
key = "<leader>uh";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>ToggleInlayHints<CR>";
|
||||
} # Toggle Inlay Hints
|
||||
{
|
||||
key = "<leader>gb";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>GitBlame<CR>";
|
||||
} # Git Blame Line
|
||||
{
|
||||
key = "<leader>gB";
|
||||
mode = ["n" "x"];
|
||||
silent = true;
|
||||
action = "<cmd>GitBrowseOpen<CR>";
|
||||
} # Git Browse (open)
|
||||
{
|
||||
key = "<leader>gY";
|
||||
mode = ["n" "x"];
|
||||
silent = true;
|
||||
action = "<cmd>GitBrowseCopy<CR>";
|
||||
} # Git Browse (copy)
|
||||
{
|
||||
key = "<leader>qq";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>qa!<CR>";
|
||||
} # Quit All
|
||||
{
|
||||
key = "<leader>ui";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>InspectPos<CR>";
|
||||
} # Inspect Pos
|
||||
{
|
||||
key = "<leader>uI";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>InspectTree<CR>";
|
||||
} # Inspect Tree
|
||||
{
|
||||
key = "<leader>L";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>LazyVimChangelog<CR>";
|
||||
} # LazyVim Changelog
|
||||
{
|
||||
key = "<c-_>";
|
||||
mode = ["n" "t"];
|
||||
silent = true;
|
||||
action = "<nop>";
|
||||
} # which_key_ignore
|
||||
{
|
||||
key = "<leader>w";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>windows<CR>";
|
||||
} # Windows
|
||||
{
|
||||
key = "<leader>-";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>split<CR>";
|
||||
} # Split Window Below
|
||||
{
|
||||
key = "<leader>|";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>vsplit<CR>";
|
||||
} # Split Window Right
|
||||
{
|
||||
key = "<leader>wd";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>close<CR>";
|
||||
} # Delete Window
|
||||
{
|
||||
key = "<leader>wm";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>ZoomModeToggle<CR>";
|
||||
} # Toggle Zoom Mode
|
||||
{
|
||||
key = "<leader>uZ";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>ZoomModeToggle<CR>";
|
||||
} # Toggle Zoom Mode
|
||||
{
|
||||
key = "<leader>uz";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>ZenModeToggle<CR>";
|
||||
} # Toggle Zen Mode
|
||||
{
|
||||
key = "<leader><tab>l";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>tabprevious<CR>";
|
||||
} # Last Tab
|
||||
{
|
||||
key = "<leader><tab>o";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>tabnew<CR>";
|
||||
} # Close Other Tabs
|
||||
{
|
||||
key = "<leader><tab>f";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>tabfirst<CR>";
|
||||
} # First Tab
|
||||
{
|
||||
key = "<leader><tab><tab>";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>tabnew<CR>";
|
||||
} # New Tab
|
||||
{
|
||||
key = "<leader><tab>]";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>tabnext<CR>";
|
||||
} # Next Tab
|
||||
{
|
||||
key = "<leader><tab>d";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>tabclose<CR>";
|
||||
} # Close Tab
|
||||
{
|
||||
key = "<leader><tab>[";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>tabprevious<CR>";
|
||||
} # Previous Tab
|
||||
];
|
||||
in
|
||||
naviMappings ++ resizeMappings ++ moveLineMappings ++ saveMappings ++ generalMappings
|
||||
9
system/modules/nvf/binds/neo-tree.nix
Normal file
9
system/modules/nvf/binds/neo-tree.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
[
|
||||
{
|
||||
key = "<leader>e";
|
||||
mode = ["n" "t"];
|
||||
silent = true;
|
||||
action = "<CMD>Neotree toggle<CR>";
|
||||
desc = "Toggle NeoTree";
|
||||
}
|
||||
]
|
||||
121
system/modules/nvf/binds/snacks.nix
Normal file
121
system/modules/nvf/binds/snacks.nix
Normal file
|
|
@ -0,0 +1,121 @@
|
|||
[
|
||||
{
|
||||
key = "<leader>z";
|
||||
mode = ["n"];
|
||||
desc = "Toggle Zen Mode";
|
||||
action = "function() Snacks.zen() end";
|
||||
lua = true;
|
||||
}
|
||||
{
|
||||
key = "<leader>Z";
|
||||
mode = ["n"];
|
||||
desc = "Toggle Zoom";
|
||||
action = "function() Snacks.zen.zoom() end";
|
||||
lua = true;
|
||||
}
|
||||
{
|
||||
key = "<leader>.";
|
||||
mode = ["n"];
|
||||
desc = "Toggle Scratch Buffer";
|
||||
action = "function() Snacks.scratch() end";
|
||||
lua = true;
|
||||
}
|
||||
{
|
||||
key = "<leader>S";
|
||||
mode = ["n"];
|
||||
desc = "Select Scratch Buffer";
|
||||
action = "function() Snacks.scratch.select() end";
|
||||
lua = true;
|
||||
}
|
||||
{
|
||||
key = "<leader>n";
|
||||
mode = ["n"];
|
||||
desc = "Notification History";
|
||||
action = "function() Snacks.notifier.show_history() end";
|
||||
lua = true;
|
||||
}
|
||||
{
|
||||
key = "<leader>bd";
|
||||
mode = ["n"];
|
||||
desc = "Delete Buffer";
|
||||
action = "function() Snacks.bufdelete() end";
|
||||
lua = true;
|
||||
}
|
||||
{
|
||||
key = "<leader>cR";
|
||||
mode = ["n"];
|
||||
desc = "Rename File";
|
||||
action = "function() Snacks.rename.rename_file() end";
|
||||
lua = true;
|
||||
}
|
||||
{
|
||||
key = "<leader>gB";
|
||||
mode = ["n" "v"];
|
||||
desc = "Git Browse";
|
||||
action = "function() Snacks.gitbrowse() end";
|
||||
lua = true;
|
||||
}
|
||||
{
|
||||
key = "<leader>gb";
|
||||
mode = ["n"];
|
||||
desc = "Git Blame Line";
|
||||
action = "function() Snacks.git.blame_line() end";
|
||||
lua = true;
|
||||
}
|
||||
{
|
||||
key = "<leader>gf";
|
||||
mode = ["n"];
|
||||
desc = "Lazygit Current File History";
|
||||
action = "function() Snacks.lazygit.log_file() end";
|
||||
lua = true;
|
||||
}
|
||||
{
|
||||
key = "<leader>gg";
|
||||
mode = ["n"];
|
||||
desc = "Lazygit";
|
||||
action = "function() Snacks.lazygit() end";
|
||||
lua = true;
|
||||
}
|
||||
{
|
||||
key = "<leader>gl";
|
||||
mode = ["n"];
|
||||
desc = "Lazygit Log (cwd)";
|
||||
action = "function() Snacks.lazygit.log() end";
|
||||
lua = true;
|
||||
}
|
||||
{
|
||||
key = "<leader>un";
|
||||
mode = ["n"];
|
||||
desc = "Dismiss All Notifications";
|
||||
action = "function() Snacks.notifier.hide() end";
|
||||
lua = true;
|
||||
}
|
||||
{
|
||||
key = "<c-/>";
|
||||
mode = ["n"];
|
||||
desc = "Toggle Terminal";
|
||||
action = "function() Snacks.terminal() end";
|
||||
lua = true;
|
||||
}
|
||||
{
|
||||
key = "<c-_>";
|
||||
mode = ["n"];
|
||||
desc = "which_key_ignore";
|
||||
action = "function() Snacks.terminal() end";
|
||||
lua = true;
|
||||
}
|
||||
{
|
||||
key = "]]";
|
||||
mode = ["n" "t"];
|
||||
desc = "Next Reference";
|
||||
action = "function() Snacks.words.jump(vim.v.count1) end";
|
||||
lua = true;
|
||||
}
|
||||
{
|
||||
key = "[[";
|
||||
mode = ["n" "t"];
|
||||
desc = "Prev Reference";
|
||||
action = "function() Snacks.words.jump(-vim.v.count1) end";
|
||||
lua = true;
|
||||
}
|
||||
]
|
||||
9
system/modules/nvf/binds/telescope.nix
Normal file
9
system/modules/nvf/binds/telescope.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
[
|
||||
{
|
||||
key = "<leader> ";
|
||||
mode = ["n" "t"];
|
||||
silent = true;
|
||||
action = "<cmd>Telescope find_files<CR>";
|
||||
desc = "Find Files";
|
||||
}
|
||||
]
|
||||
214
system/modules/nvf/default.nix
Normal file
214
system/modules/nvf/default.nix
Normal file
|
|
@ -0,0 +1,214 @@
|
|||
{pkgs, ...}: let
|
||||
keybinds = import ./binds;
|
||||
plugins = import ./plugins {inherit pkgs;};
|
||||
in {
|
||||
programs.nvf = {
|
||||
enable = true;
|
||||
settings = {
|
||||
vim = {
|
||||
package = pkgs.neovim-unwrapped;
|
||||
lazy.plugins = plugins;
|
||||
|
||||
viAlias = false;
|
||||
vimAlias = true;
|
||||
useSystemClipboard = true;
|
||||
|
||||
keymaps = keybinds;
|
||||
|
||||
lsp = {
|
||||
formatOnSave = true;
|
||||
lspkind.enable = false;
|
||||
lightbulb.enable = true;
|
||||
lspsaga.enable = false;
|
||||
trouble.enable = true;
|
||||
lspSignature.enable = true;
|
||||
otter-nvim.enable = true;
|
||||
lsplines.enable = true;
|
||||
nvim-docs-view.enable = true;
|
||||
};
|
||||
|
||||
debugger = {
|
||||
nvim-dap = {
|
||||
enable = true;
|
||||
ui.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
theme = {
|
||||
enable = true;
|
||||
name = "tokyonight";
|
||||
style = "night";
|
||||
};
|
||||
|
||||
snippets = {
|
||||
luasnip.enable = true;
|
||||
};
|
||||
|
||||
binds = {
|
||||
whichKey.enable = true;
|
||||
cheatsheet.enable = true;
|
||||
};
|
||||
|
||||
git = {
|
||||
enable = true;
|
||||
gitsigns.enable = true;
|
||||
gitsigns.codeActions.enable = false;
|
||||
};
|
||||
|
||||
minimap = {
|
||||
codewindow.enable = true;
|
||||
};
|
||||
|
||||
projects = {
|
||||
project-nvim.enable = true;
|
||||
};
|
||||
|
||||
notes = {
|
||||
todo-comments.enable = true;
|
||||
mind-nvim.enable = true;
|
||||
};
|
||||
|
||||
tabline = {
|
||||
nvimBufferline.enable = true;
|
||||
};
|
||||
|
||||
utility = {
|
||||
icon-picker.enable = true;
|
||||
surround.enable = true;
|
||||
diffview-nvim.enable = true;
|
||||
motion = {
|
||||
hop.enable = true;
|
||||
leap.enable = true;
|
||||
precognition.enable = false;
|
||||
};
|
||||
|
||||
images = {
|
||||
image-nvim = {
|
||||
enable = true;
|
||||
setupOpts = {
|
||||
backend = "kitty";
|
||||
processor = "magick_cli";
|
||||
integrations = {
|
||||
markdown = {
|
||||
enable = true;
|
||||
downloadRemoteImages = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
filetree.neo-tree = {
|
||||
enable = true;
|
||||
setupOpts = {
|
||||
filesystem = {
|
||||
bind_to_cwd = false;
|
||||
follow_current_file.enabled = true;
|
||||
use_libuv_file_watcher = true;
|
||||
};
|
||||
window.mappings = {
|
||||
"<space>" = "none";
|
||||
"l" = "open";
|
||||
"h" = "close_node";
|
||||
};
|
||||
default_component_configs = {
|
||||
indent = {
|
||||
with_expanders = true;
|
||||
expander_collapsed = "";
|
||||
expander_expanded = "";
|
||||
expander_highlight = "NeoTreeExpander";
|
||||
};
|
||||
git_status = {
|
||||
symbols = {
|
||||
unstaged = "";
|
||||
staged = "";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
ui = {
|
||||
borders.enable = true;
|
||||
colorizer.enable = true;
|
||||
illuminate.enable = true;
|
||||
noice.enable = true;
|
||||
breadcrumbs = {
|
||||
enable = true;
|
||||
navbuddy.enable = true;
|
||||
};
|
||||
|
||||
smartcolumn = {
|
||||
enable = true;
|
||||
setupOpts.custom_colorcolumn = {
|
||||
nix = "110";
|
||||
ruby = "120";
|
||||
java = "130";
|
||||
go = ["90" "130"];
|
||||
};
|
||||
};
|
||||
fastaction.enable = true;
|
||||
};
|
||||
|
||||
statusline.lualine = {
|
||||
enable = true;
|
||||
theme = "tokyonight";
|
||||
};
|
||||
|
||||
telescope.enable = true;
|
||||
autocomplete.nvim-cmp.enable = true;
|
||||
autopairs.nvim-autopairs.enable = true;
|
||||
treesitter.context.enable = true;
|
||||
|
||||
languages = {
|
||||
enableLSP = true;
|
||||
enableFormat = true;
|
||||
enableTreesitter = true;
|
||||
enableExtraDiagnostics = true;
|
||||
|
||||
nix.enable = true;
|
||||
markdown.enable = true;
|
||||
bash.enable = true;
|
||||
clang.enable = true;
|
||||
css.enable = true;
|
||||
html.enable = true;
|
||||
sql.enable = true;
|
||||
java.enable = true;
|
||||
kotlin.enable = true;
|
||||
ts.enable = true;
|
||||
go.enable = true;
|
||||
lua.enable = true;
|
||||
zig.enable = true;
|
||||
python.enable = true;
|
||||
typst.enable = true;
|
||||
rust = {
|
||||
enable = true;
|
||||
crates.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
visuals = {
|
||||
nvim-scrollbar.enable = true;
|
||||
nvim-web-devicons.enable = true;
|
||||
nvim-cursorline.enable = true;
|
||||
cinnamon-nvim.enable = true;
|
||||
fidget-nvim.enable = true;
|
||||
highlight-undo.enable = true;
|
||||
indent-blankline.enable = true;
|
||||
|
||||
# Fun
|
||||
cellular-automaton.enable = false;
|
||||
};
|
||||
|
||||
comments = {
|
||||
comment-nvim.enable = true;
|
||||
};
|
||||
|
||||
presence = {
|
||||
neocord.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
93
system/modules/nvf/plugins/default.nix
Normal file
93
system/modules/nvf/plugins/default.nix
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
{pkgs, ...}: let
|
||||
snacksBinds = import ../binds/snacks.nix;
|
||||
logo = ''
|
||||
██████████ █████████ █████████ █████ █████ █████ █████ █████ █████
|
||||
░░███░░░░███ ███░░░░░███ ███░░░░░███░░███ ░░███ ░░███ ░░███ ░░███ ░░███
|
||||
░███ ░░███ ░███ ░███ ███ ░░░ ░███ ░███ ░░███ ███ ░░███ ███
|
||||
░███ ░███ ░███████████ ░███ ░███████████ ░░█████ ░░█████
|
||||
░███ ░███ ░███░░░░░███ ░███ ░███░░░░░███ ███░███ ░░███
|
||||
░███ ███ ░███ ░███ ░░███ ███ ░███ ░███ ███ ░░███ ░███
|
||||
██████████ █████ █████ ░░█████████ █████ █████ █████ █████ █████
|
||||
░░░░░░░░░░ ░░░░░ ░░░░░ ░░░░░░░░░ ░░░░░ ░░░░░ ░░░░░ ░░░░░ ░░░░░
|
||||
'';
|
||||
in {
|
||||
"${pkgs.vimPlugins.snacks-nvim.pname}" = {
|
||||
enabled = true;
|
||||
priority = 1000;
|
||||
package = pkgs.vimPlugins.snacks-nvim;
|
||||
setupModule = "snacks";
|
||||
lazy = false;
|
||||
setupOpts = {
|
||||
animate.enabled = true;
|
||||
dashboard = {
|
||||
enabled = true;
|
||||
header = logo;
|
||||
keys = [
|
||||
{
|
||||
icon = " ";
|
||||
key = "f";
|
||||
desc = "Find File";
|
||||
action = ":lua Snacks.dashboard.pick('files')";
|
||||
}
|
||||
{
|
||||
icon = " ";
|
||||
key = "n";
|
||||
desc = "New File";
|
||||
action = ":ene | startinsert";
|
||||
}
|
||||
{
|
||||
icon = " ";
|
||||
key = "g";
|
||||
desc = "Find Text";
|
||||
action = ":lua Snacks.dashboard.pick('live_grep')";
|
||||
}
|
||||
{
|
||||
icon = " ";
|
||||
key = "r";
|
||||
desc = "Recent Files";
|
||||
action = ":lua Snacks.dashboard.pick('oldfiles')";
|
||||
}
|
||||
{
|
||||
icon = " ";
|
||||
key = "c";
|
||||
desc = "Config";
|
||||
action = ":lua Snacks.dashboard.pick('files', {cwd = vim.fn.stdpath('config')})";
|
||||
}
|
||||
{
|
||||
icon = " ";
|
||||
key = "s";
|
||||
desc = "Restore Session";
|
||||
section = "session";
|
||||
}
|
||||
{
|
||||
icon = " ";
|
||||
key = "x";
|
||||
desc = "Lazy Extras";
|
||||
action = ":LazyExtras";
|
||||
}
|
||||
{
|
||||
icon = " ";
|
||||
key = "l";
|
||||
desc = "Lazy";
|
||||
action = ":Lazy";
|
||||
}
|
||||
{
|
||||
icon = " ";
|
||||
key = "q";
|
||||
desc = "Quit";
|
||||
action = ":qa";
|
||||
}
|
||||
];
|
||||
};
|
||||
indent.enabled = true;
|
||||
input.enabled = true;
|
||||
notifier.enabled = false;
|
||||
quickfile.enabled = true;
|
||||
scroll.enabled = true;
|
||||
statuscolumn.enabled = false;
|
||||
words.enabled = true;
|
||||
};
|
||||
|
||||
keys = snacksBinds;
|
||||
};
|
||||
}
|
||||
|
|
@ -7,6 +7,8 @@
|
|||
{
|
||||
environment.systemPackages =
|
||||
(with pkgs; [
|
||||
neovim
|
||||
|
||||
# Binary cache platform
|
||||
cachix
|
||||
|
||||
|
|
@ -60,7 +62,7 @@
|
|||
gcc
|
||||
|
||||
# Editor
|
||||
neovim
|
||||
vim
|
||||
stylua
|
||||
lazygit
|
||||
luajitPackages.lua
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue