16 Commits

Author SHA1 Message Date
f81c5889d8 Merge pull request 'Unstable' (#1) from Unstable into master
Reviewed-on: #1
2025-08-30 13:41:13 -04:00
9332469636 Updated server settings, pulling nvim from repo 2025-08-30 13:39:27 -04:00
693cbd3798 Pre switch to unstable 2025-08-26 10:09:30 -04:00
2d2799ebdf Added neovide 2025-08-24 12:40:01 -04:00
761525421d Refactored home and hardware files, and added new plugins to neovim. 2025-08-24 11:38:11 -04:00
1564a9f1ec Removed udisks 2025-08-23 16:43:44 -04:00
2e2d7f679b Fixed home-xps13 2025-08-22 22:24:28 -04:00
9ac155a7e2 Added udisks and nemo 2025-08-22 22:20:49 -04:00
e31d00c7bf Added tmux command for man search 2025-08-22 22:19:22 -04:00
14bdf543be Fixed 2025-08-21 12:45:26 -04:00
ac5652f1ca Moved shared packages to home-manager-common.nix
Packages listed in here will be installed on all hosts
2025-08-20 16:09:08 -04:00
7aa0e7334b Moved some configurations 2025-08-20 15:07:22 -04:00
b566e93b18 Conditional tmux formatting based on hostname 2025-08-20 15:02:42 -04:00
a906bcce3d fixed missing ; 2025-08-20 14:26:43 -04:00
16b1ad9724 Changed synthing listen address 2025-08-20 14:22:51 -04:00
8e9b4c3a66 Finished switching hostname to Titan 2025-08-20 14:08:08 -04:00
32 changed files with 498 additions and 1562 deletions

View File

@@ -1,135 +0,0 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
./server-partitioning.nix
./modules/configuration-common.nix
];
nix.settings.experimental-features = [ "nix-command" "flakes" ];
# Bootloader.
boot = {
kernelPackages = pkgs.linuxPackages_latest;
initrd.availableKernelModules = [
"xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"
];
kernelModules = [ "fuse" "cifs" ];
initrd.kernelModules = [ ];
loader.systemd-boot.enable = true;
loader.efi.canTouchEfiVariables = true;
supportedFilesystems = [ "vfat" "btrfs" "cifs" ];
extraModulePackages = [ ];
extraModprobeConfig = ''
'';
};
# Set your time zone.
time.timeZone = "America/New_York";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
# Enable the X11 windowing system.
# You can disable this if you're only using the Wayland session.
# services.xserver.enable = true;
# Enable the KDE Plasma Desktop Environment.
# services.displayManager.sddm.enable = true;
# services.desktopManager.plasma6.enable = true;
# Configure keymap in X11
# services.xserver.xkb = {
# layout = "us";
# variant = "";
# };
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable sound with pipewire.
services.pulseaudio.enable = false;
security.rtkit.enable = true;
# Enable touchpad support (enabled default in most desktopManager).
fonts = {
enableDefaultPackages = true;
fontDir.enable = true;
packages = with pkgs; [
];
};
# Define a user account. Don't forget to set a password with passwd.
users.users.th3r00t = {
isNormalUser = true;
description = "Mike 'th3r00t' Young";
extraGroups = [ "networkmanager" "wheel" "input" ];
packages = with pkgs; [
# kdePackages.kate
# thunderbird
];
};
# Enable automatic login for the user.
nixpkgs.config.allowUnfree = true;
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.variables.EDITOR = "nvim";
environment.systemPackages = with pkgs; [
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
# wget
git
vim
curl
age
];
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
programs.mtr.enable = true;
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
# List services that you want to enable:
# Enable the OpenSSH daemon.
services.openssh.enable = true;
users.users.root.openssh.authorizedKeys.keys =
[
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH8P/3yzsruekSaZ9b+yk429VTcfCtI1j8jnkNbPAgnr th3r00t@nixos"
];
# Open ports in the firewall.
networking.firewall.allowedTCPPorts = [ 21 22 80 443 5900 8080 ];
networking.firewall.allowedUDPPorts = [ 21 22 80 443 5900 8080 ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "25.05"; # Did you read the comment?
}

50
flake.lock generated
View File

@@ -166,20 +166,36 @@
]
},
"locked": {
"lastModified": 1753592768,
"narHash": "sha256-oV695RvbAE4+R9pcsT9shmp6zE/+IZe6evHWX63f2Qg=",
"lastModified": 1756022458,
"narHash": "sha256-J1i35r4HfNDdPpwL0vOBaZopQudAUVtartEerc1Jryc=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "fc3add429f21450359369af74c2375cb34a2d204",
"rev": "9e3a33c0bcbc25619e540b9dfea372282f8a9740",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-25.05",
"repo": "home-manager",
"type": "github"
}
},
"neovim-config": {
"flake": false,
"locked": {
"lastModified": 1756442459,
"narHash": "sha256-YfZ9KdGGnhG1t+7TKw3kbH6oUhvbchhpUxACasP87f8=",
"ref": "master",
"rev": "ee941c351daa870d4a40b933fe93ffb8459884f7",
"revCount": 2,
"type": "git",
"url": "https://git.th3r00t.net/th3r00t/nvim-config.git"
},
"original": {
"ref": "master",
"type": "git",
"url": "https://git.th3r00t.net/th3r00t/nvim-config.git"
}
},
"neovim-nightly-overlay": {
"inputs": {
"flake-compat": "flake-compat",
@@ -240,6 +256,22 @@
"type": "github"
}
},
"nixos-hardware": {
"locked": {
"lastModified": 1755330281,
"narHash": "sha256-aJHFJWP9AuI8jUGzI77LYcSlkA9wJnOIg4ZqftwNGXA=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "3dac8a872557e0ca8c083cdcfc2f218d18e113b0",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "master",
"repo": "nixos-hardware",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1752596105,
@@ -274,16 +306,16 @@
},
"nixpkgs_3": {
"locked": {
"lastModified": 1755078291,
"narHash": "sha256-Hu/gTDoi4uy6TAKISPHQusSMy8U6xUbLSDjKBYdhDIY=",
"lastModified": 1756125398,
"narHash": "sha256-XexyKZpf46cMiO5Vbj+dWSAXOnr285GHsMch8FBoHbc=",
"owner": "NixOs",
"repo": "nixpkgs",
"rev": "3385ca0cd7e14c1a1eb80401fe011705ff012323",
"rev": "3b9f00d7a7bf68acd4c4abb9d43695afb04e03a5",
"type": "github"
},
"original": {
"owner": "NixOs",
"ref": "nixos-25.05",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
@@ -292,8 +324,10 @@
"inputs": {
"disko": "disko",
"home-manager": "home-manager",
"neovim-config": "neovim-config",
"neovim-nightly-overlay": "neovim-nightly-overlay",
"nix-index-database": "nix-index-database",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_3",
"sops-nix": "sops-nix"
}

View File

@@ -2,9 +2,9 @@
description = "System Flake";
inputs = {
nixpkgs.url = "github:NixOs/nixpkgs/nixos-25.05";
nixpkgs.url = "github:NixOs/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager/release-25.05";
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-index-database.url = "github:nix-community/nix-index-database";
@@ -13,8 +13,24 @@
disko.url = "github:nix-community/disko";
sops-nix.url = "github:Mic92/sops-nix";
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
neovim-config = {
# pick ONE of these URLs:
# Public over HTTPS:
url = "git+https://git.th3r00t.net/th3r00t/nvim-config.git?ref=master";
# OR private over SSH (recommended if the repo is private):
# url = "git+ssh://git@git.th3r00t.net/th3r00t/nvim-config.git?ref=main";
flake = false;
};
};
outputs = { self, nixpkgs, home-manager, nix-index-database, sops-nix, disko, ... }@inputs:
outputs = {
self, nixpkgs, home-manager, nix-index-database, sops-nix, disko,
nixos-hardware, ...
}@inputs:
let
overlays = [
inputs.neovim-nightly-overlay.overlays.default
@@ -35,7 +51,9 @@
modules = [
{ nixpkgs.overlays = overlays; }
sops-nix.nixosModules.sops
./xps13-hardware-configuration.nix.nix
./modules/configuration-xps13.nix
./modules/hardware-configuration-xps13.nix
nixos-hardware.nixosModules.dell-xps-13-9370
home-manager.nixosModules.home-manager {
# home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
@@ -45,21 +63,25 @@
./home-xps13.nix
nix-index-database.homeModules.nix-index
];
home.file.".config/nvim" = {
source = inputs.neovim-config;
recursive = true;
executable = true;
};
};
# home-manager.users.th3r00t = import ./home.nix;
# Optionally, use home-manager.extraSpecialArgs to pass arguments to home.nix
}
];
};
nixosConfigurations.server = nixpkgs.lib.nixosSystem {
nixosConfigurations.Titan = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit overlays; };
modules = [
{ nixpkgs.overlays = overlays; }
disko.nixosModules.disko
sops-nix.nixosModules.sops
./hardware-configuration.nix
./configuration-server.nix
./modules/hardware-configuration.nix
./modules/configuration-server.nix
home-manager.nixosModules.home-manager {
# home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
@@ -69,6 +91,11 @@
./home-server.nix
nix-index-database.homeModules.nix-index
];
home.file.".config/nvim" = {
source = inputs.neovim-config;
recursive = true;
executable = true;
};
};
# home-manager.users.th3r00t = import ./home.nix;
# Optionally, use home-manager.extraSpecialArgs to pass arguments to home.nix

View File

@@ -13,7 +13,7 @@
executable = true;
};
home.file.".config/nvim" = {
source = ./home/config/nvim;
source = ./home/.config/nvim;
recursive = true;
executable = true;
};
@@ -38,67 +38,6 @@
PLATFORMTHEME = "kde";
};
home.packages = with pkgs; [
autossh
fastfetch
ranger
zip
unzip
xz
p7zip
ripgrep
jq
ripgrep
eza
fzf
tmux
cowsay
lolcat
fortune
gnused
gnutar
gnupg
hugo
bat
which
nix-output-monitor
devenv
irssi
luarocks
lua5_1
lua-language-server
go
nodejs
uv
readline
cachix
sqlite
vifm-full
ranger
zoxide
(
python313.withPackages (
python-pkgs:
[
python-pkgs.prompt_toolkit
python-pkgs.pygments
python-pkgs.pynvim
python-pkgs.pudb
python-pkgs.ptpython
python-pkgs.ipython
]
)
)
neovim
zig
syncthing
lazygit
wofi
gopls
pyright
ncurses
rustup
wayvnc
gvfs
];
home.stateVersion = "25.05";
}

