#W# Initial Commit: NixOS

This commit is contained in:
WarrentyExpired 2026-07-30 09:20:57 -04:00
commit f79adc1a63
77 changed files with 15125 additions and 0 deletions

View file

@ -0,0 +1,107 @@
{ config, pkgs, ... }: {
programs.fastfetch = {
enable = true;
settings = {
display = {
separator = " -> ";
};
modules = [
{
type = "custom";
format = "{#90}╭─────────────────────────────────────────────────╮";
}
{ type = "title"; }
{
type = "custom";
format = "{#90}╰─────────────────────────────────────────────────╯";
}
{
type = "custom";
format = "{#90}╭─────────────────────────────────────────────────┐";
}
# OS and Software Info
{
type = "os";
key = " OS";
format = "{pretty-name}";
keyColor = "36";
}
{
type = "kernel";
key = "│ ├ Kernel";
keyColor = "36";
}
{
type = "uptime";
key = "│ ├󰅐 Uptime";
keyColor = "36";
}
{
type = "packages";
key = "│ ├󰏖 Packages";
keyColor = "36";
}
{
type = "shell";
key = "│ ├ Shell";
keyColor = "36";
}
{
type = "wm";
key = "│ ├ WM";
keyColor = "36";
}
{
type = "terminal";
key = "│ └ Terminal";
keyColor = "36";
}
# Hardware Info
{
type = "host";
key = " PC";
keyColor = "green";
}
{
type = "cpu";
key = "│ ├ CPU";
keyColor = "green";
}
{
type = "gpu";
key = "│ ├󰍛 GPU";
keyColor = "green";
}
{
type = "disk";
key = "│ ├ Disk";
keyColor = "green";
}
{
type = "memory";
key = "│ ├󰑭 RAM";
keyColor = "green";
}
{
type = "swap";
key = "│ ├󰓡 Swap";
keyColor = "green";
}
{
type = "display";
key = "│ └󰍹 Monitor";
keyColor = "green";
}
{
type = "custom";
format = "{#90}╰─────────────────────────────────────────────────╯";
}
"break"
{
type = "custom";
format = "{#90}╰─────────{#90} {#31} {#32} {#33} {#34} {#35} {#36} {#37} {#38} {#39} {#90} ─────────╯";
}
];
};
};
}

289
home-manager/modules/fish.nix Executable file
View file

