This commit is contained in:
Evan Reichard 2025-03-27 11:35:05 -04:00
parent b956c8da1e
commit e354c4e194
59 changed files with 720 additions and 412 deletions

169
flake.lock generated
View File

@ -1,5 +1,27 @@
{
"nodes": {
"apple-silicon": {
"inputs": {
"flake-compat": "flake-compat",
"nixpkgs": [
"nixpkgs"
],
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1742098834,
"narHash": "sha256-l98XVpNXW6hr0AsxCeQZbdf6EGT8OpHdkWBi7sdel4s=",
"owner": "tpwrules",
"repo": "nixos-apple-silicon",
"rev": "8457960249bcfd34c22838e20eaa7d8261428688",
"type": "github"
},
"original": {
"owner": "tpwrules",
"repo": "nixos-apple-silicon",
"type": "github"
}
},
"disko": {
"inputs": {
"nixpkgs": "nixpkgs"
@ -18,6 +40,95 @@
"type": "github"
}
},
"flake-compat": {
"locked": {
"lastModified": 1688025799,
"narHash": "sha256-ktpB4dRtnksm9F5WawoIkEneh1nrEvuxb5lJFt1iOyw=",
"owner": "nix-community",
"repo": "flake-compat",
"rev": "8bf105319d44f6b9f0d764efa4fdef9f1cc9ba1c",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1650374568,
"narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "b4a34015c698c7793d592d66adbab377907a2be8",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1694529238,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils-plus": {
"inputs": {
"flake-utils": "flake-utils"
},
"locked": {
"lastModified": 1715533576,
"narHash": "sha256-fT4ppWeCJ0uR300EH3i7kmgRZnAVxrH+XtK09jQWihk=",
"owner": "gytis-ivaskevicius",
"repo": "flake-utils-plus",
"rev": "3542fe9126dc492e53ddd252bb0260fe035f2c0f",
"type": "github"
},
"original": {
"owner": "gytis-ivaskevicius",
"repo": "flake-utils-plus",
"rev": "3542fe9126dc492e53ddd252bb0260fe035f2c0f",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1742655702,
"narHash": "sha256-jbqlw4sPArFtNtA1s3kLg7/A4fzP4GLk9bGbtUJg0JQ=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "0948aeedc296f964140d9429223c7e4a0702a1ff",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-24.11",
"repo": "home-manager",
"type": "github"
}
},
"nixlib": {
"locked": {
"lastModified": 1736643958,
@ -88,9 +199,65 @@
},
"root": {
"inputs": {
"apple-silicon": "apple-silicon",
"disko": "disko",
"home-manager": "home-manager",
"nixos-generators": "nixos-generators",
"nixpkgs": "nixpkgs_2"
"nixpkgs": "nixpkgs_2",
"snowfall-lib": "snowfall-lib"
}
},
"rust-overlay": {
"flake": false,
"locked": {
"lastModified": 1686795910,
"narHash": "sha256-jDa40qRZ0GRQtP9EMZdf+uCbvzuLnJglTUI2JoHfWDc=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "5c2b97c0a9bc5217fc3dfb1555aae0fb756d99f9",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"snowfall-lib": {
"inputs": {
"flake-compat": "flake-compat_2",
"flake-utils-plus": "flake-utils-plus",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1736130495,
"narHash": "sha256-4i9nAJEZFv7vZMmrE0YG55I3Ggrtfo5/T07JEpEZ/RM=",
"owner": "snowfallorg",
"repo": "lib",
"rev": "02d941739f98a09e81f3d2d9b3ab08918958beac",
"type": "github"
},
"original": {
"owner": "snowfallorg",
"repo": "lib",
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},

199
flake.nix
View File

@ -4,6 +4,14 @@
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
disko.url = "github:nix-community/disko";
snowfall-lib = {
url = "github:snowfallorg/lib";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager/release-24.11";
inputs.nixpkgs.follows = "nixpkgs";
};
apple-silicon = {
url = "github:tpwrules/nixos-apple-silicon";
inputs.nixpkgs.follows = "nixpkgs";
@ -14,96 +22,113 @@
};
};
outputs = { self, nixpkgs, disko, nixos-generators, apple-silicon }:
let
mkSystem = { systemConfig ? { }, moduleConfig }: nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
disko.nixosModules.disko
./lib/disk-config.nix
./lib/common-system.nix
systemConfig
({ ... }: moduleConfig)
];
};
in
{
# NixOS Generators
packages.x86_64-linux = {
# RKE2
rke2-image = nixos-generators.nixosGenerate {
system = "x86_64-linux";
format = "vmware";
modules = [
./hosts/rke2-image.nix
];
outputs = inputs:
inputs.snowfall-lib.mkFlake {
inherit inputs;
src = ./.;
snowfall = {
meta = {
name = "reichardnix";
title = "ReichardNix";
};
usb-image = nixos-generators.nixosGenerate {
system = "x86_64-linux";
format = "raw-efi";
modules = [
./hosts/usb-image.nix
];
};
namespace = "reichardnix";
};
# NixOS Configurations
nixosConfigurations = {
# MBP NixOS Asahi
mpb-asahi = nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
modules = [
apple-silicon.nixosModules.default
./hosts/mbp-asahi.nix
];
};
# Office Server (LLaMA / ADS-B)
lin-va-office = mkSystem {
systemConfig = ./hosts/office-server.nix;
moduleConfig = {
hostName = "lin-va-office";
mainDiskID = "/dev/disk/by-id/ata-MTFDDAK512MBF-1AN1ZABHA_161212233628";
network = {
interface = "enp5s0";
address = "10.0.50.120";
defaultGateway = "10.0.50.254";
nameservers = [ "10.0.50.254" ];
};
};
};
# Utility Room Desktop
lin-va-utility = mkSystem {
systemConfig = ./hosts/utility-desktop.nix;
moduleConfig = {
hostName = "lin-va-utility";
mainDiskID = "/dev/disk/by-id/nvme-eui.0026b768429d3eb5";
network = {
interface = "eno1";
address = "10.0.20.50";
defaultGateway = "10.0.20.254";
nameservers = [ "10.0.20.254" ];
};
};
};
# Nix Builder
lin-va-nix-builder = mkSystem {
systemConfig = ./hosts/builder.nix;
moduleConfig = {
hostName = "lin-va-nix-builder";
mainDiskID = "/dev/xvda";
enableXenGuest = true;
network = {
interface = "enX0";
address = "10.0.50.130";
defaultGateway = "10.0.50.254";
nameservers = [ "10.0.50.254" ];
};
};
};
};
# home-manager.enable = true;
};
}
# outputs = { self, nixpkgs, disko, nixos-generators, apple-silicon }:
# let
# mkSystem = { systemConfig ? { }, moduleConfig }: nixpkgs.lib.nixosSystem {
# system = "x86_64-linux";
# modules = [
# disko.nixosModules.disko
# ./lib/disk-config.nix
# ./lib/common-system.nix
# systemConfig
# ({ ... }: moduleConfig)
# ];
# };
# in
# {
# # NixOS Generators
# packages.x86_64-linux = {
# # RKE2
# rke2-image = nixos-generators.nixosGenerate {
# system = "x86_64-linux";
# format = "vmware";
# modules = [
# ./hosts/rke2-image.nix
# ];
# };
# usb-image = nixos-generators.nixosGenerate {
# system = "x86_64-linux";
# format = "raw-efi";
# modules = [
# ./hosts/usb-image.nix
# ];
# };
# };
# # NixOS Configurations
# nixosConfigurations = {
# # MBP NixOS Asahi
# mpb-asahi = nixpkgs.lib.nixosSystem {
# system = "aarch64-linux";
# modules = [
# apple-silicon.nixosModules.default
# ./hosts/mbp-asahi.nix
# ];
# };
# # Office Server (LLaMA / ADS-B)
# lin-va-office = mkSystem {
# systemConfig = ./hosts/office-server.nix;
# moduleConfig = {
# hostName = "lin-va-office";
# mainDiskID = "/dev/disk/by-id/ata-MTFDDAK512MBF-1AN1ZABHA_161212233628";
# network = {
# interface = "enp5s0";
# address = "10.0.50.120";
# defaultGateway = "10.0.50.254";
# nameservers = [ "10.0.50.254" ];
# };
# };
# };
# # Utility Room Desktop
# lin-va-utility = mkSystem {
# systemConfig = ./hosts/utility-desktop.nix;
# moduleConfig = {
# hostName = "lin-va-utility";
# mainDiskID = "/dev/disk/by-id/nvme-eui.0026b768429d3eb5";
# network = {
# interface = "eno1";
# address = "10.0.20.50";
# defaultGateway = "10.0.20.254";
# nameservers = [ "10.0.20.254" ];
# };
# };
# };
# # Nix Builder
# lin-va-nix-builder = mkSystem {
# systemConfig = ./hosts/builder.nix;
# moduleConfig = {
# hostName = "lin-va-nix-builder";
# mainDiskID = "/dev/xvda";
# enableXenGuest = true;
# network = {
# interface = "enX0";
# address = "10.0.50.130";
# defaultGateway = "10.0.50.254";
# nameservers = [ "10.0.50.254" ];
# };
# };
# };
# };
# };

View File

@ -1,18 +0,0 @@
{
programs.bash = {
enable = true;
shellAliases = {
grep = "grep --color";
ssh = "TERM=xterm-256color ssh";
flush_dns = "sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder";
};
profileExtra = ''
SHELL="$BASH"
PATH=~/.bin:$PATH
eval "$(thefuck --alias)"
set -o vi
bind "set show-mode-in-prompt on"
fastfetch
'';
};
}

View File

@ -1,7 +0,0 @@
{
xdg.configFile = {
"fastfetch/config.jsonc" = {
source = ./config/config.jsonc;
};
};
}

View File

@ -1,7 +0,0 @@
{
xdg.configFile = {
"ghostty/config" = {
source = ./config/ghostty.conf;
};
};
}

View File

@ -1,72 +0,0 @@
{
programs.git = {
enable = true;
userName = "Evan Reichard";
aliases = {
lg = "log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all -n 15";
};
includes = [
{
path = "~/.config/git/work";
condition = "gitdir:~/Development/git/work/";
}
{
path = "~/.config/git/personal";
condition = "gitdir:~/Development/git/personal/";
}
];
extraConfig = {
core = {
autocrlf = "input";
safecrlf = "true";
excludesFile = "~/.config/git/.gitignore";
};
column = {
ui = "auto";
};
fetch = {
prune = true;
pruneTags = true;
all = true;
};
help = {
autocorrect = true;
};
diff = {
algorithm = "histogram";
colorMoved = "plain";
mnemonicPrefix = true;
renames = true;
};
rebase = {
autoSquash = true;
autoStash = true;
updateRefs = true;
};
rerere = {
enabled = true;
autoupdate = true;
};
commit = {
verbose = true;
};
branch = {
sort = "-committerdate";
};
merge = {
conflictstyle = "zdiff3";
};
push = {
autoSetupRemote = true;
};
};
};
# Copy Configuration
xdg.configFile = {
git = {
source = ./config;
recursive = true;
};
};
}

View File

@ -1,194 +0,0 @@
{ pkgs, ... }:
{
programs.neovim = {
enable = true;
viAlias = true;
vimAlias = true;
withNodeJs = true;
withPython3 = true;
plugins = with pkgs.vimPlugins; [
# ------------------
# --- Completion ---
# ------------------
cmp-buffer # Buffer Word Completion
cmp-cmdline # Command Line Completion
cmp-nvim-lsp # Main LSP
cmp-path # Path Completion
cmp_luasnip # Snippets Completion
friendly-snippets # Snippets
lsp_lines-nvim # Inline Diagnostics
luasnip # Snippets
nvim-cmp # Completions
nvim-lspconfig # LSP Config
# -------------------
# ----- Helpers -----
# -------------------
aerial-nvim # Code Outline
comment-nvim # Code Comments
diffview-nvim # Diff View
gitsigns-nvim # Git Blame
leap-nvim # Quick Movement
markdown-preview-nvim # Markdown Preview
neo-tree-nvim # File Explorer
none-ls-nvim # Formatters
numb-nvim # Peek / Jump to Lines
nvim-autopairs # Automatically Close Pairs (),[],{}
telescope-fzf-native-nvim # Faster Telescope
telescope-nvim # Fuzzy Finder
telescope-ui-select-nvim # UI
toggleterm-nvim # Terminal Helper
vim-nix # Nix Helpers
which-key-nvim # Shortcut Helper
# ------------------
# --- Theme / UI ---
# ------------------
lualine-nvim # Bottom Line
noice-nvim # UI Tweaks
# nord-nvim # Theme
melange-nvim # Theme
nvim-notify # Noice Dependency
nvim-web-devicons # Dev Icons
# ------------------
# --- Treesitter ---
# ------------------
nvim-treesitter-context
nvim-treesitter.withAllGrammars
# -------------------
# ------- DAP -------
# -------------------
nvim-dap
nvim-dap-go
nvim-dap-ui
# --------------------
# -- NONE-LS EXTRAS --
# --------------------
(
pkgs.vimUtils.buildVimPlugin {
pname = "none-ls-extras.nvim";
version = "2024-06-11";
src = pkgs.fetchFromGitHub {
owner = "nvimtools";
repo = "none-ls-extras.nvim";
rev = "336e84b9e43c0effb735b08798ffac382920053b";
sha256 = "sha256-UtU4oWSRTKdEoMz3w8Pk95sROuo3LEwxSDAm169wxwk=";
};
meta.homepage = "https://github.com/nvimtools/none-ls-extras.nvim/";
}
)
# -------------------
# ----- Silicon -----
# -------------------
(
pkgs.vimUtils.buildVimPlugin {
pname = "silicon.lua";
version = "2022-12-03";
src = pkgs.fetchFromGitHub {
owner = "mhanberg";
repo = "silicon.lua";
rev = "5ca462bee0a39b058786bc7fbeb5d16ea49f3a23";
sha256 = "0vlp645d5mmii513v72jca931miyrhkvhwb9bfzhix1199zx7vi2";
};
meta.homepage = "https://github.com/mhanberg/silicon.lua/";
}
)
# -------------------
# ------- LLM -------
# -------------------
(
pkgs.vimUtils.buildVimPlugin {
pname = "llm.nvim";
version = "2024-05-25";
src = pkgs.fetchFromGitHub {
owner = "David-Kunz";
repo = "gen.nvim";
rev = "bd19cf584b5b82123de977b44105e855e61e5f39";
sha256 = "sha256-0AEB6im8Jz5foYzmL6KEGSAYo48g1bkFpjlCSWT6JeE=";
};
meta.homepage = "https://github.com/David-Kunz/gen.nvim/";
}
)
# -------------------
# ---- LLAMA.VIM ----
# -------------------
(
pkgs.vimUtils.buildVimPlugin {
pname = "llama.vim";
version = "2025-01-23";
src = pkgs.fetchFromGitHub {
owner = "ggml-org";
repo = "llama.vim";
rev = "143fe910b8d47a054ed464c38d8b7c17d5354468";
sha256 = "sha256-PW0HKzhSxcZiWzpDOuy98rl/X0o2nE7tMjZjwwh0qLE=";
};
meta.homepage = "https://github.com/ggml-org/llama.vim/";
}
)
];
extraPackages = with pkgs; [
# Telescope Dependencies
fd
ripgrep
tree-sitter
# LSP Dependencies
go
golangci-lint
golangci-lint-langserver
gopls
lua-language-server
nil
nodePackages.eslint
nodePackages.svelte-language-server
nodePackages.typescript
nodePackages.typescript-language-server
nodePackages.vscode-langservers-extracted
pyright
eslint_d
# Formatters
luaformatter
nixpkgs-fmt
nodePackages.prettier
sqlfluff
stylua
# Silicon
silicon
];
extraConfig = ":luafile ~/.config/nvim/lua/init.lua";
};
xdg.configFile = {
# Copy Configuration
nvim = {
source = ./config;
recursive = true;
};
# Generate Nix Vars
"nvim/lua/nix-vars.lua".text = ''
local nix_vars = {
gopls = "${pkgs.gopls}/bin/gopls",
luals = "${pkgs.lua-language-server}/bin/lua-language-server",
sveltels = "${pkgs.nodePackages.svelte-language-server}/bin/svelteserver",
tsls = "${pkgs.nodePackages.typescript-language-server}/bin/typescript-language-server",
golintls = "${pkgs.golangci-lint-langserver}/bin/golangci-lint-langserver",
vscls = "${pkgs.nodePackages.vscode-langservers-extracted}",
}
return nix_vars
'';
};
}

View File

@ -4,21 +4,21 @@ let
inherit (pkgs.stdenv) isLinux isDarwin;
in
{
imports = [
./bash
./btop
./direnv
./fastfetch
./ghostty
./git
./nvim
./powerline
./readline
./hyprland
./waybar
];
reichardnix = {
programs.nvim.enable = true;
programs.ghostty.enable = true;
programs.git.enable = true;
};
# Home Manager Config
home.stateVersion = "24.11";
home.username = "evanreichard";
@ -27,24 +27,24 @@ in
# Global Packages
home.packages = with pkgs; [
(nerdfonts.override { fonts = [ "Meslo" ]; })
# ghostty - Pending Darwin @ https://github.com/NixOS/nixpkgs/pull/369788
# --- Android Dev ---
android-tools
awscli2
bashInteractive
# --- AWS ---
cw
fastfetch
gitAndTools.gh
google-cloud-sdk
imagemagick
awscli2
ssm-session-manager-plugin
# --- Kubernetes ---
kubectl
kubernetes-helm
# --- Uncategorized ---
imagemagick
mosh
pre-commit
python311
ssm-session-manager-plugin
texliveSmall # Pandoc PDF Dep
thefuck
google-cloud-sdk
tldr
]
++ optionals isLinux [
@ -54,14 +54,6 @@ in
]
++ optionals isDarwin [ ];
# GitHub CLI
programs.gh = {
enable = true;
settings = {
git_protocol = "ssh";
};
};
# Misc Programs
programs.jq.enable = true;
programs.k9s.enable = true;

View File

@ -0,0 +1,75 @@
{ pkgs, ... }:
let
inherit (pkgs.lib) mkForce;
inherit (pkgs.stdenv) isLinux;
in
{
reichardnix = {
programs.nvim.enable = true;
};
# Home Manager Config
home.stateVersion = "24.11";
home.username = "evanreichard";
home.homeDirectory = mkForce (if isLinux then "/home/evanreichard" else "/Users/evanreichard");
programs.home-manager.enable = true;
# Global Packages
# home.packages = with pkgs; [
# (nerdfonts.override { fonts = [ "Meslo" ]; })
# # ghostty - Pending Darwin @ https://github.com/NixOS/nixpkgs/pull/369788
# android-tools
# awscli2
# bashInteractive
# cw
# fastfetch
# gitAndTools.gh
# google-cloud-sdk
# imagemagick
# kubectl
# kubernetes-helm
# mosh
# pre-commit
# python311
# ssm-session-manager-plugin
# texliveSmall # Pandoc PDF Dep
# thefuck
# tldr
# ]
# ++ optionals isLinux [
# ghostty
# hyprpaper
# firefox
# ]
# ++ optionals isDarwin [ ];
# # GitHub CLI
# programs.gh = {
# enable = true;
# settings = {
# git_protocol = "ssh";
# };
# };
# # Misc Programs
# programs.jq.enable = true;
# programs.k9s.enable = true;
# programs.pandoc.enable = true;
# # Enable Flakes & Commands
# nix = {
# package = mkForce pkgs.nix;
# settings = {
# experimental-features = "nix-command flakes";
# };
# };
# # SQLite Configuration
# home.file.".sqliterc".text = ''
# .headers on
# .mode column
# '';
# # Darwin Spotlight Indexing Hack
# disabledModules = [ "targets/darwin/linkapps.nix" ];
}

View File

@ -1,4 +1,4 @@
command = bash --login
command = @BASH_PATH@ --login
macos-titlebar-style = tabs
auto-update = off
font-family = "MesloLGM Nerd Font Mono"

View File

@ -0,0 +1,49 @@
{ pkgs, lib, config, namespace, ... }:
let
inherit (lib) mkIf;
cfg = config.${namespace}.programs.ghostty;
in
{
options.${namespace}.programs.ghostty = {
enable = lib.mkEnableOption "Ghostty";
};
config = mkIf cfg.enable {
programs.bash = {
enable = true;
shellAliases = {
grep = "grep --color";
ssh = "TERM=xterm-256color ssh";
flush_dns = "sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder";
};
profileExtra = ''
SHELL="$BASH"
PATH=~/.bin:$PATH
eval "$(thefuck --alias)"
set -o vi
bind "set show-mode-in-prompt on"
fastfetch
'';
};
home.packages = with pkgs; [
# Pending Darwin @ https://github.com/NixOS/nixpkgs/pull/369788
# ghostty
thefuck
fastfetch
bashInteractive
(nerdfonts.override { fonts = [ "Meslo" ]; })
];
home.file.".config/fastfetch/config.jsonc".text = builtins.readFile ./config/fastfetch.jsonc;
home.file.".config/ghostty/config".text =
let
bashPath = "${pkgs.bashInteractive}/bin/bash";
in
builtins.replaceStrings
[ "@BASH_PATH@" ]
[ bashPath ]
(builtins.readFile ./config/ghostty.conf);
};
}

View File

@ -0,0 +1,95 @@
{ pkgs, lib, config, namespace, ... }:
let
inherit (lib) mkIf;
cfg = config.${namespace}.programs.git;
in
{
options.${namespace}.programs.git = {
enable = lib.mkEnableOption "Git";
};
config = mkIf cfg.enable {
programs.git = {
enable = true;
userName = "Evan Reichard";
aliases = {
lg = "log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all -n 15";
};
includes = [
{
path = "~/.config/git/work";
condition = "gitdir:~/Development/git/work/";
}
{
path = "~/.config/git/personal";
condition = "gitdir:~/Development/git/personal/";
}
];
extraConfig = {
core = {
autocrlf = "input";
safecrlf = "true";
excludesFile = "~/.config/git/.gitignore";
};
column = {
ui = "auto";
};
fetch = {
prune = true;
pruneTags = true;
all = true;
};
help = {
autocorrect = true;
};
diff = {
algorithm = "histogram";
colorMoved = "plain";
mnemonicPrefix = true;
renames = true;
};
rebase = {
autoSquash = true;
autoStash = true;
updateRefs = true;
};
rerere = {
enabled = true;
autoupdate = true;
};
commit = {
verbose = true;
};
branch = {
sort = "-committerdate";
};
merge = {
conflictstyle = "zdiff3";
};
push = {
autoSetupRemote = true;
};
};
};
programs.gh = {
enable = true;
settings = {
git_protocol = "ssh";
};
};
home.packages = with pkgs; [
gitAndTools.gh
pre-commit
];
# Copy Configuration
xdg.configFile = {
git = {
source = ./config;
recursive = true;
};
};
};
}

View File

@ -0,0 +1,203 @@
{ pkgs, lib, config, namespace, ... }:
let
inherit (lib) mkIf;
cfg = config.${namespace}.programs.nvim;
in
{
options.${namespace}.programs.nvim = {
enable = lib.mkEnableOption "NeoVim";
};
config = mkIf cfg.enable {
programs.neovim = {
enable = true;
viAlias = true;
vimAlias = true;
withNodeJs = true;
withPython3 = true;
plugins = with pkgs.vimPlugins; [
# ------------------
# --- Completion ---
# ------------------
cmp-buffer # Buffer Word Completion
cmp-cmdline # Command Line Completion
cmp-nvim-lsp # Main LSP
cmp-path # Path Completion
cmp_luasnip # Snippets Completion
friendly-snippets # Snippets
lsp_lines-nvim # Inline Diagnostics
luasnip # Snippets
nvim-cmp # Completions
nvim-lspconfig # LSP Config
# -------------------
# ----- Helpers -----
# -------------------
aerial-nvim # Code Outline
comment-nvim # Code Comments
diffview-nvim # Diff View
gitsigns-nvim # Git Blame
leap-nvim # Quick Movement
markdown-preview-nvim # Markdown Preview
neo-tree-nvim # File Explorer
none-ls-nvim # Formatters
numb-nvim # Peek / Jump to Lines
nvim-autopairs # Automatically Close Pairs (),[],{}
telescope-fzf-native-nvim # Faster Telescope
telescope-nvim # Fuzzy Finder
telescope-ui-select-nvim # UI
toggleterm-nvim # Terminal Helper
vim-nix # Nix Helpers
which-key-nvim # Shortcut Helper
# ------------------
# --- Theme / UI ---
# ------------------
lualine-nvim # Bottom Line
noice-nvim # UI Tweaks
# nord-nvim # Theme
melange-nvim # Theme
nvim-notify # Noice Dependency
nvim-web-devicons # Dev Icons
# ------------------
# --- Treesitter ---
# ------------------
nvim-treesitter-context
nvim-treesitter.withAllGrammars
# -------------------
# ------- DAP -------
# -------------------
nvim-dap
nvim-dap-go
nvim-dap-ui
# --------------------
# -- NONE-LS EXTRAS --
# --------------------
(
pkgs.vimUtils.buildVimPlugin {
pname = "none-ls-extras.nvim";
version = "2024-06-11";
src = pkgs.fetchFromGitHub {
owner = "nvimtools";
repo = "none-ls-extras.nvim";
rev = "336e84b9e43c0effb735b08798ffac382920053b";
sha256 = "sha256-UtU4oWSRTKdEoMz3w8Pk95sROuo3LEwxSDAm169wxwk=";
};
meta.homepage = "https://github.com/nvimtools/none-ls-extras.nvim/";
}
)
# -------------------
# ----- Silicon -----
# -------------------
(
pkgs.vimUtils.buildVimPlugin {
pname = "silicon.lua";
version = "2022-12-03";
src = pkgs.fetchFromGitHub {
owner = "mhanberg";
repo = "silicon.lua";
rev = "5ca462bee0a39b058786bc7fbeb5d16ea49f3a23";
sha256 = "0vlp645d5mmii513v72jca931miyrhkvhwb9bfzhix1199zx7vi2";
};
meta.homepage = "https://github.com/mhanberg/silicon.lua/";
}
)
# -------------------
# ------- LLM -------
# -------------------
(
pkgs.vimUtils.buildVimPlugin {
pname = "llm.nvim";
version = "2024-05-25";
src = pkgs.fetchFromGitHub {
owner = "David-Kunz";
repo = "gen.nvim";
rev = "bd19cf584b5b82123de977b44105e855e61e5f39";
sha256 = "sha256-0AEB6im8Jz5foYzmL6KEGSAYo48g1bkFpjlCSWT6JeE=";
};
meta.homepage = "https://github.com/David-Kunz/gen.nvim/";
}
)
# -------------------
# ---- LLAMA.VIM ----
# -------------------
(
pkgs.vimUtils.buildVimPlugin {
pname = "llama.vim";
version = "2025-01-23";
src = pkgs.fetchFromGitHub {
owner = "ggml-org";
repo = "llama.vim";
rev = "143fe910b8d47a054ed464c38d8b7c17d5354468";
sha256 = "sha256-PW0HKzhSxcZiWzpDOuy98rl/X0o2nE7tMjZjwwh0qLE=";
};
meta.homepage = "https://github.com/ggml-org/llama.vim/";
}
)
];
extraPackages = with pkgs; [
# Telescope Dependencies
fd
ripgrep
tree-sitter
# LSP Dependencies
go
golangci-lint
golangci-lint-langserver
gopls
lua-language-server
nil
nodePackages.eslint
nodePackages.svelte-language-server
nodePackages.typescript
nodePackages.typescript-language-server
nodePackages.vscode-langservers-extracted
pyright
eslint_d
# Formatters
luaformatter
nixpkgs-fmt
nodePackages.prettier
sqlfluff
stylua
# Silicon
silicon
];
extraConfig = ":luafile ~/.config/nvim/lua/init.lua";
};
xdg.configFile = {
# Copy Configuration
nvim = {
source = ./config;
recursive = true;
};
# Generate Nix Vars
"nvim/lua/nix-vars.lua".text = ''
local nix_vars = {
gopls = "${pkgs.gopls}/bin/gopls",
luals = "${pkgs.lua-language-server}/bin/lua-language-server",
sveltels = "${pkgs.nodePackages.svelte-language-server}/bin/svelteserver",
tsls = "${pkgs.nodePackages.typescript-language-server}/bin/typescript-language-server",
golintls = "${pkgs.golangci-lint-langserver}/bin/golangci-lint-langserver",
vscls = "${pkgs.nodePackages.vscode-langservers-extracted}",
}
return nix_vars
'';
};
};
}