View File

@@ -12,28 +12,28 @@
recursive = true;
executable = true;
};
home.file.".config/nvim" = {
source = ./home/config/nvim;
recursive = true;
executable = true;
};
# home.file.".config/nvim" = {
# source = ./home/.config/nvim;
# recursive = true;
# executable = true;
# };
home.file.".irssi" = {
source = ./home/.irssi;
recursive = true;
executable = true;
};
home.file.".config/dosbox-x" = {
source = ./home/config/dosbox-x;
source = ./home/.config/dosbox-x;
recursive = true;
executable = true;
};
home.file.".config/waybar/power_menu.xml" = {
source = ./home/config/waybar/power_menu.xml;
source = ./home/.config/waybar/power_menu.xml;
recursive = true;
executable = true;
};
home.file.".config/qutebrowser/blocked-hosts" = {
source = ./home/config/qutebrowser/blocked-hosts;
source = ./home/.config/qutebrowser/blocked-hosts;
recursive = true;
executable = true;
};
@@ -44,7 +44,28 @@
modules/hyprland.nix
modules/home-manager-common.nix
];
xdg.enable = true;
xdg = {
enable = true;
mime = {
enable = true;
};
mimeApps = {
defaultApplications = {
"text/html" = [ "qutebrowser.desktop" ];
"application/xhtml+xml" = [ "qutebrowser.desktop" ];
"application/xml" = [ "qutebrowser.desktop" ];
"image/svg+xml" = [ "qutebrowser.desktop" ];
"application/pdf" = [ "qutebrowser.desktop" ];
"video/mp4" = [ "qutebrowser.desktop" ];
"video/webm" = [ "qutebrowser.desktop" ];
"video/x-matroska" = [ "qutebrowser.desktop" ];
"audio/mpeg" = [ "qutebrowser.desktop" ];
"audio/ogg" = [ "qutebrowser.desktop" ];
"audio/wav" = [ "qutebrowser.desktop" ];
"application/zip" = [ "nemo.desktop" ];
};
};
};
programs.nix-index.enable = true;
fonts.fontconfig.enable = true;
home.sessionVariables = {
@@ -52,87 +73,108 @@
BROWSER = "qutebrowser";
PLATFORMTHEME = "kde";
};
nixpkgs.config.allowUnfree = true;
home.packages = with pkgs; [
autossh
mesa-demos
bluez
bluez-tools
bluez-alsa
fastfetch
ranger
kdePackages.dolphin
zip
unzip
xz
p7zip
ripgrep
jq
ripgrep
eza
fzf
tmux
cowsay
lolcat
fortune
gnused
gnutar
gnupg
hugo
bat
which
nix-output-monitor
devenv
irssi
luarocks
lua5_1
gimp
lua-language-server
go
nodejs
uv
readline
cachix
sqlite
rofi
qutebrowser
foot
vifm-full
ranger
zoxide
hyprsysteminfo
(
python313.withPackages (
python-pkgs:
[
python-pkgs.prompt_toolkit
python-pkgs.pygments
python-pkgs.pynvim
python-pkgs.pudb
python-pkgs.ptpython
python-pkgs.ipython
]
)
)
neovim
zig
nodejs
go
syncthing
dosbox-x
lazygit
wofi
qutebrowser
waybar
uwsm
gopls
pyright
ncurses
rustup
wayvnc
power-profiles-daemon
wpa_supplicant_gui
gvfs
nemo-with-extensions
wayvnc
xdg-desktop-portal-wlr
exfatprogs
neovide
ghostty
# wineWowPackages.staging
wineWowPackages.waylandFull
winetricks
logmein-hamachi
openmw
virt-viewer
];
services.udiskie = {
enable = false;
settings = {
program_options = {
file_manager = "${pkgs.nemo-with-extensions}/bin/nemo";
};
};
};
programs.ghostty = {
enable = true;
settings = {
theme = "tokyonight";
font-family = "FiraCode Nerd Font Mono";
font-size = 10;
keybind = [
];
};
installVimSyntax = true;
enableZshIntegration = true;
installBatSyntax = true;
themes = {
catppuccin-mocha = {
background = "1e1e2e";
cursor-color = "f5e0dc";
foreground = "cdd6f4";
palette = [
"0=#45475a"
"1=#f38ba8"
"2=#a6e3a1"
"3=#f9e2af"
"4=#89b4fa"
"5=#f5c2e7"
"6=#94e2d5"
"7=#bac2de"
"8=#585b70"
"9=#f38ba8"
"10=#a6e3a1"
"11=#f9e2af"
"12=#89b4fa"
"13=#f5c2e7"
"14=#94e2d5"
"15=#a6adc8"
];
selection-background = "353749";
selection-foreground = "cdd6f4";
};
};
};
programs.neovide = {
enable = true;
settings = {
fork = false;
frame = "full";
idle = true;
maximized = false;
neovim-bin = "${pkgs.neovim}/bin/nvim";
no-multigrid = false;
srgb = false;
tabs = true;
title-hidden = true;
vsync = true;
wsl = false;
font = {
normal = "SauceCodePro Nerd Font Mono";
size = 11;
};
};
};
programs.wofi = {
enable = true;
settings = {
@@ -197,7 +239,7 @@
settings = {
main = {
term = "foot";
font = "SauceCodePro Nerd Font Mono:size=6";
font = "FiraCode Nerd Font Mono:size=6";
dpi-aware = "yes";
shell = "${pkgs.zsh}/bin/zsh";
};
@@ -251,59 +293,5 @@
};
};
};
programs.hyprlock = {
enable = true;
settings = {
general = {
disable_loading_bar = true;
grace = 300;
hide_cursor = true;
no_fade_in = false;
};
background = [
{
path = "screenshot";
blur_passes = 3;
blur_size = 8;
}
];
input-field = [
{
size = "400, 100";
position = "0, -80";
monitor = "";
dots_center = true;
fade_on_empty = false;
font_color = "rgb(202, 211, 245)";
inner_color = "rgb(91, 96, 120)";
outer_color = "rgb(24, 25, 38)";
outline_thickness = 5;
placeholder_text = "Password";
shadow_passes = 2;
}
];
};
};
services.hypridle = {
enable = true;
settings = {
general = {
after_sleep_cmd = "hyprctl dispatch dpms on";
ignore_dbus_inhibit = false;
lock_cmd = "hyprlock";
};
listener = [
{
timeout = 300;
on-timeout = "hyprlock";
}
{
timeout = 600;
on-timeout = "hyprctl dispatch dpms off";
on-resume = "hyprctl dispatch dpms on";
}
];
};
};
home.stateVersion = "25.05";
}

Binary file not shown.

View File