@ -0,0 +1,289 @@
{ config, pkgs, ... }: {
programs.fish = {
enable = true;
interactiveShellInit = ''
set fish_greeting ""
set -gx DOTNET_ROOT $HOME/.dotnet
fish_add_path $DOTNET_ROOT
fish_add_path $DOTNET_ROOT/tools
set -gx DOTNET_SYSTEM_NET_DISABLEIPV6 1
bind \cd\cd\cd delete-or-exit
bind \cf 'ts; commandline -f repaint'
if type -q eza
alias ls='eza --color=always --group-directories-first --icons'
alias ll='eza -a --color=always --group-directories-first --icons'
alias la='eza -al --group-directories-first --icons'
alias lt='eza -aT --level=2 --group-directories-first --icons'
alias l.='eza -ad .* --group-directories-first --icons'
else
printf "You may want to install eza\n"
end
if not set -q TMUX
tmux attach-session -t Main 2>/dev/null; or tmux new-session -s Main
end
'';
shellAliases = {
rebuild = "sudo nixos-rebuild switch --flake $HOME/NixOS#damagedProperty";
hms = "home-manager switch";
sshavatar = "ssh warrentyexpired@192.168.88.111";
sshvaultnas = "ssh warrentyexpired@192.168.88.100";
sshservarr = "ssh warrentyexpired@192.168.88.101";
sshdocker = "ssh warrentyexpired@192.168.88.102";
sshlive = "ssh mementoadmin@uo-memento.com";
sshproxy = "ssh warrentyexpired@192.168.88.200";
stff = "mpv --autofit=10%";
s = "goto s";
g = "goto g";
l = "goto l";
mv = "mv -i --backup=t";
cat = "bat";
};
shellAbbrs = {
sshracknerd = ''mosh -p 60001 192.227.229.130 --ssh="ssh -p 5522"'';
};
functions = {
ts = {
description = "Tmux session manager with fuzzy search and quick jump";
body = ''
echo -e ""
# 1. Show Active Sessions
set -l active_sessions (tmux list-sessions 2>/dev/null)
if test -n "$active_sessions"
echo -e (set_color 99ff99)"󱫟 Active Sessions:"(set_color normal)
for line in $active_sessions
echo -e " $line"
end
echo ""
else
echo -e (set_color 555555)"(No active sessions)"(set_color normal)
echo ""
end
# 2. Provide choices
echo -e (set_color 00afaf)"󰒓 Select an option:"(set_color normal)
echo -e " [1] Pick from active sessions (Fuzzy search)"
echo -e " [2] Create NEW custom session"
echo -e " [w] Enter Tmuxinator Workspaces"
echo -e " [d] Detach from current session"
echo -e " [x] Kill a session"
echo -e " [Enter] Quick jump to "(set_color -o)"Main"(set_color normal)
echo ""
read -l -P "Choice > " choice
switch "$choice"
case 1
set -l session (tmux list-sessions -F "#{session_name}" 2>/dev/null | fzf --exit-0 --height=15% --reverse --header="Select Session")
if test -n "$session"
if set -q TMUX
tmux switch-client -t "$session"
else
tmux attach-session -t "$session"
end
end
case 2
read -l -P "Enter name for new session: " new_name
if test -n "$new_name"
env -u TMUX tmux new-session -d -s "$new_name" 2>/dev/null
if set -q TMUX
tmux switch-client -t "$new_name"
else
tmux attach-session -t "$new_name"
end
end
case d D
if set -q TMUX; tmux detach-client; else; echo "You aren't in a tmux session!"; end
case w W
if type -q tmuxinator
tmuxinator start Workspace
else
echo (set_color red)"Error: tmuxinator is not installed."(set_color normal)
end
case x X
set -l session (tmux list-sessions -F "#{session_name}" 2>/dev/null | fzf --exit-0 --height=15% --reverse --header="Select Session to KILL")
if test -n "$session"
tmux kill-session -t "$session"
echo "Killed session: $session"
ts
end
case "" "*"
env -u TMUX tmux new-session -d -s Main 2>/dev/null
if set -q TMUX; tmux switch-client -t Main; else; tmux attach-session -t Main; end
end
commandline -f repaint
'';
};
lookfor = {
description = "Lookfor (d)irectory, (f)ile (a)ll (pattern)";
body = ''
if test (count $argv) -lt 2
echo "Usage: lookfor (f)ile|(d)irectory|(a)ll "pattern""
return 1
end
set -l type_flag $argv[1]
set -l pattern $argv[2]
switch $type_flag
case f
find . -type f -name "*$pattern*" 2>/dev/null
case d
find . -type d -name "*$pattern*" 2>/dev/null
case a
find . -name "*$pattern*" 2>/dev/null
case *
echo "Invalid type: $type_flag. Use f for file or d for directory."
return 1
end
'';
};
topsort = {
description = "Sort files large to small.";
body = ''
du -sh * | sort -rh | head -10
'';
};
fish_prompt = {
body = ''
set -l white (set_color white)
set -l brwhite (set_color brwhite)
set -l green (set_color green)
set -l red (set_color red)
set -l blue (set_color blue)
# Line 1: ┌─ [user] @ [host] - homeFiles status
echo -s $white"┌─ ["$green$USER$white"] "$brwhite"@ " $white"["$red$hostname$white"]"
# Line 2: └─ [directory]
set -l full_path (string replace -r "^$HOME" "~" $PWD)
echo -s $white"├─ ["$blue$full_path$white"]"
# Line 3: └─ [(git_branch)] or [$e]
echo -n $white"└─ ["
set -l git_info (gitinfo 2>/dev/null)
if test -n "$git_info"
echo -n $git_info
else
echo -n $brwhite"\$"
end
echo -n $white"]"
# Final prompt symbol and reset
echo -n $brwhite" "
set_color normal
'';
};
gitinfo = {
body = ''
if git rev-parse --is-inside-work-tree >/dev/null 2>&1
set -l branch (git branch --show-current)
set -l staged ""
set -l dirty ""
set -l untracked ""
if not git diff --quiet
set dirty (set_color yellow)"*"
end
if not git diff --cached --quiet
set staged (set_color green)"+"
end
set -l untracked_files (git ls-files --others --exclude-standard)
if test -n "$untracked_files"
set untracked (set_color red)" *"
end
echo (set_color magenta)"($branch)"$staged$dirty$untracked(set_color normal)
end
'';
};
cdtmp = {
body = ''
set -l directory
if set -q argv[1]
set -l folder_name (string replace -all / _ $argv[1])
set directory "/var/tmp/cdtmp.$folder_name"
mkdir -p "$directory"
else
set directory (mktemp -d --tmpdir=/var/tmp cdtmp.XXXXXXXX)
end
if test -d "$directory"
cd "$directory"
end
'';
};
stffpl = {
body = ''
mpv --autofit=10% --playlist="$argv[1]"
'';
};
mkcd = {
body = ''
mkdir -p $argv
and cd $argv[-1]
'';
};
goto = {
body = ''
set -l gotoConfig "$HOME/.config/goto/bookmarks"
set -l gotoDir "$HOME/.config/goto"
mkdir -p "$gotoDir"
touch "$gotoConfig"
set -l command $argv[1]
set -l bookmark_name $argv[2]
if test -z "$command"
echo "Usage: goto s <name> (save current directory)"
echo " goto g <name> (go to saved directory)"
echo " goto d <name> (delete a bookmark)"
echo " goto l (list all bookmarks)"
echo " goto e (edit bookmarks file)"
return
end
switch $command
case s # Save bookmarks
if test -z "$bookmark_name"
echo "Error: Must provide a bookmark name to save."
return 1
end
sed -i "/^$bookmark_name:/d" "$gotoConfig"
echo "$bookmark_name:"(pwd) >> "$gotoConfig"
echo "Bookmark **$bookmark_name** saved to: **"(pwd)"**"
case g # Go to bookmark
if test -z "$bookmark_name"
echo "Error: Must provide a bookmark name to go to."
return 1
end
set -l target_path (grep "^$bookmark_name:" "$gotoConfig" | cut -d ':' -f 2)
if test -z "$target_path"
echo "Error: Bookmark **$bookmark_name** not found."
return 1
end
if test -d "$target_path"
cd "$target_path"
echo "Jumping to: **$target_path**"
else
echo "Error: Directory **$target_path** does not exist or is not a directory"
end
case d # Delete bookmark
if test -z "$bookmark_name"
echo "Error: Must provide a bookmark name to delete."
return 1
end
if grep -q "^$bookmark_name:" "$gotoConfig"
sed -i "/^$bookmark_name:/d" "$gotoConfig"
echo "Bookmark **$bookmark_name** deleted."
else
echo "Error: Bookmark **$bookmark_name** not found."
return 1
end
case e # Edit bookmarks file
if set -q EDITOR
$EDITOR "$gotoConfig"
else
nano "$gotoConfig"
end
case l # List bookmarks
if not test -s "$gotoConfig"
echo "No bookmarks saved yet."
return 0
end
echo "___ **Bookmarks** (Stored in: $gotoDir) ___"
column -t -s ':' "$gotoConfig"
case '*'
echo "Invalid command: $command"
goto # Show usage
end
'';
};
};
};
}

