Refactor flakes

Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
This commit is contained in:
Hadi
2026-04-27 21:13:58 +02:00
parent df6381db85
commit 5945a72b01
17 changed files with 304 additions and 102 deletions
+69
View File
@@ -0,0 +1,69 @@
{
inputs,
pkgs,
pkgs-stable,
system,
...
}: {
packages.${system} = {
dev = pkgs.buildEnv {
name = "dev-tools";
paths =
(with pkgs; [
go
bun
nodejs
air
duckdb
claude-code
inputs.bun2nix.packages.${system}.default
])
++ (with pkgs-stable; [
docker
python3
jq
just
]);
};
cybersecurity = pkgs.buildEnv {
name = "cybersecurity-tools";
paths = with pkgs-stable; [
wireshark
nmap
john
hashcat
metasploit
haiti
hydra
dnsrecon
whois
dig
nosqli
jwt-cli
nuclei
caido
gobuster
dirb
ffuf
sqlmap
inetutils
samba
openvpn
mariadb
redis
];
};
};
homeManagerModules = {
dev = {
_module.args.pkgs-stable = pkgs-stable;
imports = [./dev.nix];
};
cybersecurity = {
_module.args.pkgs-stable = pkgs-stable;
imports = [./cybersecurity.nix];
};
};
}
+20 -10
View File
@@ -1,21 +1,31 @@
# NVF is a Neovim configuration that provides a minimal setup with essential plugins and configurations.
{
inputs,
pkgs,
...
}: {
imports = [
inputs.nvf.homeManagerModules.default
./options.nix
./languages.nix
./picker.nix
./snacks.nix
./keymaps.nix
./utils.nix
./mini.nix
imports = [inputs.nvf.homeManagerModules.default];
# Packages needed by snacks image preview
home.packages = with pkgs; [
imagemagick
tree-sitter
ghostscript
tectonic
mermaid-cli
];
programs.nvf = {
enable = true;
settings = {
imports = [
./options.nix
./languages.nix
./picker.nix
./snacks.nix
./keymaps.nix
./utils.nix
./mini.nix
];
};
};
}
+32
View File
@@ -0,0 +1,32 @@
{
inputs,
pkgs,
system,
...
}: let
nvimConfig = inputs.nvf.lib.neovimConfiguration {
inherit pkgs;
modules = [
./options.nix
./languages.nix
./picker.nix
./snacks.nix
./keymaps.nix
./utils.nix
./mini.nix
];
};
in {
packages.${system}.nvim = nvimConfig.neovim;
apps.${system}.nvim = {
type = "app";
program = "${nvimConfig.neovim}/bin/nvim";
};
defaultApp.${system} = {
type = "app";
program = "${nvimConfig.neovim}/bin/nvim";
};
homeManagerModules.nvim = {imports = [./default.nix];};
}
+8 -9
View File
@@ -1,10 +1,9 @@
{
programs.nvf.settings.vim = {
vim = {
globals.mapleader = " ";
binds = {
whichKey = {
enable = true;
# TODO: registers
register = {};
};
};
@@ -63,18 +62,18 @@
}
{
key = "<MiddleMouse>";
mode = ["n" "i" "v"]; # Normal, Insert, Visual
action = "<nop>"; # No Operation
silent = true;
}
{
key = "<2-MiddleMouse>"; # Désactive aussi le double clic molette
mode = ["n" "i" "v"];
action = "<nop>";
silent = true;
}
{
key = "<3-MiddleMouse>"; # Désactive aussi le double clic molette
key = "<2-MiddleMouse>";
mode = ["n" "i" "v"];
action = "<nop>";
silent = true;
}
{
key = "<3-MiddleMouse>";
mode = ["n" "i" "v"];
action = "<nop>";
silent = true;
+2 -3
View File
@@ -3,7 +3,7 @@
pkgs,
...
}: {
programs.nvf.settings.vim = {
vim = {
diagnostics = {
enable = true;
config = {
@@ -26,7 +26,6 @@
''
function(diagnostic)
return string.format("%s", diagnostic.message)
--return string.format("%s (%s)", diagnostic.message, diagnostic.source)
end
'';
};
@@ -41,7 +40,7 @@
context.enable = true;
highlight.enable = true;
grammars = with pkgs.vimPlugins.nvim-treesitter.builtGrammars; [
typescript # in language settings only tsx gets enabled, not typescript
typescript
];
};
lsp = {
+1 -2
View File
@@ -1,8 +1,7 @@
{
programs.nvf.settings.vim.mini = {
vim.mini = {
starter.enable = true;
comment.enable = true;
# cursorword.enable = true;
icons.enable = true;
indentscope.enable = true;
notify.enable = true;
+3 -4
View File
@@ -1,9 +1,8 @@
{lib, ...}: {
programs.nvf.settings.vim = {
vim = {
viAlias = false;
vimAlias = true;
withNodeJs = true;
# syntaxHighlighting = true;
options = {
autoindent = true;
smartindent = true;
@@ -19,8 +18,8 @@
wrap = false;
};
globals = {
navic_silence = true; # navic tries to attach multiple LSPs and fails
suda_smart_edit = 1; # use super user write automatically
navic_silence = true;
suda_smart_edit = 1;
neovide_scale_factor = 0.7;
neovide_cursor_animation_length = 0.1;
neovide_cursor_short_animation_length = 0;
+1 -1
View File
@@ -1,5 +1,5 @@
{
programs.nvf.settings.vim = {
vim = {
utility = {
oil-nvim.enable = true;
snacks-nvim = {
+2 -9
View File
@@ -1,12 +1,5 @@
{pkgs, ...}: {
home.packages = with pkgs; [
imagemagick
tree-sitter
ghostscript
tectonic
mermaid-cli
];
programs.nvf.settings.vim.utility.snacks-nvim = {
{
vim.utility.snacks-nvim = {
enable = true;
setupOpts = {
image = {
+1 -1
View File
@@ -1,5 +1,5 @@
{pkgs, ...}: {
programs.nvf.settings.vim = {
vim = {
undoFile.enable = true;
utility = {
motion.flash-nvim.enable = true;