@@ -1,138 +0,0 @@
local vim = vim
require("options") -- ~/.nixos/home/config/nvim/lua/options.lua
require("plugins") -- ~/.nixos/home/config/nvim/lua/plugins.lua
require("utils.t3_functions") -- ~/.nixos/home/config/nvim/lua/utils/t3_functions.lua
require("utils.t3_overrides") -- ~/.nixos/home/config/nvim/lua/utils/t3_overrides.lua
require("utils.reload") -- ~/.nixos/home/config/nvim/lua/utils/reload.lua
require("vimwiki") -- ~/.nixos/home/config/nvim/lua/vimwiki.lua
require("keymaps") -- ~/.nixos/home/config/nvim/lua/keymaps.lua
require("lsp") -- ~/.nixos/home/config/nvim/lua/lsp.lua
require("completion") -- ~/.nixos/home/config/nvim/lua/completion.lua
require("treesitter") -- ~/.nixos/home/config/nvim/lua/treesitter.lua
require("autocmds") -- ~/.nixos/home/config/nvim/lua/autocmds.lua
require("diagnostics") -- ~/.nixos/home/config/nvim/lua/diagnostics.lua
require('tokyonight').setup({
style = "moon", -- "storm", "moon", "day", "night"
transparent = true, -- Enable transparent background
terminal_colors = true, -- Enable terminal colors
styles = {
comments = { italic = true }, -- Italic comments
keywords = { italic = true }, -- Italic keywords
functions = { bold = true }, -- Bold functions
variables = {}, -- No special style for variables
sidebars = "dark", -- Dark sidebars
floats = "dark", -- Dark floating windows
},
})
local function is_linux_console()
return vim.env.TERM == "linux"
end
local function want_truecolor()
if is_linux_console() then return false end
return vim.fn.has("termguicolors") == 1
or ((vim.env.COLORTERM or ""):lower():find("truecolor") ~= nil)
end
local function set_colorscheme()
if want_truecolor() then
vim.o.termguicolors = true
if not pcall(vim.cmd.colorscheme, "tokyonight") then
pcall(vim.cmd.colorscheme, "habamax")
end
else
vim.o.termguicolors = false
if not pcall(vim.cmd.colorscheme, "industry") then
pcall(vim.cmd.colorscheme, "default")
end
end
end
vim.api.nvim_create_autocmd("VimEnter", {
callback = function()
set_colorscheme()
local tty = is_linux_console()
-- LUALINE: no icons, simple separators, TTY theme
pcall(function()
local ok, lualine = pcall(require, "lualine")
if not ok then return end
if tty then
lualine.setup({
options = {
theme = "16color", -- built-in, safe for TTY
icons_enabled = false,
component_separators = "",
section_separators = "",
globalstatus = true,
},
sections = {
lualine_a = { "mode" },
lualine_b = { "branch" },
lualine_c = { { "filename", file_status = true, path = 1 } },
lualine_x = { "encoding", "fileformat", "filetype" },
lualine_y = { "progress" },
lualine_z = { "location" },
},
})
else
lualine.setup({
options = {
theme = "tokyonight",
icons_enabled = true,
globalstatus = true,
},
})
end
end)
-- BARBAR: kill icons in TTY, simplify separators
pcall(function()
vim.g.barbar_auto_setup = false
local ok, barbar = pcall(require, "barbar")
if not ok then return end
if tty then
barbar.setup({
animation = false,
auto_hide = false,
sidebar_filetypes = { NvimTree = true, undotree = { text = "Undotree" } },
icons = {
-- aggressively disable anything icon-like
buffer_index = false,
buffer_number = false,
button = "", -- close button
diagnostics = {
[vim.diagnostic.severity.ERROR] = { enabled = false },
[vim.diagnostic.severity.WARN] = { enabled = false },
[vim.diagnostic.severity.INFO] = { enabled = false },
[vim.diagnostic.severity.HINT] = { enabled = false },
},
gitsigns = { added = {enabled=false}, changed = {enabled=false}, deleted = {enabled=false} },
filetype = { enabled = false },
pinned = { button = "", filename = true },
modified = { button = "*" }, -- simple ASCII marker
separator = { left = "|", right = "|" },
inactive = { separator = { left = "", right = "" } },
},
})
else
barbar.setup({}) -- your normal config, or keep defaults
end
end)
-- If you use web-devicons, disable it in TTY to avoid glyphs
if is_linux_console() then
-- If using lazy.nvim, better to conditionally load the plugin (see spec below).
if package.loaded["nvim-web-devicons"] then
local ok, devicons = pcall(require, "nvim-web-devicons")
if ok and devicons.has_loaded() then
-- there's no runtime "disable", but not using it in barbar/lualine is enough.
end
end
end
end,
})

View File

@@ -1,3 +0,0 @@
{
}

View File

@@ -1,9 +0,0 @@
local vim = vim
vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost" }, {
group = vim.api.nvim_create_augroup("TWTask", { clear = true }),
pattern = "*.wiki", -- Pattern to match Markdown files
callback = function()
vim.cmd('TWSyncTasks')
end,
})

View File

@@ -1,112 +0,0 @@
local cmp = require("cmp")
cmp.setup({
snippet = {
expand = function(args)
require('luasnip').lsp_expand(args.body) -- For `luasnip` users.
end,
},
window = {
completion = cmp.config.window.bordered(),
documentation = cmp.config.window.bordered(),
},
mapping = cmp.mapping.preset.insert({
["<C-b>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-Space>"] = cmp.mapping.complete(),
["<C-e>"] = cmp.mapping.abort(),
["<CR>"] = cmp.mapping.confirm({ select = false }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
["<C-Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
else
fallback()
end
end, { "i", "s" }),
["<S-Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
else
fallback()
end
end, { "i", "s" }),
}),
sources = cmp.config.sources({
{ name = "nvim_lua" },
{ name = "copilot", group_index = 3 },
{ name = "nvim_lsp", group_index = 1 },
{ name = "path", group_index = 3 },
{ name = "luasnip", group_index = 2 },
{ name = "buffer" },
{ name = "calc" },
{ name = 'orgmode' },
-- { name = 'vsnip' }, -- For vsnip users.
-- { name = 'luasnip' }, -- For luasnip users.
-- { name = 'ultisnips' }, -- For ultisnips users.
-- { name = 'snippy' }, -- For snippy users.
{ name = "crates" },
-- { name = 'cmdline' },
-- { name = 'neorg' },
}),
})
-- Set configuration for specific filetype.
cmp.setup.filetype("gitcommit", {
sources = cmp.config.sources({
{ name = "cmp_git" }, -- You can specify the `cmp_git` source if you were installed it.
}, {
{ name = "buffer" },
}),
})
-- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore).
cmp.setup.cmdline({ "/", "?" }, {
mapping = cmp.mapping.preset.cmdline(),
sources = {
{ name = "buffer" },
{ name = "cmdline" },
},
})
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
cmp.setup.cmdline(":", {
mapping = cmp.mapping.preset.cmdline(),
sources = cmp.config.sources({
{ name = "path" },
}, {
{ name = "cmdline" },
}),
})
-- Set up lspconfig.
-- require("cmp_nvim_lsp").default_capabilities()
local capabilities = require("cmp_nvim_lsp").default_capabilities()
-- Replace <YOUR_LSP_SERVER> with each lsp server you've enabled.
-- require('lspconfig')['<YOUR_LSP_SERVER>'].setup {
-- capabilities = capabilities
-- }
require("lspconfig").clangd.setup({
capabilities = capabilities,
})
require("lspconfig").taplo.setup({
capabilities = capabilities,
})
require("lspconfig").marksman.setup({
capabilities = capabilities,
})
require("lspconfig").lua_ls.setup({
capabilities = capabilities,
})
require("lspconfig").rust_analyzer.setup({
capabilities = capabilities,
})
require("lspconfig").zls.setup({
capabilities = capabilities,
})
require("lspconfig").pyright.setup({
capabilities = capabilities,
})
-- require'lspconfig'.jedi_language_server.setup {
-- capabilities = capabilities,
-- }

View File

@@ -1,60 +0,0 @@
require("tiny-inline-diagnostic").setup({
-- Style preset for diagnostic messages
-- Available options:
-- "modern", "classic", "minimal", "powerline",
-- "ghost", "simple", "nonerdfont", "amongus"
preset = "modern",
transparent_bg = false, -- Set the background of the diagnostic to transparent
transparent_cursorline = false, -- Set the background of the cursorline to transparent (only one the first diagnostic)
hi = {
error = "DiagnosticError", -- Highlight group for error messages
warn = "DiagnosticWarn", -- Highlight group for warning messages
info = "DiagnosticInfo", -- Highlight group for informational messages
hint = "DiagnosticHint", -- Highlight group for hint or suggestion messages
arrow = "NonText", -- Highlight group for diagnostic arrows
background = "CursorLine",
mixing_color = "None",
},
options = {
show_source = {
enabled = false,
if_many = false,
},
use_icons_from_diagnostic = false,
set_arrow_to_diag_color = false,
add_messages = true,
throttle = 20,
softwrap = 30,
multilines = {
enabled = false,
always_show = false,
trim_whitespaces = false,
tabstop = 4,
},
show_all_diags_on_cursorline = false,
enable_on_insert = false,
enable_on_select = false,
overflow = {
mode = "wrap",
padding = 0,
},
break_line = {
enabled = false,
after = 30,
},
format = nil,
virt_texts = {
priority = 2048,
},
severity = {
vim.diagnostic.severity.ERROR,
vim.diagnostic.severity.WARN,
vim.diagnostic.severity.INFO,
vim.diagnostic.severity.HINT,
},
overwrite_events = nil,
},
disabled_ft = {} -- List of filetypes to disable the plugin
})

View File