27
home-manager/modules/fuzzel.nix Executable file
View file

@ -0,0 +1,27 @@
{ pkgs, ... }: {
programs.fuzzel = {
enable = true;
settings = {
main = {
font = "JetBrainsMono Nerd Font:size=16"; # Thin often maps to weight in Nix
dpi-aware = "no";
terminal = "${pkgs.ghostty}/bin/ghostty";
lines = 20;
width = 50;
icons-enabled = "yes";
icon-theme = "Papirus-Nord";
};
colors = {
background = "121212ee";
text = "ffffffff";
selection = "444444ee";
selection-text = "acbeb1ff";
border = "3c4541ff";
};
border = {
radius = 5;
width = 2; # Added a small width so your border color actually shows
};
};
};
}

View file

@ -0,0 +1,56 @@
{ config, pkgs, ... }: {
home.file.".config/ghostty/config".text = ''
# Font Configuration
font-size = 12
# Window Configuration
window-decoration = false
window-padding-x = 12
window-padding-y = 12
background-opacity = 0.90
background-blur-radius = 32
# Cursor Configuration
cursor-style = block
cursor-style-blink = true
# Scrollback
scrollback-limit = 3023
# Terminal features
mouse-hide-while-typing = true
copy-on-select = false
confirm-close-surface = false
# Disable annoying copied to clipboard
app-notifications = no-clipboard-copy,no-config-reload
# Key bindings
keybind = ctrl+shift+n=new_window
keybind = ctrl+t=new_tab
keybind = ctrl+plus=increase_font_size:1
keybind = ctrl+minus=decrease_font_size:1
keybind = ctrl+zero=reset_font_size
# Material 3 UI elements
unfocused-split-opacity = 0.7
unfocused-split-fill = #44464f
# Tab configuration
gtk-titlebar = false
# Shell integration
shell-integration = detect
shell-integration-features = cursor,sudo,title,no-cursor
keybind = shift+enter=text:\n
# Rando stuff
gtk-single-instance = true
# Dank color generation
config-file = ./themes/dankcolors
'';
home.packages = with pkgs; [
ghostty
];
}