@@ -1,166 +0,0 @@
local vim = vim
local fzflua = require("fzf-lua")
local Job = require'plenary.job'
function t3_find_file()
-- local file_name = vim.fn.input("Find File: ", "", "file")
fzflua.files()
end
function t3_recent_files()
fzflua.oldfiles()
end
function t3_org_files()
fzflua.files({ cwd = '~/org/'})
end
function t3_project_files()
fzflua.files({ cwd = '~/Projects/'})
end
function t3_dot_files()
fzflua.files({ cwd = '~/.dotfiles/'})
end
function t3_config_files()
fzflua.files({ cwd = '~/.dotfiles/'})
end
function t3_snip_capture(name)
if type(name) ~= "string" or name == "" then
print("Error: Invalid snippet name")
return
end
-- local timestamp = os.date("%Y%m%d%H%M%S")
local snippet_path = "~/.config/nvim/snippets/"
local filename = snippet_path .. name:gsub("%s+", "_") .. ".lua"
local file = io.open(vim.fn.expand(filename), "w")
if file == nil then
print("Error: Could not open file for editing.")
return
end
local previous_buffer = vim.api.nvim_get_current_buf()
file:write("local ls = require('luasnip')\n\nls.add_snippets(\"{}\", {\n\tls.parser.parse_snippet(\n\t\t'{}',\n\t\t'{}'),\n})")
file:close()
vim.cmd("e " .. filename)
vim.bo.filetype = 'lua'
-- vim.cmd("Neorg inject-metadata")
-- Set an autocmd to return to the previous buffer when the note buffer is closed
vim.api.nvim_create_autocmd("BufLeave", {
buffer = 0, -- Current buffer (the note buffer)
callback = function()
load_snippets_from_directory(snippet_path)
vim.cmd("buffer " .. previous_buffer)
end,
})
print("Captured snippet: " .. filename)
end
function t3_org_capture(name)
if type(name) ~= "string" or name == "" then
print("Error: Invalid note name")
return
end
local timestamp = os.date("%Y%m%d%H%M%S")
local org_path = "~/org/.org-roam/"
local filename = org_path .. timestamp .. "-" .. name:gsub("%s+", "_") .. ".norg"
local file = io.open(vim.fn.expand(filename), "w")
if file == nil then
print("Error: Could not open file for editing.")
return
end
local previous_buffer = vim.api.nvim_get_current_buf()
file:write("* " .. name .. "\n\n")
file:close()
vim.cmd("e " .. filename)
vim.bo.filetype = 'norg'
vim.cmd("Neorg inject-metadata")
-- Set an autocmd to return to the previous buffer when the note buffer is closed
vim.api.nvim_create_autocmd("BufLeave", {
buffer = 0, -- Current buffer (the note buffer)
callback = function()
vim.cmd("buffer " .. previous_buffer)
end,
})
print("Captured note: " .. filename)
end
vim.api.nvim_create_user_command(
'NeorgCapture',
function()
-- local title = vim.fn.input("Title: ")
local current_workspace = vim.g.neorg_workspace_name
if not current_workspace then
vim.cmd("Neorg workspace default")
end
vim.ui.input({ prompt = "Enter note name: "}, function(note_name)
if not note_name or note_name == "" then
print("Error: Note name required!")
return
end
t3_org_capture(note_name)
end
)
end,
{ nargs = 0, desc = "Capture a Neorg note" }
)
vim.api.nvim_create_user_command(
'CaptureSnip',
function()
-- local title = vim.fn.input("Title: ")
-- local current_workspace = vim.g.neorg_workspace_name
-- if not current_workspace then
-- vim.cmd("Neorg workspace default")
-- end
vim.ui.input({ prompt = "Enter snippet name: "}, function(snip_name)
if not snip_name or snip_name == "" then
print("Error: Snippet name required!")
return
end
t3_snip_capture(snip_name)
end
)
end,
{ nargs = 0, desc = "Capture a Neorg note" }
)
function t3_buffers()
fzflua.buffers()
end
function t3_tabs()
fzflua.tabs()
end
function t3_live_grep(state)
state = state or 0
if state == 0 then
fzflua.live_grep()
else
fzflua.live_grep_resume()
end
end
function t3_grep(state)
state = state or 0
if state == 0 then
fzflua.grep_project()
else
fzflua.grep()
end
end
function t3_make_ctags()
Job:new({
command = 'ctags',
args = { '-R .' },
})
end
vim.api.nvim_create_autocmd("FileType", {
pattern = { "markdown", "norg", "md", "wiki" }, -- Set for markdown file type
callback = function()
vim.api.nvim_buf_set_keymap(0, "n", "<C-i>", "o* [ ] ", { noremap = true, silent = true })
vim.api.nvim_buf_set_keymap(0, "i", "<C-i>", "<Esc>0wi* [ ] ", { noremap = true, silent = true })
end,
})

View File

@@ -1,85 +0,0 @@
local vim = vim
vim.keymap.set("n", "<C-w>s", function()
vim.cmd("split")
vim.cmd("wincmd j")
end, { noremap = true })
vim.keymap.set("n", "<C-w>v", function()
vim.cmd("vsplit")
vim.cmd("wincmd l")
end, { noremap = true })
-- Leader Maps
vim.keymap.set("n", "<leader>f", "", { desc = "Files"})
vim.keymap.set("n", "<leader>ff", ":FzfLua files<CR>", { desc = "File Finder"})
-- vim.keymap.set("n", "<leader>fe", ":Pick files<CR>", { desc = "File Picker"})
vim.keymap.set("n", "<leader>ft", t3_toggle_netrw, { desc = "File Tree"})
vim.keymap.set("n", "<leader>b", "", { desc = "Buffers"})
vim.keymap.set("n", "<leader>bb", ":Pick buffers<CR>", { desc = "Buffer Picker"})
vim.keymap.set("n", "<leader>bp", ":bp<CR>", { desc = "Previous"})
vim.keymap.set("n", "<leader>bn", ":bn<CR>", { desc = "Next"})
vim.keymap.set("n", "<leader>bd", ":bd<CR>", { desc = "Delete"})
vim.keymap.set("n", "<leader>g", "", { desc = "Grep"})
vim.keymap.set("n", "<leader>gg", ":FzfLua grep<CR>", { desc = "Grep"})
vim.keymap.set("n", "<leader>gr", ":FzfLua grep resume=true<CR>", { desc = "Resume Grep"})
vim.keymap.set("n", "<leader>G", "", { desc = "Git"})
vim.keymap.set("n", "<leader>Gg", ":LazyGit<CR>", { desc = "LazyGit"})
vim.keymap.set("n", "<leader>GC", ":LazyGitConfig<CR>", { desc = "LazyGit Config"})
vim.keymap.set("n", "<leader>Gc", ":LazyGitFilter<CR>", { desc = "Commits"})
vim.keymap.set("n", "<leader>Gl", ":LazyGitLog<CR>", { desc = "Log"})
vim.keymap.set("n", "<leader><Tab>", "", { desc = "Tabs"})
vim.keymap.set("n", "<leader><Tab><Tab>", ":tabnew<CR>", { desc = "New Tab"})
vim.keymap.set("n", "<leader><Tab>p", ":tabprevious<CR>", { desc = "Previous Tab"})
vim.keymap.set("n", "<leader><Tab>n", ":tabnext<CR>", { desc = "Next Tab"})
vim.keymap.set("n", "<leader><Tab>d", ":tabclose<CR>", { desc = "Delete Tab"})
vim.keymap.set("n", "<leader><Tab>l", ":tablast<CR>", { desc = "Last Tab"})
vim.keymap.set("n", "<leader><Tab>f", ":tabfirst<CR>", { desc = "First Tab"})
vim.keymap.set("n", "<leader><Tab>m", ":tabmove<CR>", { desc = "Move Tab"})
vim.keymap.set("n", "<leader><Tab>r", ":tabrenumber<CR>", { desc = "Renumber Tabs"})
vim.keymap.set("n", "<leader><Tab>c", ":tabclose!<CR>", { desc = "Force Close Tab"})
vim.keymap.set("n", "gR", "<CMD>Glance references<CR>", { desc = "Glance References" })
vim.keymap.set("n", "gD", "<CMD>Glance definitions<CR>", { desc = "Glance Definitions" })
vim.keymap.set("n", "gY", "<CMD>Glance type_definitions<CR>", { desc = "Glance Type Definitions" })
vim.keymap.set("n", "gM", "<CMD>Glance implementations<CR>", { desc = "Glance Implementations" })
vim.keymap.set("n", "<A-Tab>", ":b#<CR>", { desc = "Switch to Last Buffer" })
vim.keymap.set("n", "<A-Left>", ":bprevious<CR>", { desc = "Previous Buffer" })
vim.keymap.set("n", "<A-Right>", ":bnext<CR>", { desc = "Next Buffer" })
vim.keymap.set("n", "<A-Up>", ":tabprevious<CR>", { desc = "Previous Tab" })
vim.keymap.set("n", "<A-Down>", ":tabnext<CR>", { desc = "Next Tab" })
vim.keymap.set("n", "<A-1>", "<Cmd>BufferGoto 1<CR>", { desc = "Go to Buffer 1" })
vim.keymap.set("n", "<A-2>", "<Cmd>BufferGoto 2<CR>", { desc = "Go to Buffer 2" })
vim.keymap.set("n", "<A-3>", "<Cmd>BufferGoto 3<CR>", { desc = "Go to Buffer 3" })
vim.keymap.set("n", "<A-4>", "<Cmd>BufferGoto 4<CR>", { desc = "Go to Buffer 4" })
vim.keymap.set("n", "<A-5>", "<Cmd>BufferGoto 5<CR>", { desc = "Go to Buffer 5" })
vim.keymap.set("n", "<A-6>", "<Cmd>BufferGoto 6<CR>", { desc = "Go to Buffer 6" })
vim.keymap.set("n", "<A-7>", "<Cmd>BufferGoto 7<CR>", { desc = "Go to Buffer 7" })
vim.keymap.set("n", "<A-8>", "<Cmd>BufferGoto 8<CR>", { desc = "Go to Buffer 8" })
vim.keymap.set("n", "<A-9>", "<Cmd>BufferGoto 9<CR>", { desc = "Go to Buffer 9" })
vim.keymap.set("n", "<A-0>", "<Cmd>BufferLast<CR>", { desc = "Go to Last Buffer" })
-- CTRL X Maps
vim.keymap.set("n", "<C-x><C-b>", ":Pick buffers<CR>", { desc = "Buffer Picker"})
vim.keymap.set("n", "<C-x><C-f>", ":Pick files<CR>", { desc = "File Picker"})
vim.keymap.set("n", "<C-x><C-h>", ":Pick help<CR>", { desc = "Help Picker"})
vim.keymap.set("n", "<C-x><C-g>", "", { desc = "Grep"})
vim.keymap.set("n", "<C-x><C-g>g", ":Pick grep<CR>", { desc = "Grep"})
vim.keymap.set("n", "<C-x><C-g>l", ":Pick grep_live<CR>", { desc = "Live Grep"})
vim.keymap.set("v", "<C-x><C-c>", ":'<,'>SnipRun<CR>", { silent = true, desc = "Run Selection" })
vim.keymap.set("n", "<C-x><C-c>", ":<Plug>SnipRun<CR>", { desc = "Run Current Line" })
vim.keymap.set("n", "<C-x><C-b>", ":%SnipRun<CR>", { desc = "Run Buffer" })
vim.keymap.set("n", "<C-x><C-k>", "<Plug>SnipReset<CR>", { desc = "Run Buffer" })
vim.keymap.set("n", "<C-x><C-n>", "", { desc = "Notes"})
vim.keymap.set("n", "<C-x><C-n>e", "<cmd>TWEditTask<cr>", { desc = "TaskWarrior Edit", noremap = true, silent = true })
vim.keymap.set("n", "<C-x><C-n>v", "<cmd>TWView<cr>", { desc = "View Tasks", noremap = true, silent = true })
vim.keymap.set("n", "<C-x><C-n>u", "<cmd>TWUpdateCurrent<cr>", { desc="Update Tasks", noremap = true, silent = true })
vim.keymap.set("n", "<C-x><C-n>s", "<cmd>TWSyncTasks<cr>", { desc = "Sync Tasks", noremap = true, silent = true })
vim.keymap.set("n", "<C-x><C-n><c-space>", "<cmd>TWToggle<cr>", { desc = "Toggle Taskwarrior", silent = true })

View File

@@ -1,57 +0,0 @@
local vim = vim
-- vim.cmd [[
-- augroup LspCompletion
-- autocmd!
-- autocmd InsertEnter * setlocal omnifunc=v:lua.vim.lsp.omnifunc
-- autocmd TextChangedI * if pumvisible() == 0 | silent! lua vim.fn.complete(vim.fn.col('.'), vim.fn["vim.lsp.omnifunc"]()) | endif
-- augroup END
-- ]]
vim.lsp.enable('lua_ls')
vim.lsp.enable('gopls', {
settings = {
gopls = {
analyses = {
unusedparams = true,
unusedwrite = true,
shadow = true,
},
staticcheck = true,
usePlaceholders = true,
hints = {
assignVariableTypes = true,
compositeLiteralFields = true,
compositeLiteralTypes = true,
functionTypeParameters = true,
parameterNames = true,
rangeVariableTypes = true,
},
},
},
})
require("lsp_signature").setup({
debug = false,
bind = true, -- registers signature handler
doc_lines = 10,
max_height = 12,
max_width = function() return math.floor(vim.api.nvim_win_get_width(0) * 0.8) end,
wrap = true,
floating_window = true, -- show the popup
floating_window_above_cur_line = true,
floating_window_off_x = 1,
floating_window_off_y = 0,
-- IMPORTANT: dont inline (you can change later if you want)
hint_enable = true,
hint_inline = function() return false end,
hint_prefix = "🐼 ",
hint_scheme = "String",
hi_parameter = "LspSignatureActiveParameter",
handler_opts = { border = "rounded" },
always_trigger = false,
extra_trigger_chars = { "(", "," }, -- good default
zindex = 200,
padding = "",
timer_interval = 200,
})

View File

@@ -1,55 +0,0 @@
local vim = vim
vim.o.number = true
vim.o.relativenumber = true
vim.o.tabstop = 2
vim.o.shiftwidth = 2
vim.o.wrap = false
vim.o.scrolloff = 5
vim.o.colorcolumn = "80"
vim.o.wildmenu = true
vim.o.wildmode = "longest:full,full"
vim.o.wildoptions = "pum"
vim.g.mapleader = " "
vim.o.termguicolors = true
vim.o.winborder = "double"
vim.o.clipboard = "unnamedplus"
vim.o.completeopt = "menuone"
-- vim.o.completeopt = "menuone,noinsert,noselect"
vim.o.cursorline = true
vim.o.sessionoptions="blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions"
vim.g.netrw_keepdir = 1
vim.g.netrw_winsize = 15
vim.g.netrw_banner = 0
vim.g.netrw_localcopydircmd = 'cp -avr'
vim.g.netrw_liststyle = 3
vim.g.netrw_browse_split = 4
vim.o.foldmethod = "expr"
vim.o.foldexpr = "nvim_treesitter#foldexpr()"
vim.o.foldlevel = 1
vim.o.foldenable = true
vim.o.undofile = true
vim.o.undodir = vim.fn.stdpath("data") .. "/undo"
vim.api.nvim_create_autocmd("FileType", {
pattern = "help",
callback = function()
vim.opt_local.wrap = true
end,
})
vim.api.nvim_create_autocmd("FileType", {
pattern = "markdown",
callback = function()
vim.opt_local.wrap = true
end,
})
vim.api.nvim_create_autocmd("BufWritePost", {
pattern = ".wiki",
callback = function()
vim.cmd("VimwikiGenerateLinks")
end,
})

View File

@@ -1,116 +0,0 @@
local vim = vim
vim.pack.add({
{ src = "https://github.com/folke/tokyonight.nvim" },
{ src = "https://github.com/nvim-tree/nvim-web-devicons" },
{ src = "https://github.com/ibhagwan/fzf-lua" },
{ src = "https://github.com/echasnovski/mini.pick" },
{ src = "https://github.com/echasnovski/mini.icons" },
{ src = "https://github.com/echasnovski/mini.files" },
{ src = "https://github.com/echasnovski/mini.pairs" },
{ src = "https://github.com/echasnovski/mini.notify" },
{ src = "https://github.com/echasnovski/mini.surround" },
{ src = "https://github.com/echasnovski/mini.indentscope" },
{ src = "https://github.com/echasnovski/mini.fuzzy" },
{ src = "https://github.com/echasnovski/mini.tabline" },
{ src = "https://github.com/nvim-lualine/lualine.nvim" },
{ src = "https://github.com/folke/which-key.nvim" },
{ src = "https://github.com/L3MON4D3/LuaSnip" },
{ src = "https://github.com/neovim/nvim-lspconfig" },
{ src = "https://github.com/hrsh7th/nvim-cmp" },
{ src = "https://github.com/hrsh7th/cmp-nvim-lsp" },
{ src = "https://github.com/hrsh7th/cmp-buffer" },
{ src = "https://github.com/hrsh7th/cmp-path" },
{ src = "https://github.com/hrsh7th/cmp-cmdline" },
{ src = "https://github.com/hrsh7th/cmp-nvim-lua" },
{ src = "https://github.com/saadparwaiz1/cmp_luasnip" },
{ src = "https://github.com/github/copilot.vim" },
{ src = "https://github.com/pysan3/pathlib.nvim" },
-- { src = "https://github.com/nvim-orgmode/orgmode" },
-- { src = "https://github.com/chipsenkbeil/org-roam.nvim" },
-- { src = "https://github.com/danilshvalov/org-modern.nvim" },
{ src = "https://github.com/nvim-orgmode/org-bullets.nvim" },
{ src = "https://github.com/lukas-reineke/headlines.nvim" },
{ src = "https://github.com/michaelb/sniprun", run = "bash install.sh 1" },
{ src = "https://github.com/akinsho/toggleterm.nvim" },
{ src = "https://github.com/kdheepak/lazygit.nvim" },
{ src = "https://github.com/saecki/crates.nvim" },
{ src = "https://github.com/nvim-treesitter/nvim-treesitter" },
{ src = "https://github.com/folke/trouble.nvim" },
{ src = "https://github.com/folke/todo-comments.nvim" },
{ src = "https://github.com/MunifTanjim/nui.nvim" },
{ src = "https://github.com/huantrinh1802/m_taskwarrior_d.nvim" },
{ src = "https://github.com/rmagatti/auto-session" },
{ src = "https://github.com/romgrk/barbar.nvim" },
{ src = "https://github.com/christoomey/vim-tmux-navigator" },
{ src = "https://github.com/rachartier/tiny-inline-diagnostic.nvim" },
{ src = "https://github.com/zeioth/garbage-day.nvim" },
{ src = "https://github.com/ray-x/lsp_signature.nvim" },
{ src = "https://github.com/DNLHC/glance.nvim" },
{ src = "https://github.com/rmagatti/logger.nvim" },
{ src = "https://github.com/rmagatti/goto-preview" },
{ src = "https://github.com/norcalli/nvim-colorizer.lua" },
})
require('mini.icons').setup({})
require('mini.pick').setup({})
require('mini.pairs').setup({})
require('mini.notify').setup({})
require('mini.surround').setup({})
require('mini.indentscope').setup({})
require('mini.tabline').setup({})
require('mini.fuzzy').setup({})
require('lualine').setup({ options = { theme = 'tokyonight' } })
require('which-key').setup({})
require('fzf-lua').setup({})
require('crates').setup({})
require('todo-comments').setup({
options = {
keywords = {
FIX = {
icon = "", -- icon used for the sign, and in search results
color = "error", -- can be a hex color, or a named color (see below)
alt = { "FIXME", "BUG", "FIXIT", "ISSUE" }, -- a set of other keywords that all map to this FIX keywords
-- signs = false, -- configure signs for some keywords individually
},
TODO = { icon = "", color = "info" },
HACK = { icon = "", color = "warning" },
WARN = { icon = "", color = "warning", alt = { "WARNING", "XXX" } },
PERF = { icon = "", alt = { "OPTIM", "PERFORMANCE", "OPTIMIZE" } },
NOTE = { icon = "", color = "hint", alt = { "INFO" } },
TEST = { icon = "", color = "test", alt = { "TESTING", "PASSED", "FAILED" } },
},
}
})
require('trouble').setup({})
-- require('orgmode').setup({
-- org_agenda_files = { '~/org/*' },
-- org_default_notes_file = '~/org/notes.org',
-- })
-- require('org-roam').setup({ directory = '~/org/roam' })
-- require("orgmode").setup({})
require('org-bullets').setup({})
require('headlines').setup({})
require('sniprun').setup({
binary_path = '/home/th3r00t/.local/share/nvim/site/pack/core/opt/sniprun/\
target/release/sniprun'
})
require('toggleterm').setup({
size = 20,
open_mapping = [[<c- >]],
hide_numbers = true,
shade_filetypes = {},
shading_factor = 2,
start_in_insert = true,
insert_mappings = true,
persist_size = true,
direction = 'horizontal',
close_on_exit = true,
shell = vim.o.shell,
})
require('m_taskwarrior_d').setup({})
require("auto-session").setup({
suppressed_dirs = { "~/Downloads", "~/Documents", "~/Projects", "~/" },
})
require('barbar').setup({})
require('goto-preview').setup({ default_mappings = true })
require('colorizer').setup({})