View file

@ -0,0 +1,9 @@
{ config, pkgs, ... }: {
imports = [
./options.nix
./plugins.nix
./keymaps.nix
./init.nix
./neovim.nix
];
}

View file

@ -0,0 +1,7 @@
{ pkgs, ... }: {
xdg.configFile."nvim/init.lua".text = ''
require("options")
require("keymaps")
require("plugins")
'';
}

View file

@ -0,0 +1,23 @@
{ ... }: {
xdg.configFile."nvim/lua/keymaps.lua".text = ''
vim.g.mapleader = " "
vim.g.maplocalleader = " "
local keymap = vim.keymap.set
keymap('n', '<leader>ps', ':Lazy<CR>')
keymap('n', '<leader>o', ':update<CR> :source<CR>')
keymap('n', '<leader>w', ':write<CR>')
keymap('n', '<leader>q', ':quit<CR>')
keymap('n', '<leader>QQ', ':q!<CR>')
keymap('n', '<leader>wq', ':wq<CR>')
keymap('n', '<leader>r', ':set wrap!<CR>')
keymap('n', '<leader>vs', ':vsplit<CR>')
keymap('n', '<leader>hs', ':split<CR>')
keymap('n', '<Tab>', ':bnext<CR>')
keymap('n', '<leader>e', ':Oil --float<CR>')
keymap('n', '<leader>b', ':Telescope buffers<CR>')
keymap('n', '<leader>ff', ':Telescope find_files<CR>')
keymap('n', '<leader>fg', ':Telescope live_grep<CR>')
keymap('n', '<leader>n', ':set nonumber norelativenumber<CR>')
'';
}

View file