View File

@@ -1,11 +0,0 @@
function _G.set_terminal_keymaps()
local opts = { buffer = 0 }
vim.keymap.set('t', '<esc>', [[<C-\><C-n>]], opts)
vim.keymap.set('t', 'jk', [[<C-\><C-n>]], opts)
vim.keymap.set('t', '<C-h>', [[<Cmd>wincmd h<CR>]], opts)
vim.keymap.set('t', '<C-j>', [[<Cmd>wincmd j<CR>]], opts)
vim.keymap.set('t', '<C-k>', [[<Cmd>wincmd k<CR>]], opts)
vim.keymap.set('t', '<C-l>', [[<Cmd>wincmd l<CR>]], opts)
end
vim.cmd('autocmd! TermOpen term://* lua set_terminal_keymaps()')

View File

@@ -1,11 +0,0 @@
local configs = require('nvim-treesitter.configs')
configs.setup({
-- ensure_installed = {
-- "ini", "bash", "c", "lua", "vim", "vimdoc", "query", "python",
-- "rust", "zig", "typescript", "svelte", "css", "html", "nix"
-- },
sync_install = false,
highlight = { enable = true },
indent = { enable = true, disable = { "norg" }, },
incremental_selection = { enable = true },
})

View File

@@ -1,11 +0,0 @@
for name,_ in pairs(package.loaded) do
if name:match("^t3")
or name:match("^options")
or name:match("^overrides")
or name:match("^plugins")
or name:match("keymaps")
or name:match("^reload")
then
package.loaded[name] = nil
end
end

View File

@@ -1,187 +0,0 @@
local vim = vim
local fzflua = require("fzf-lua")
function t3_find_file()
-- local file_name = vim.fn.input("Find File: ", "", "file")
fzflua.files()
end
function t3_recent_files()
fzflua.oldfiles()
end
function t3_org_files()
fzflua.files({ cwd = '~/org/'})
end
function t3_project_files()
fzflua.files({ cwd = '~/Projects/'})
end
function t3_dot_files()
fzflua.files({ cwd = '~/.dotfiles/'})
end
function t3_config_files()
fzflua.files({ cwd = '~/.dotfiles/'})
end
function t3_snip_capture(name)
if type(name) ~= "string" or name == "" then
print("Error: Invalid snippet name")
return
end
-- local timestamp = os.date("%Y%m%d%H%M%S")
local snippet_path = "~/.config/nvim/snippets/"
local filename = snippet_path .. name:gsub("%s+", "_") .. ".lua"
local file = io.open(vim.fn.expand(filename), "w")
if file == nil then
print("Error: Could not open file for editing.")
return
end
local previous_buffer = vim.api.nvim_get_current_buf()
file:write("local ls = require('luasnip')\n\nls.add_snippets(\"{}\", {\n\tls.parser.parse_snippet(\n\t\t'{}',\n\t\t'{}'),\n})")
file:close()
vim.cmd("e " .. filename)
vim.bo.filetype = 'lua'
-- vim.cmd("Neorg inject-metadata")
-- Set an autocmd to return to the previous buffer when the note buffer is closed
vim.api.nvim_create_autocmd("BufLeave", {
buffer = 0, -- Current buffer (the note buffer)
callback = function()
load_snippets_from_directory(snippet_path)
vim.cmd("buffer " .. previous_buffer)
end,
})
print("Captured snippet: " .. filename)
end
function t3_org_capture(name)
if type(name) ~= "string" or name == "" then
print("Error: Invalid note name")
return
end
local timestamp = os.date("%Y%m%d%H%M%S")
local org_path = "~/org/.org-roam/"
local filename = org_path .. timestamp .. "-" .. name:gsub("%s+", "_") .. ".norg"
local file = io.open(vim.fn.expand(filename), "w")
if file == nil then
print("Error: Could not open file for editing.")
return
end
local previous_buffer = vim.api.nvim_get_current_buf()
file:write("* " .. name .. "\n\n")
file:close()
vim.cmd("e " .. filename)
vim.bo.filetype = 'norg'
vim.cmd("Neorg inject-metadata")
-- Set an autocmd to return to the previous buffer when the note buffer is closed
vim.api.nvim_create_autocmd("BufLeave", {
buffer = 0, -- Current buffer (the note buffer)
callback = function()
vim.cmd("buffer " .. previous_buffer)
end,
})
print("Captured note: " .. filename)
end
vim.api.nvim_create_user_command(
'NeorgCapture',
function()
-- local title = vim.fn.input("Title: ")
local current_workspace = vim.g.neorg_workspace_name
if not current_workspace then
vim.cmd("Neorg workspace default")
end
vim.ui.input({ prompt = "Enter note name: "}, function(note_name)
if not note_name or note_name == "" then
print("Error: Note name required!")
return
end
t3_org_capture(note_name)
end
)
end,
{ nargs = 0, desc = "Capture a Neorg note" }
)
vim.api.nvim_create_user_command(
'CaptureSnip',
function()
-- local title = vim.fn.input("Title: ")
-- local current_workspace = vim.g.neorg_workspace_name
-- if not current_workspace then
-- vim.cmd("Neorg workspace default")
-- end
vim.ui.input({ prompt = "Enter snippet name: "}, function(snip_name)
if not snip_name or snip_name == "" then
print("Error: Snippet name required!")
return
end
t3_snip_capture(snip_name)
end
)
end,
{ nargs = 0, desc = "Capture a Neorg note" }
)
function t3_buffers()
fzflua.buffers()
end
function t3_tabs()
fzflua.tabs()
end
function t3_live_grep(state)
state = state or 0
if state == 0 then
fzflua.live_grep()
else
fzflua.live_grep_resume()
end
end
function t3_grep(state)
state = state or 0
if state == 0 then
fzflua.grep_project()
else
fzflua.grep()
end
end
local function is_netrw_open()
for _, win in ipairs(vim.api.nvim_tabpage_list_wins(0)) do
local buf = vim.api.nvim_win_get_buf(win)
if vim.bo[buf].filetype == "netrw" then
return true, win
end
end
return false, nil
end
function t3_toggle_netrw()
local is_open, win = is_netrw_open()
if is_open then
vim.api.nvim_win_close(win, true)
else
vim.cmd("Lexplore")
end
end
vim.api.nvim_create_autocmd("FileType", {
pattern = { "markdown", "norg", "md", "wiki" }, -- Set for markdown file type
callback = function()
vim.api.nvim_buf_set_keymap(0, "n", "<C-i>", "o* [ ] ", { noremap = true, silent = true })
vim.api.nvim_buf_set_keymap(0, "i", "<C-i>", "<Esc>0wi* [ ] ", { noremap = true, silent = true })
end,
})
vim.api.nvim_create_user_command("Split", function()
vim.cmd("split")
vim.cmd("wincmd j")
end, {})
vim.api.nvim_create_user_command("Vsplit", function()
vim.cmd("vsplit")
vim.cmd("wincmd l")
end, {})

View File

@@ -1,5 +0,0 @@
-- vim.api.nvim_create_autocmd("winNew", {
-- callback = function()
-- vim.cmd("wincmd w")
-- end,
-- })

View File

@@ -1,109 +0,0 @@
local vim = vim
local opt = vim.opt
-- opt.wildmenu = true
-- vim.g.netrw_keepdir = 0
-- vim.treesitter.language.register("markdown", "vimwiki")
-- vim.g.vimwiki_folding = 'expr'
-- vim.g.vimwiki_header_type = "="
-- vim.api.nvim_create_autocmd({ "BufWritePost" }, {
-- pattern = "*.wiki", -- Adjust this pattern if your Vimwiki files have a different extension
-- callback = function()
-- vim.cmd("TWSyncTasks")
-- end,
-- })
-- Autocommand to trigger LuaSnip snippet expansion for new diary files
vim.api.nvim_create_autocmd("BufNewFile", {
pattern = "diary/*.wiki", -- Adjust this path to match your diary directory
callback = function()
-- Expand the 'diary_template' snippet automatically
ls.snip_expand(ls.snippets.diary_template[1])
end,
})
vim.g.vimwiki_automatic_nested_syntaxes = 1
vim.g.vimwiki_list = {
{
name = "Personal Wiki",
path = '/home/th3r00t/wiki/',
path_html = '/home/th3r00t/wiki/html/',
syntax = 'default',
ext = '.wiki',
diary_rel_path = 'diary/',
diary_index = "diary_index",
auto_tags = 1,
auto_toc = 1,
auto_export = 1,
template_path = "/home/th3r00t/wiki/templates/",
template_default = "def_template",
template_ext = "html",
css_name = "main.css",
maxhi = 1, -- BUG: Can be a source of lag.
diary_caption_level = 1,
bullet_types = { "-", "*", "#", "" },
cycle_bullets = 1,
generated_links_caption = 1,
listsyms = '✗○◐●✓',
-- listsym_rejected = '✗',
auto_diary_index = 1,
auto_generate_links = 1,
auto_generate_tags = 1,
exclude_files = { "**/README.md" },
rss_name = "feed.rss",
base_url = "https://th3r00t.net",
}
}
vim.g.vimwiki_syntax_plugins = {
codeblock = {
["```lua"] = { parser = "lua" },
["```python"] = { parser = "python" },
["```javascript"] = { parser = "javascript" },
["```bash"] = { parser = "bash" },
["```html"] = { parser = "html" },
["```css"] = { parser = "css" },
["```c"] = { parser = "c" },
["```zig"] = { parser = "zig" },
},
}
vim.g.vimwiki_toc_header = "Navigation"
vim.g.vimwiki_toc_header_level = 2
vim.g.vimwiki_hl_cb_checked = 1
vim.g.vimwiki_global_ext = 1
vim.g.vimwiki_auto_chdir = 1
vim.g.wimwiki_markdown_link_ext = 1
-- vim.g.vimwiki_folding = 'list'
vim.g.vimwiki_folding = 'expr'
vim.g.vimwiki_use_calendar = 1
vim.api.nvim_set_keymap('n', '<Leader>ww', '<Cmd>VimwikiIndex<CR>', { noremap = true, silent = true })
vim.api.nvim_set_keymap('n', '<Leader>wt', '<Cmd>VimwikiTabIndex<CR>', { noremap = true, silent = true })
vim.api.nvim_set_keymap('n', '<Leader>ws', '<Cmd>VimwikiUISelect<CR>', { noremap = true, silent = true })
local function setup_vimwiki_highlights()
-- Define color scheme mappings
local colors = {
header1 = "#81a1c1", -- Tokyo Night blue
header2 = "#88c0d0", -- Tokyo Night light blue
header3 = "#8fbcbb", -- Tokyo Night greenish blue
bold = "#eceff4", -- Tokyo Night bright white
italic = "#5e81ac", -- Tokyo Night dark blue
link = "#b48ead", -- Tokyo Night purple
list = "#d08770", -- Tokyo Night orange
}
-- Apply highlights for vimwiki syntax elements
vim.api.nvim_set_hl(0, "VimwikiHeader1", { fg = colors.header1, bold = true })
vim.api.nvim_set_hl(0, "VimwikiHeader2", { fg = colors.header2, bold = true })
vim.api.nvim_set_hl(0, "VimwikiHeader3", { fg = colors.header3, bold = true })
vim.api.nvim_set_hl(0, "VimwikiBold", { fg = colors.bold, bold = true })
vim.api.nvim_set_hl(0, "VimwikiItalic", { fg = colors.italic, italic = true })
vim.api.nvim_set_hl(0, "VimwikiLink", { fg = colors.link, underline = true })
vim.api.nvim_set_hl(0, "VimwikiList", { fg = colors.list })
end
setup_vimwiki_highlights()
-- Define the Lua function for generating the diary template
--
vim.pack.add({
{ src = "https://github.com/vimwiki/vimwiki", opt = true },
})
vim.cmd.packadd("vimwiki")

View File

@@ -4,10 +4,15 @@
imports =
[
./shares.nix
./sops.nix;
./sops.nix
];
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nix.settings.trusted-users = [ "root" "th3r00t" ];
nix.extraOptions = ''
extra-substituters = https://devenv.cachix.org
extra-trusted-public-keys = devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=
'';
time.timeZone = "America/New_York";
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
@@ -35,7 +40,7 @@
"10.0.0.76" = [ "nas nas.lan" ];
"10.0.0.125" = [ "git" "git.lan" ];
"10.0.0.153" = [ "samphone" "samphone.lan" ];
"10.0.0.223" = [ "pve", "pve.lan" ];
"10.0.0.223" = [ "pve" "pve.lan" ];
"10.0.0.39" = [ "chronos" "chronos.lan" ];
"10.0.0.78" = [ "pyshelf" "pyshelf.lan" ];
"10.0.0.121" = [ "titan" "titan.lan" ];

View File

@@ -0,0 +1,104 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ... }:
{
imports = [
./hardware-configuration.nix
./server-partitioning.nix
./configuration-common.nix
];
nixpkgs.config.allowUnfree = true;
nix = {
settings = {
experimental-features = [ "nix-command" "flakes" ];
trusted-users = [ "root" "th3r00t" ];
};
};
boot = {
kernelPackages = pkgs.linuxPackages_latest;
initrd.availableKernelModules = [
"xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"
];
kernelModules = [ "fuse" "cifs" ];
initrd.kernelModules = [ ];
loader.systemd-boot.enable = true;
loader.efi.canTouchEfiVariables = true;
supportedFilesystems = [ "vfat" "btrfs" "cifs" ];
extraModulePackages = [ ];
extraModprobeConfig = ''
'';
};
networking = {
hostName = "Titan"; # Define your hostname.
firewall.enable = true;
firewall.allowedTCPPorts = [ 21 22 80 443 5900 8080 8384];
firewall.allowedUDPPorts = [ 21 22 80 443 5900 8080 8384];
};
time.timeZone = "America/New_York";
i18 = {
defaultLocale = "en_US.UTF-8";
extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
};
fonts = {
enableDefaultPackages = true;
fontDir.enable = true;
packages = with pkgs; [
];
};
users.users.th3r00t = {
isNormalUser = true;
description = "Mike 'th3r00t' Young";
extraGroups = [ "networkmanager" "wheel" "input" ];
packages = with pkgs; [
];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH8P/3yzsruekSaZ9b+yk429VTcfCtI1j8jnkNbPAgnr th3r00t@nixos"
];
};
environment = {
variables.EDITOR = "nvim";
systemPackages = with pkgs; [
git
vim
curl
age
];
};
programs = {
mtr.enable = true;
gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
};
services = {
pulseaudio.enable = false;
rtkit.enable = true;
printing.enable = false;
openssh.enable = true;
};
users.users.root.openssh.authorizedKeys.keys =
[
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH8P/3yzsruekSaZ9b+yk429VTcfCtI1j8jnkNbPAgnr th3r00t@nixos"
];
system.stateVersion = "25.05"; # Did you read the comment?
}

View File

@@ -6,12 +6,9 @@
{
imports =
[ # Include the results of the hardware scan.
./xps13-hardware-configuration.nix
./modules/configuration-common.nix
# ./modules/shares.nix
# ./modules/sops.nix
./modules/laptop.nix
[
./configuration-common.nix
./laptop.nix
];
# Bootloader.
boot = {
@@ -23,61 +20,19 @@
initrd.kernelModules = [ "ath10k_pci" ];
loader.systemd-boot.enable = true;
loader.efi.canTouchEfiVariables = true;
supportedFilesystems = [ "vfat" "ext4" "cifs" ];
supportedFilesystems = [ "vfat" "ext4" "cifs" "exfat" ];
extraModulePackages = [ ];
extraModprobeConfig = ''
options ath10k_pcs irq_mode=1
options ath10k_core rawmode=1
'';
};
# Set your time zone.
# Enable the X11 windowing system.
# You can disable this if you're only using the Wayland session.
# services.xserver.enable = true;
# Enable the KDE Plasma Desktop Environment.
# services.displayManager.sddm.enable = true;
# services.desktopManager.plasma6.enable = true;
# Configure keymap in X11
# services.xserver.xkb = {
# layout = "us";
# variant = "";
# };
# Enable CUPS to print documents.
services.printing.enable = true;
programs.uwsm.enable = true;
programs.hyprland.withUWSM = true;
# Enable sound with pipewire.
services.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
# use the example session manager (no others are packaged yet so this is enabled by default,
# no need to redefine it in your config for now)
#media-session.enable = true;
};
# Enable touchpad support (enabled default in most desktopManager).
services.libinput.enable = true;
fonts = {
enableDefaultPackages = true;
fontDir.enable = true;
packages = with pkgs; [
# nerd-fonts.fira-code
# nerd-fonts.space-mono
# nerd-fonts.sauce-code-pro
# nerd-fonts.monofur
# nerd-fonts.noto
# nerd-fonts.fira-mono
noto-fonts
noto-fonts-cjk-sans
noto-fonts-emoji
@@ -85,9 +40,9 @@
material-design-icons
noto-fonts-emoji
]++ builtins.filter lib.attrsets.isDerivation (builtins.attrValues pkgs.nerd-fonts);
};
# Define a user account. Don't forget to set a password with passwd.
users.users.th3r00t = {
isNormalUser = true;
@@ -99,38 +54,53 @@
];
};
# Enable automatic login for the user.
services.displayManager.autoLogin.enable = true;
services.displayManager.autoLogin.user = "th3r00t";
programs.firefox.enable = true;
programs.hyprland.enable = true;
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
# wget
git
vim
curl
age
];
#media-session.enable = true;
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
programs.mtr.enable = true;
programs = {
mtr.enable = true;
firefox.enable = true;
hyprland = {
enable = true;
withUWSM = true;
};
steam = {
enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
localNetworkGameTransfers.openFirewall = true;
};
# uwsm.enable = true;
};
# List services that you want to enable:
# Enable the OpenSSH daemon.
services.openssh.enable = true;
services = {
openssh.enable = true;
displayManager.autoLogin.enable = true;
displayManager.autoLogin.user = "th3r00t";
pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
};
udisks2.enable = false;
printing.enable = true;
pulseaudio.enable = false;
libinput.enable = true;
logmein-hamachi.enable = true;
};
# Open ports in the firewall.
networking.firewall.allowedTCPPorts = [ 21 22 80 443 5900 8080 ];
networking.firewall.allowedUDPPorts = [ 21 22 80 443 5900 8080 ];
# Or disable the firewall altogether.
networking.firewall.allowedTCPPorts = [ 21 22 80 443 5900 8080 12121 12122 ];
networking.firewall.allowedUDPPorts = [ 21 22 80 443 5900 8080 12121 12122 ];
# networking.firewall.enable = false;
# This value determines the NixOS release from which the default