@ -0,0 +1,18 @@
{ pkgs, ... }: {
programs.neovim = {
enable = true;
defaultEditor = true;
extraPackages = with pkgs; [
lua-language-server
nil
gcc
gnumake
unzip
wget
curl
ripgrep
fd
lua-language-server
];
};
}

View file

@ -0,0 +1,22 @@
{ ... }: {
xdg.configFile."nvim/lua/options.lua".text = ''
local opt = vim.opt
opt.showmode = false
opt.number = true
opt.relativenumber = true
opt.tabstop = 4
opt.shiftwidth = 4
opt.expandtab = true
opt.autoindent = true
opt.smartindent = true
opt.termguicolors = true
opt.background = "dark"
opt.signcolumn = "yes"
opt.cursorline = true
opt.listchars = "tab: ,multispace:| ,eol:󰌑"
opt.list = true
opt.winborder = "rounded"
opt.backspace = "indent,eol,start"
opt.clipboard:append("unnamedplus")
'';
}

View file

@ -0,0 +1,135 @@
{ pkgs, ... }: {
xdg.configFile."nvim/lua/plugins.lua".text = ''
-- 1. Bootstrap lazy.nvim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable",
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
-- 2. Setup Plugins
require("lazy").setup({
spec = {
-- Colorschemes
{ "RomanAverin/charleston.nvim", priority = 1000 },
-- Status line
{
'nvim-lualine/lualine.nvim',
dependencies = { 'nvim-tree/nvim-web-devicons' },
config = function()
require('lualine').setup({
options = {
theme = 'charleston', -- It should pick up your theme automatically
component_separators = { left = '', right = ''},
section_separators = { left = '', right = ''},
globalstatus = true, -- Nice modern single bar at the bottom
},
sections = {
lualine_a = {'mode'},
lualine_b = {'branch', 'diff', 'diagnostics'},
lualine_c = {'filename'},
lualine_x = {'encoding', 'fileformat', 'filetype'},
lualine_y = {'progress'},
lualine_z = {'location'}
},
})
end
},
-- Completion & UI
{
'saghen/blink.cmp',
dependencies = 'rafamadriz/friendly-snippets',
version = '*',
opts = {
keymap = { preset = 'default' },
appearance = {
use_nvim_cmp_as_default = true,
nerd_font_variant = 'mono'
},
sources = {
default = { 'lsp', 'path', 'snippets', 'buffer' },
},
}
},
-- LSP Configuration (Updated for Neovim 0.11+)
{
"neovim/nvim-lspconfig",
dependencies = { 'saghen/blink.cmp' },
config = function()
-- In Neovim 0.11, we use the native vim.lsp.config API
local capabilities = require('blink.cmp').get_lsp_capabilities()
-- List the servers you want to enable
local servers = { "lua_ls", "nil_ls" }
for _, server in ipairs(servers) do
vim.lsp.config(server, {
install = {
-- This prevents lspconfig from trying to install things
-- since Nix is handling the binaries
enabled = false,
},
capabilities = capabilities,
})
-- Enable the server
vim.lsp.enable(server)
end
end
},
-- Navigation & Files
{ "stevearc/oil.nvim", opts = { default_file_explorer = true } },
{
"nvim-telescope/telescope.nvim",
dependencies = { "nvim-lua/plenary.nvim" }
},
-- Dashboard Configuration
{
"nvimdev/dashboard-nvim",
event = "VimEnter",
config = function()
local dashboard = require("dashboard")
dashboard.setup({
theme = "doom",
config = {
header = {
" ",
" ███╗ ██╗ ███████╗ ██████╗ ██╗ ██╗ ██╗ ███╗ ███╗",
" ████╗ ██║ ██╔════╝██╔═══██╗ ██║ ██║ ██║ ████╗ ████║",
" ██╔██╗ ██║ █████╗ ██║ ██║ ██║ ██║ ██║ ██╔████╔██║",
" ██║╚██╗██║ ██╔══╝ ██║ ██║ ╚██╗ ██╔╝ ██║ ██║╚██╔╝██║",
" ██║ ╚████║ ███████╗╚██████╔╝ ╚████╔╝ ██║ ██║ ╚═╝ ██║",
" ╚═╝ ╚═══╝ ╚══════╝ ╚═════╝ ╚═══╝ ╚═╝ ╚═╝ ╚═╝",
" ",
},
center = {
{ icon = " ", icon_hl = "@variable", desc = "New File", key = "n", action = "enew" },
{ icon = " ", icon_hl = "@variable", desc = "File Explorer", key = "e", action = "Oil --float" },
{ icon = "󰮗 ", icon_hl = "@variable", desc = "Find File", key = "f", action = "Telescope find_files" },
{ icon = " ", icon_hl = "@variable", desc = "Find Text", key = "t", action = "Telescope live_grep" },
{ icon = "󰗼 ", icon_hl = "@variable", desc = "Quit", key = "q", action = "qa" },
},
footer = { "v" .. vim.version().major .. "." .. vim.version().minor },
},
})
end
},
},
install = { colorscheme = { "charleston" } },
checker = { enabled = true }, -- automatically check for plugin updates
})
-- Final Theme Load
vim.cmd("colorscheme charleston")
'';
}

View file

@ -0,0 +1,18 @@
{ pkgs, ... }:
let
# This packages your script and its dependencies
nerdfont-search = pkgs.writeShellScriptBin "nfPicker" ''
# We reference the CSV file.
# If you put nerdfont.csv in the same folder as this nix file:
CSV_PATH="${../files/nerdfont.csv}"
# Run the pipeline using packages from the Nix store
cat "$CSV_PATH" | ${pkgs.fuzzel}/bin/fuzzel -d | ${pkgs.gawk}/bin/gawk -F, '{printf $3}' | ${pkgs.wl-clipboard}/bin/wl-copy
${pkgs.wl-clipboard}/bin/wl-paste
'';
in
{
home.packages = [
nerdfont-search
];
}

44
home-manager/modules/tmux.nix Executable file
View file

@ -0,0 +1,44 @@
{ config, pkgs, ... }: {
programs.tmux = {
enable = true;
baseIndex = 1;
escapeTime = 0;
historyLimit = 10000;
mouse = true;
keyMode = "vi"; # Optional: sets vi mode for copy/paste
shortcut = "Space"; # Sets Prefix to Ctrl+Space
plugins = with pkgs; [
tmuxPlugins.sensible
tmuxPlugins.yank
];
extraConfig = ''
set -g renumber-windows on
set -g detach-on-destroy off
set -g set-clipboard on
unbind r
bind r source-file ~/.config/tmux/tmux.conf
bind h split-window -v -c "#{pane_current_path}"
bind v split-window -h -c "#{pane_current_path}"
bind X confirm-before -p "Kill session #S (y/n)" kill-session
set -g status-position top
set -g status-style "bg=default"
set -g status-justify "absolute-centre"
setw -g pane-border-status top
setw -g pane-border-format " "
setw -g pane-active-border-style "bg=default, fg=#E0E0E0"
setw -g pane-border-style "bg=default, fg=#E0E0E0"
setw -g pane-border-lines single
set -g window-status-current-format ""
set -g window-status-format ""
set -g window-status-separator ""
set -g status-left-length 100
set -g status-left "#{?client_prefix,#[fg=#CC0000] #S ,#[fg=#CCCC00] #S, #[fg=#66CC00] #S }"
set -ga status-left "#[bg=default,fg=#e0e0e0,none]│"
set -ga status-left "#[bg=default,fg=#e0e0e0] #{pane_current_command} "
set -ga status-left "#[bg=default,fg=#e0e0e0,none]│"
set -ga status-left "#[bg=default,fg=#0080ff] #{=/-32/...:#{s|/home/$USER|~|:pane_current_path}} "
set -g status-right ""
set -g status-right-length 0
'';
};
}