View File

@@ -12,6 +12,7 @@
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
networking.hostName = "Titan"; # Define your hostname.
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's

View File

@@ -3,6 +3,72 @@
{
imports = [
];
home.packages = with pkgs; [
autossh
fastfetch
ranger
zip
unzip
xz
p7zip
ripgrep
jq
ripgrep
eza
fzf
tmux
cowsay
lolcat
fortune
gnused
gnutar
gnupg
hugo
bat
which
nix-output-monitor
devenv
direnv
irssi
luarocks
lua5_1
lua-language-server
go
nodejs
uv
readline
cachix
sqlite
vifm-full
ranger
zoxide
(
python313.withPackages (
python-pkgs:
[
python-pkgs.prompt_toolkit
python-pkgs.pygments
python-pkgs.pynvim
python-pkgs.pudb
python-pkgs.ptpython
python-pkgs.ipython
]
)
)
pyenv
neovim
zig
nodejs
go
syncthing
lazygit
gopls
pyright
ncurses
rustup
wayvnc
gvfs
];
programs.neovim.plugins = [
pkgs.vimPlugins.nvim-treesitter.withAllGrammars
@@ -12,6 +78,7 @@
};
services.syncthing = {
enable = true;
guiAddress = "0.0.0.0:8384";
};
programs.ranger = {
enable = true;
@@ -90,24 +157,26 @@
tmuxPlugins.vim-tmux-navigator
tmuxPlugins.vim-tmux-focus-events
tmuxPlugins.urlview
tmuxPlugins.tmux-fzf
{
plugin = tmuxPlugins.tokyo-night-tmux;
extraConfig = ''
set -g @tokyo-night-tmux_window_id_style digital
set -g @tokyo-night-tmux_pane_id_style hsquare
set -g @tokyo-night-tmux_zoom_id_style dsquare
set -g @tokyo-night-tmux_show_netspeed 1
set -g @tokyo-night-tmux_netspeed_iface "wlp2s0" # Detected via default route
set -g @tokyo-night-tmux_netspeed_showip 1 # Display IPv4 address (default 0)
set -g @tokyo-night-tmux_netspeed_refresh 1 # Update interval in seconds (default 1)
set -g @tokyo-night-tmux_show_path 1
set -g @tokyo-night-tmux_path_format relative # 'relative' or 'full'
set -g @tokyo-night-tmux_show_battery_widget 1
set -g @tokyo-night-tmux_battery_name "BAT0" # some linux distro have 'BAT0'
set -g @tokyo-night-tmux_battery_low_threshold 21 # default
if-shell "[[ $(hostname) = 'xps13' ]]" {
# set -g @tokyo-night-tmux_show_netspeed 1
set -g @tokyo-night-tmux_netspeed_iface 'wlp2s0'
set -g @tokyo-night-tmux_netspeed_showip 1
# set -g @tokyo-night-tmux_netspeed_refresh 1
set -g @tokyo-night-tmux_show_battery_widget 1
set -g @tokyo-night-tmux_battery_name "BAT0"
set -g @tokyo-night-tmux_battery_low_threshold 21
}
'';
}
tmuxPlugins.tmux-fzf
# {
# plugin = tmuxPlugins.tilish;
# extraConfig = ''
@@ -125,11 +194,18 @@
# terminal = "xterm-kitty:RGB";
tmuxinator.enable = true;
extraConfig = ''
if-shell "[[ $(hostname) = 'xps13' ]]" {
set-option -as terminal-features 'foot:RGB'
}
if-shell "[[ $(hostname) = 'Titan' ]]" {
set-option -as terminal-features 'xterm-256color:RGB'
set -g default-terminal "tmux-256color"
set -g terminal-overrides ",xterm-256color:RGB"
}
set-option -g update-environment "DISPLAY XAUTHORITY WAYLAND_DISPLAY XDG_RUNTIME_DIR HYPRLAND_INSTANCE_SIGNATURE"
set -g focus-events on
set -g escape-time 3
set-option -g status-position top
set-option -as terminal-features 'foot:RGB'
set -g default-terminal 'tmux-256color'
bind-key b choose-tree -Z "run-shell 'tmux swap-pane -s %%'"
# bind C-p display-popup -E -w 60% -h 70% 'tmuxsessions.sh'
@@ -139,6 +215,7 @@
# bind C-c display-popup -E -w 50% -h 50% 'nvim +":cd ~/org" ~/org/refile.norg'
# bind C-c display-popup -E -w 50% -h 50% 'nvim +"VimwikiIndex"
bind C-c display-popup -E -w 60% -h 60% "pytui -n"
bind m display-popup -E -w 60% -h 60% "pytui -m"
# bind C-w display-popup -E -w 40% -h 60% "pytui -D"
bind C-o display-popup -E -w 50% -h 50% 'igrep ~/wiki/notes'
@@ -152,7 +229,7 @@
# bind-key -n C-e split-window -v -c '\
#{pane_current_path}' 'vifm\'
bind-key -n C-f split-window 'ranger .'
bind F3 send-keys 'igrep .' C-m
bind F3 send-keys 'igrep .'
'';
};
programs.git = {
@@ -192,7 +269,7 @@ bind F3 send-keys 'igrep .' C-m
port = 8022;
identityFile = "~/.ssh/id_ed25519";
};
git.local = {
git = {
host = "10.0.0.125";
user = "git";
identityFile = "~/.ssh/id_ed25519";

View File

@@ -19,7 +19,7 @@
};
};
decoration = {
rounding = "10";
rounding = "0";
rounding_power = "2";
active_opacity = "1";
inactive_opacity = ".7";
@@ -45,8 +45,8 @@
};
extraConfig = ''
general {
gaps_in = 5
gaps_out = 5
gaps_in = 0
gaps_out = 0
border_size = 1
col.active_border = rgb(b000b5)
col.inactive_border = rgb(1f2335)
@@ -66,16 +66,22 @@
monitor = eDP-1, preferred,0x0,2
# monitor = Virtual-1, 2800x1752@120, 1920x0, 1
$terminal = footclient -e tmux new-session zsh -c '~/.local/usr/bin/tmuxstartup.sh'
$fileManager = footclient -T vifm -e vifm
# $terminal = ghostty
$terminal = footclient
# $terminal = footclient -e tmux new-session zsh -c '~/.local/usr/bin/tmuxstartup.sh'
$fileManager = footclient -T ranger -e ranger
$fileManager = footclient -T ranger -e ranger
$systeminfo = hyprsysteminfo
$menu = wofi --show drun
$browser = qutebrowser
$notes = footclient -T capture -e pytui -n
$manpages = footclient -T capture -e pytui -m
$sysmon = footclient -T system-monitor -e bashtop
$editor = neovide
bind = $mainMod SHIFT, M, exec, hyprvirtmon.py
bind = $mainMod SHIFT, Return, exec, $terminal
bind = $mainMod, D, exec, $editor
bind = $mainMod, E, exec, $fileManager
bind = $mainMod SHIFT, C, killactive
bind = $mainMod SHIFT, Q, exit
@@ -84,6 +90,7 @@
bind = $mainMod, B, exec, $browser
bind = $mainMod, M, exec, $sysmon
bind = $mainMod CTRL, N, exec, $notes
bind = $mainMod CTRL, M, exec, $manpages
# bind = $mainMod, P, exec, $menu
bind = $mainMod, V, togglefloating
bind = $mainMod, P, pseudo, # dwindle
@@ -142,7 +149,7 @@
bindel = ,XF86MonBrightnessUp, exec, brightnessctl -e4 -n2 set 5%+
bindel = ,XF86MonBrightnessDown, exec, brightnessctl -e4 -n2 set 5%-
# Requires playerctl
# Requires playerctl
bindl = , XF86AudioNext, exec, playerctl next
bindl = , XF86AudioPause, exec, playerctl play-pause
bindl = , XF86AudioPlay, exec, playerctl play-pause
@@ -166,6 +173,39 @@
'';
};
programs.hyprlock = {
enable = true;
settings = {
general = {
disable_loading_bar = true;
grace = 300;
hide_cursor = true;
no_fade_in = false;
};
background = [
{
path = "screenshot";
blur_passes = 3;
blur_size = 8;
}
];
input-field = [
{
size = "400, 100";
position = "0, -80";
monitor = "";
dots_center = true;
fade_on_empty = false;
font_color = "rgb(202, 211, 245)";
inner_color = "rgb(91, 96, 120)";
outer_color = "rgb(24, 25, 38)";
outline_thickness = 5;
placeholder_text = "Password";
shadow_passes = 2;
}
];
};
};
services.hyprpaper = {
enable = true;
settings = {
@@ -176,4 +216,25 @@
wallpaper = [ "eDP-1,/etc/nixos/home/Wallpapers/nord1.jpg" ];
};
};
services.hypridle = {
enable = true;
settings = {
general = {
after_sleep_cmd = "hyprctl dispatch dpms on";
ignore_dbus_inhibit = false;
lock_cmd = "hyprlock";
};
listener = [
{
timeout = 300;
on-timeout = "hyprlock";
}
{
timeout = 600;
on-timeout = "hyprctl dispatch dpms off";
on-resume = "hyprctl dispatch dpms on";
}
];
};
};
}