Initial Commit

This commit is contained in:
2024-10-02 00:54:05 -05:00
commit 46ebfc5cb6
45 changed files with 4120 additions and 0 deletions

54
programs/ags/flake.nix Normal file
View File

@@ -0,0 +1,54 @@
{
description = "ags config";
inputs = {
ags.url = "github:Aylur/ags";
};
outputs = { self, ... }@inputs: {
module = { config, lib, pkgs, ... }: {
services = {
upower.enable = true;
gvfs.enable = true;
power-profiles-daemon.enable = true;
};
};
hmModule = { config, lib, pkgs, ... }: {
imports = [ inputs.ags.homeManagerModules.default ];
programs.ags = {
enable = true;
extraPackages = with pkgs; [
gtksourceview
webkitgtk
accountsservice
];
};
home.file.".config/ags/launcher.js".text = ''
function Launcher() {
return Widget.EventBox({
class_name: "launcher",
hpack: "center",
child: Widget.Icon({
icon: '${pkgs.nixos-icons}/share/icons/hicolor/48x48/apps/nix-snowflake.png',
css: 'font-size: 24px;'
}),
on_primary_click: () => {Utils.execAsync('rofi -show drun')},
margin_left: 10,
})
}
export default Launcher
'';
};
};
}

View File

@@ -0,0 +1,7 @@
{ config, lib, pkgs, ... }: {
home.packages = with pkgs; [
calcurse
libnotify
];
}

44
programs/flake.nix Normal file
View File

@@ -0,0 +1,44 @@
{
description = "Nathan user program config";
inputs = {
ags.url = "./ags";
neovim.url = "./neovim";
terminal.url = "./terminal"; #home manager only
rofi.url = "./rofi";
pywal.url = "./pywal";
hyprland.url = "./hyprland";
};
outputs = { self, ... }@inputs: {
module = { config, lib, pkgs, ... }: {
imports = [
inputs.hyprland.module
inputs.ags.module
];
};
hmModule = { config, lib, pkgs, ... }: {
imports = [
inputs.ags.hmModule
inputs.neovim.hmModule
inputs.hyprland.hmModule
inputs.terminal.hmModule
inputs.rofi.hmModule
inputs.pywal.hmModule
./calcurse
];
};
};
}

353
programs/hyprland/flake.nix Normal file
View File

@@ -0,0 +1,353 @@
{
description = "Hyprland Config";
inputs = {
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
};
outputs = { self, ... }@inputs: {
module = { config, lib, pkgs, ... }: {
programs.hyprland = {
enable = true;
xwayland.enable = true;
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
portalPackage = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
};
};
hmModule = { config, lib, pkgs, ... }: {
home.sessionVariables.NIX_OZONE_WL = "1";
programs.kitty.enable = lib.mkDefault true;
home.packages = with pkgs; [
pyprland
];
home.file.".config/hypr/pyprland.toml".text = ''
[pyprland]
plugins = [
"scratchpads"
]
[scratchpads.nvim]
animation = "fromTop"
command = "kitty --class scratchpad-nvim -e nvim ~"
lazy = false
class = "scratchpad-nvim"
margin = 100
multi = true
excludes = "*"
[scratchpads.free]
animation = "fromBottom"
command = "kitty --class scratchpad"
class = "scratchpad"
lazy = false
margin = 100
multi = true
excludes = "*"
'';
wayland.windowManager.hyprland = {
enable = true;
systemd.variables = [ "--all" ];
extraConfig = ''
#------------------------------------------------#
# _ _ _ _ #
#| | | | | | | | #
#| |___| |_ _ ____ _ _| | __ _.-.___ ___| | #
#| ___ | | | | _ \| |/ | |/ _` | _ \/ _ | #
#| | | | |_| | |_) | /| | (_| | | | | (_| | #
#|_| |_|\__, | __/|__| |_|\__,_|_| |_|\___/_| #
# |___/|_| #
# #
#------------------------------------------------#
monitor=eDP-1,1920x1080@300,0x0,1
#monitor=eDP-1, addreserved, 0, 0, 45, 0
exec-once=onSystemStart
# Some default env vars.
env = XCURSOR_SIZE,16
source = ./otf.conf
source = ~/.cache/wal/colors-hypr.conf
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
input {
kb_layout = us
kb_variant =
kb_model =
kb_options =
kb_rules =
follow_mouse = 1
touchpad {
natural_scroll = yes
}
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
}
cursor {
no_hardware_cursors = true
}
general {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
gaps_in = 5
gaps_out = 4
border_size = 2
col.active_border = $color1 $color5 100deg
col.inactive_border = $color0
layout = dwindle
}
decoration { # See https://wiki.hyprland.org/Configuring/Variables/ for more
rounding = 2
blur {
enabled = false
}
drop_shadow = yes
shadow_range = 4
shadow_render_power = 3
col.shadow = rgba(1a1a1aee)
}
animations {
enabled = yes
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
animation = windows, 1, 7, myBezier
animation = windowsOut, 1, 7, default, popin 80%
animation = border, 1, 10, default
animation = borderangle, 1, 8, default
animation = fade, 1, 7, default
animation = workspaces, 1, 6, default
}
dwindle {
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
preserve_split = yes # you probably want this
}
master {
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
new_status = "master"
}
gestures {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
workspace_swipe = off
}
misc {
disable_hyprland_logo = false
disable_splash_rendering = true
force_default_wallpaper = 2
}
# Binds
$mainMod = ALT
bind = $mainMod, E, exec, colorPrefix kitty
bind = $mainMod, B, exec, firefox
bind = $mainMod SHIFT, B, exec, firefox --private-window
bind = $mainMod, Q, killactive,
bind = $mainMod, R, exec, colorPrefix kitty -e _systemRebuild
bind = $mainMod SHIFT, R, exec, colorPrefix kitty -e _homeRebuild
bind = $mainMod, C, exec, colorPrefix kitty -e bash -c "cd ~/.nixos; nvim /home/nathan/.nixos/flake.nix"
bind = $mainMod, F, exec, thunar
bind = $mainMod SHIFT, F, fullscreen
bind = $mainMod, semicolon, exec, colorPrefix kitty -e nvim ~
bind = $mainMod, Insert, exec, libreoffice &
bind = $mainMod, H, exec, bluetoothctl connect 88:D0:39:F9:83:CE
bind = $mainMod, V, togglefloating,
bind = $mainMod SHIFT, V, exec, vlc &
bind = , Menu, exec, rofi -show drun
bind = $mainMod, Menu, exec, killall .ags-wrapped; ags &
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, Z, togglesplit, # dwindle
bind = $mainMod, M, exec, spotify
bind = $mainMod SHIFT, M, exec, firefox --new-window soundcloud.com/you/library
bind = $mainMod CTRL, M, exec, colorPrefix kitty -e ncmpcpp -s browser
bind = $mainMod, XF86AudioPlay, exec, mpc load casual
bind = , XF86AudioPlay, exec, ${pkgs.playerctl}/bin/playerctl play-pause
bind = , XF86AudioPause, exec, ${pkgs.playerctl}/bin/playerctl pause
bind = $mainMod, F9, exec, ${pkgs.playerctl}/bin/playerctl pause
bind = , XF86AudioNext, exec, ${pkgs.playerctl}/bin/playerctl next
bind = , XF86AudioPrev, exec, ${pkgs.playerctl}/bin/playerctl previous
bind = , XF86Launch2, exec, steam &
bind = $mainMod, XF86Launch2, exec, prismlauncher
bind = , XF86Calculator, exec, geogebra
bind = $mainMod SHIFT, Print, exec, firefox --new-window localhost:631
bind = , Print, exec, grim -g "$(slurp)"
bind = $mainMod, Return, exec, ${pkgs.vesktop}/bin/vesktop --enable-features=UseOzonePlatform --ozone-platform=wayland &
bind = $mainMod CTRL, Return, exec, firefox --new-window https://discord.com/app
# Move focus with mainMod + arrow keys
bind = $mainMod, A, movefocus, l
bind = $mainMod, D, movefocus, r
bind = $mainMod, W, movefocus, u
bind = $mainMod, S, movefocus, d
# Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2
bind = $mainMod, 3, workspace, 3
bind = $mainMod, 4, workspace, 4
bind = $mainMod, 5, workspace, 5
bind = $mainMod, 6, workspace, 6
bind = $mainMod, 7, workspace, 7
bind = $mainMod, 8, workspace, 8
bind = $mainMod, 9, workspace, 9
bind = $mainMod, 0, workspace, 10
bind = $mainMod, Home, workspace, 11
# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, movetoworkspace, 1
bind = $mainMod SHIFT, 2, movetoworkspace, 2
bind = $mainMod SHIFT, 3, movetoworkspace, 3
bind = $mainMod SHIFT, 4, movetoworkspace, 4
bind = $mainMod SHIFT, 5, movetoworkspace, 5
bind = $mainMod SHIFT, 6, movetoworkspace, 6
bind = $mainMod SHIFT, 7, movetoworkspace, 7
bind = $mainMod SHIFT, 8, movetoworkspace, 8
bind = $mainMod SHIFT, 9, movetoworkspace, 9
bind = $mainMod SHIFT, 0, movetoworkspace, 10
bind = $mainMod SHIFT, Home, movetoworkspace, 11
# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, right, workspace, e+1
bind = $mainMod, left, workspace, e-1
#switch network connections
bind = CTRL SHIFT, Escape, exec, nmcli device down wlo1
bind = CTRL SHIFT, 0, exec, nmcli device down wlo1; nmcli connection up Hotspot
bind = CTRL SHIFT, 1, exec, nmcli device wifi connect EagleNet password ~?C##@ZiH
bind = CTRL SHIFT, 2, exec, nmcli device down wlo1; nmcli device wifi connect CXNK00813829 password a8d859c8cfb420ab
bind = CTRL SHIFT, 3, exec, nmcli device down wlo1; nmcli device wifi connect ATT9MhT2ql password 325qxr89u?3t
#brightness keys
bind = , XF86MonBrightnessUp, exec, brightnessctl set +10%
bind = , XF86MonBrightnessDown, exec, brightnessctl set 10%-
#volume keys
binde = , XF86AudioRaiseVolume, exec, amixer -D default sset Master 10%+
binde = , XF86AudioLowerVolume, exec, amixer -D default sset Master 10%-
bind = , XF86AudioMute, exec, amixer -D default sset Master toggle
#screen lock key
bind = $mainMod, F12, exec, swaylock
#logout shortcut
bind = CTRL ALT, Delete, exec, loginctl kill-session self
# Move/resize windows with mainMod + LMB/RMB and dragging
bind = $mainMod SHIFT, W, movewindow, u
bind = $mainMod SHIFT, S, movewindow, d
bind = $mainMod SHIFT, A, movewindow, l
bind = $mainMod SHIFT, D, movewindow, r
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod SHIFT, mouse:272, resizewindow
$scratchpadsize = size 60% 80%
$scratchpad = class:^(scratchpad)$
windowrulev2 = float, $scratchpad
windowrulev2 = $scratchpadsize, $scratchpad
windowrulev2 = workspace special silent, $scratchpad
$kitty = class:^(scratchpad-kitty)$
windowrulev2 = float, $kitty
windowrulev2 = $scratchpadsize, $kitty
windowrulev2 = workspace special silent, $kitty
$nvim = class:^(scratchpad-nvim)$
windowrulev2 = float, $nvim
windowrulev2 = $scratchpadsize, $nvim
windowrulev2 = workspace special silent, $nvim
bind = $mainMod SHIFT, N, exec, colorPrefix pypr toggle nvim
bind = $mainMod SHIFT, E, exec, colorPrefix pypr toggle free
bind = CTRL SHIFT, Home, exec, ssh -i ~/.ssh/key nathan@69.150.99.129 -fL 5900:localhost:5900 sleep 10; vncviewer localhost:5900 -fullscreen
bind = CTRL SHIFT, Home, submap, clean
bind = $mainMod CTRL, Home, submap, clean
submap = clean
bind = $mainMod CTRL, Home, submap, reset
submap = reset
'';
};
};
};
}

271
programs/neovim/flake.nix Normal file
View File

@@ -0,0 +1,271 @@
{
description = "neovim config";
inputs = {
};
outputs = { self, ... }@inputs: {
module = {}: {};
hmModule = { config, lib, pkgs, ... }: {
imports = [];
home.packages = with pkgs; [
neovim-remote
];
home.sessionVariables.SUDO_EDITOR = "kitten edit-in-kitty";
programs.neovim = with pkgs; {
enable = true;
#package = neovim;
defaultEditor = true;
extraLuaConfig = ''
vim.g.mapleader = ' '
vim.g.maplocalleader = ' '
vim.opt.nu = true
vim.opt.rnu = true
vim.opt.scrolloff = 12
vim.opt.tabstop = 4
vim.opt.softtabstop = 4
vim.opt.shiftwidth = 4
vim.opt.expandtab = true
vim.opt.smartindent = true
vim.opt.wrap = false
vim.opt.hlsearch = false
vim.opt.incsearch = true
vim.filetype.add({
pattern = { [".*/hypr/.*%.conf"] = "hyprlang" },
})
-- vim.opt.termguicolors = true
require("nvim-tree").setup()
local lsp_zero = require('lsp-zero')
-- lsp_attach is where you enable features that only work
-- if there is a language server active in the file
local lsp_attach = function(client, bufnr)
local opts = {buffer = bufnr}
vim.keymap.set('n', 'K', '<cmd>lua vim.lsp.buf.hover()<cr>', opts)
vim.keymap.set('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<cr>', opts)
vim.keymap.set('n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<cr>', opts)
vim.keymap.set('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<cr>', opts)
vim.keymap.set('n', 'go', '<cmd>lua vim.lsp.buf.type_definition()<cr>', opts)
vim.keymap.set('n', 'gr', '<cmd>lua vim.lsp.buf.references()<cr>', opts)
vim.keymap.set('n', 'gs', '<cmd>lua vim.lsp.buf.signature_help()<cr>', opts)
vim.keymap.set('n', '<F2>', '<cmd>lua vim.lsp.buf.rename()<cr>', opts)
vim.keymap.set({'n', 'x'}, '<F3>', '<cmd>lua vim.lsp.buf.format({async = true})<cr>', opts)
vim.keymap.set('n', '<F4>', '<cmd>lua vim.lsp.buf.code_action()<cr>', opts)
end
lsp_zero.extend_lspconfig({
sign_text = true,
lsp_attach = lsp_attach,
capabilities = require('cmp_nvim_lsp').default_capabilities(),
})
local lspconfig = require("lspconfig")
lspconfig.ccls.setup{}
lspconfig.nil_ls.setup{}
lspconfig.statix.setup{}
lspconfig.pyright.setup{}
lspconfig.gopls.setup{}
-- local llm = require('llm')
-- llm.setup({
-- api_token = nil, -- cf Install paragraph
-- model = "codellama:7b", -- the model ID, behavior depends on backend
-- backend = "ollama", -- backend ID, "huggingface" | "ollama" | "openai" | "tgi"
-- url = "http://localhost:11434", -- the http url of the backend
-- tokens_to_clear = { "<|endoftext|>" }, -- tokens to remove from the model's output
-- parameters that are added to the request body, values are arbitrary, you can set any field:value pair here it will be passed as is to the backend
-- request_body = {
-- parameters = {
-- temperature = 0.2,
-- top_p = 0.95,
-- },
-- },
-- set this if the model supports fill in the middle
-- fim = {
-- enabled = true,
-- prefix = "<fim_prefix>",
-- middle = "<fim_middle>",
-- suffix = "<fim_suffix>",
-- },
-- debounce_ms = 150,
-- accept_keymap = "<Tab>",
-- dismiss_keymap = "<S-Tab>",
-- tls_skip_verify_insecure = false,
-- llm-ls configuration, cf llm-ls section
-- lsp = {
-- bin_path = vim.api.nvim_call_function("stdpath", { "data" }) .. "${pkgs.llm-ls}/bin/llm-ls",
-- host = nil,
-- port = nil,
-- cmd_env = nil, -- or { LLM_LOG_LEVEL = "DEBUG" } to set the log level of llm-ls
-- version = "0.5.3",
-- },
-- tokenizer = nil, -- cf Tokenizer paragraph
-- context_window = 1024, -- max number of tokens for the context window
-- enable_suggestions_on_startup = true,
-- enable_suggestions_on_files = "*", -- pattern matching syntax to enable suggestions on specific files, either a string or a list of strings
-- disable_url_path_completion = false, -- cf Backend
-- })
local luasnip = require("luasnip")
-- nvim-cmp setup
local cmp = require("cmp")
cmp.setup({
snippet = {
expand = function(args)
luasnip.lsp_expand(args.body)
end,
},
mapping = cmp.mapping.preset.insert({
['<C-u>'] = cmp.mapping.scroll_docs(-4), -- Up
['<C-d>'] = cmp.mapping.scroll_docs(4), -- Down
-- C-b (back) C-f (forward) for snippet placeholder navigation.
['<C-Space>'] = cmp.mapping.complete(),
['<CR>'] = cmp.mapping.confirm {
behavior = cmp.ConfirmBehavior.Replace,
select = true,
},
['<Tab>'] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif luasnip.expand_or_jumpable() then
luasnip.expand_or_jump()
else
fallback()
end
end, { 'i', 's' }),
['<S-Tab>'] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif luasnip.jumpable(-1) then
luasnip.jump(-1)
else
fallback()
end
end, { 'i', 's' }),
}),
sources = {
{ name = 'nvim_lsp' },
{ name = 'luasnip' },
},
})
require("noice").setup()
require("barbar").setup()
require("pywal").setup()
require("lualine").setup({
options = {
theme = 'pywal-nvim',
},
})
vim.cmd[[colorscheme pywal]]
vim.notify = require("notify")
vim.keymap.set("n", "<leader>ff", "<cmd>Telescope find_files<CR>", {desc = "find files"})
vim.keymap.set("n", "<leader>fa", "<cmd>Telescope find_files no_ignore=true hidden=true<CR>", {desc = "find files"})
vim.keymap.set("n", "<leader>fc", "<cmd>Telescope treesitter<CR>", {desc = "find code"})
vim.keymap.set("n", "<leader>t", "<cmd>NvimTreeToggle<CR>", {desc = "toggle tree"})
vim.keymap.set("n", "<C-.>", "<cmd>BufferNext<CR>", {desc = "move to next tab"})
vim.keymap.set("n", "<C-,>", "<cmd>BufferPrevious<CR>", {desc = "move to previous tab"})
vim.keymap.set("n", "<C-h>", "<cmd>wincmd h<CR>", {desc = "move to left window"})
vim.keymap.set("n", "<C-j>", "<cmd>wincmd j<CR>", {desc = "move to below window"})
vim.keymap.set("n", "<C-k>", "<cmd>wincmd k<CR>", {desc = "move to above window"})
vim.keymap.set("n", "<C-l>", "<cmd>wincmd l<CR>", {desc = "move to right window"})
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv", {desc = "move selected down"})
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv", {desc = "move selected up"})
vim.keymap.set("n", "J", "mzJ`z", {desc = "cursor still when appending next line"})
vim.keymap.set("n", "<C-d>", "<C-d>zz", {desc = "cursor mid when page down"})
vim.keymap.set("n", "<C-u>", "<C-u>zz", {desc = "cursor mid when page up"})
vim.keymap.set("n", "n", "nzzzv", {desc = "search term mid"})
vim.keymap.set("n", "N", "Nzzzv", {desc = "search term mid"})
vim.keymap.set("x", "<leader>p", "\"_dP", {desc = "no overwrite paste buffer"})
vim.keymap.set("n", "<leader>y", "\"+y", {desc = "yank to system clipboard"})
vim.keymap.set("v", "<leader>y", "\"+y", {desc = "^"})
vim.keymap.set("n", "<leader>Y", "\"+Y", {desc = "^"})
vim.keymap.set("n", "Q", "<nop>", {desc = "unmap Q"})
vim.keymap.set("n", "<leader>s", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]], {desc = "replace current word entire file"})
vim.keymap.set("n", "<leader>F", function() vim.lsp.buf.format() end, {desc = "format buffer?"})
'';
plugins = with vimPlugins; [
telescope-nvim
nvim-tree-lua
nvim-web-devicons
mini-nvim
noice-nvim
nvim-notify
barbar-nvim
pywal-nvim
lualine-nvim
tokyonight-nvim
llm-nvim
cmp-buffer
cmp-nvim-lsp
cmp_luasnip
luasnip
cmp-path
cmp-cmdline
nvim-cmp
nvim-lspconfig
lsp-zero-nvim
nvim-treesitter
nvim-treesitter-parsers.cpp
nvim-treesitter-parsers.nix
nvim-treesitter-parsers.bash
nvim-treesitter-parsers.python
nvim-treesitter-parsers.lua
nvim-treesitter-parsers.vim
nvim-treesitter-parsers.javascript
nvim-treesitter-parsers.css
nvim-treesitter-parsers.hyprlang
];
extraPackages = with pkgs; [
nil
statix # Lints and suggestions for the nix programming language
pyright
gopls
ccls
];
viAlias = true;
vimAlias = true;
vimdiffAlias = true;
};
};
};
}

17
programs/nixvim/README.md Normal file
View File

@@ -0,0 +1,17 @@
# Nixvim template
This template gives you a good starting point for configuring nixvim standalone.
## Configuring
To start configuring, just add or modify the nix files in `./config`.
If you add a new configuration file, remember to add it to the
[`config/default.nix`](./config/default.nix) file
## Testing your new configuration
To test your configuration simply run the following command
```
nix run .
```

View File

@@ -0,0 +1,6 @@
{
plugins = {
bufferline.enable = true;
web-devicons.enable = true;
};
}

View File

@@ -0,0 +1,176 @@
{ pkgs, ... }: {
# Import all your configuration modules here
imports = [ ./bufferline.nix ];
plugins = {
lualine.enable = true;
luasnip.enable = true;
barbar.enable = true;
nvim-tree.enable = true;
noice.enable = true;
mini.enable = true;
notify.enable = true;
telescope.enable = true;
treesitter.enable = true;
web-devicons.enable = true;
lsp = {
enable = true;
servers = {
#js/typescript
ts-ls.enable = true;
#c/c++
ccls.enable = true;
#nix
nil-ls.enable = true;
#python
pyright.enable = true;
#bash
bashls.enable = true;
#css
cssls.enable = true;
};
};
cmp = {
enable = true;
autoEnableSources = true;
settings = {
sources = [
{ name = "nvim_lsp"; }
{ name = "path"; }
{ name = "buffer"; }
{ name = "luasnip"; }
{ name = "cmdline"; }
];
};
};
};
globals = {
mapleader = " ";
maplocalleader = " ";
};
opts = {
nu = true;
rnu = true;
scrolloff = 12;
tabstop = 4;
softtabstop = 4;
shiftwidth = 4;
expandtab = true;
smartindent = true;
wrap = false;
hlsearch = false;
incsearch = true;
};
keymaps = [
{
mode = "n";
key = "<leader>ff";
action = "<cmd>Telescope find_files hidden=true<CR>";
}
{
mode = "n";
key = "<leader>fc";
action = "<cmd>Telescope treesitter<CR>";
}
{
mode = "n";
key = "<leader>t";
action = "<cmd>NvimTreeToggle<CR>";
}
{
mode = "n";
key = "<C-.>";
action = "<cmd>BufferNext<CR>";
}
{
mode = "n";
key = "<C-,>";
action = "<cmd>BufferPrevious<CR>";
}
{
mode = "n";
key = "<C-h>";
action = "<cmd>wincmd h<CR>";
}
{
mode = "n";
key = "<C-j>";
action = "<cmd>wincmd j<CR>";
}
{
mode = "n";
key = "<C-k>";
action = "<cmd>wincmd k<CR>";
}
{
mode = "n";
key = "<C-l>";
action = "<cmd>wincmd l<CR>";
}
{
mode = "n";
key = "Q";
action = "<nop>";
}
{
mode = "v";
key = "J";
action = ":m '>+1<CR>gv=gv";
}
{
mode = "v";
key = "K";
action = ":m '<-2<CR>gv=gv";
}
];
extraConfigLua = ''
vim.filetype.add({
pattern = { [".*/hypr/.*%.conf"] = "hyprlang" },
})
'';
extraPlugins = with pkgs.vimPlugins; [
pywal-nvim
tokyonight-nvim
llm-nvim
nvim-lspconfig
];
colorscheme = "pywal";
}

327
programs/nixvim/flake.lock generated Normal file
View File

@@ -0,0 +1,327 @@
{
"nodes": {
"devshell": {
"inputs": {
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1722113426,
"narHash": "sha256-Yo/3loq572A8Su6aY5GP56knpuKYRvM2a1meP9oJZCw=",
"owner": "numtide",
"repo": "devshell",
"rev": "67cce7359e4cd3c45296fb4aaf6a19e2a9c757ae",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "devshell",
"type": "github"
}
},
"flake-compat": {
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"revCount": 57,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1726153070,
"narHash": "sha256-HO4zgY0ekfwO5bX0QH/3kJ/h4KvUDFZg8YpkNwIbg1U=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "bcef6817a8b2aa20a5a6dbb19b43e63c5bf8619a",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1726153070,
"narHash": "sha256-HO4zgY0ekfwO5bX0QH/3kJ/h4KvUDFZg8YpkNwIbg1U=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "bcef6817a8b2aa20a5a6dbb19b43e63c5bf8619a",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"git-hooks": {
"inputs": {
"flake-compat": [
"nixvim",
"flake-compat"
],
"gitignore": "gitignore",
"nixpkgs": [
"nixvim",
"nixpkgs"
],
"nixpkgs-stable": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1726745158,
"narHash": "sha256-D5AegvGoEjt4rkKedmxlSEmC+nNLMBPWFxvmYnVLhjk=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "4e743a6920eab45e8ba0fbe49dc459f1423a4b74",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "git-hooks.nix",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"nixvim",
"git-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709087332,
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1726902823,
"narHash": "sha256-Gkc7pwTVLKj4HSvRt8tXNvosl8RS9hrBAEhOjAE0Tt4=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "14929f7089268481d86b83ed31ffd88713dcd415",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"nix-darwin": {
"inputs": {
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1726742753,
"narHash": "sha256-QclpWrIFIg/yvWRiOUaMp1WR+TGUE9tb7RE31xHlxWc=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "c03f85fa42d68d1056ca1740f3113b04f3addff2",
"type": "github"
},
"original": {
"owner": "lnl7",
"repo": "nix-darwin",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1726937504,
"narHash": "sha256-bvGoiQBvponpZh8ClUcmJ6QnsNKw0EMrCQJARK3bI1c=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "9357f4f23713673f310988025d9dc261c20e70c6",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-lib": {
"locked": {
"lastModified": 1725233747,
"narHash": "sha256-Ss8QWLXdr2JCBPcYChJhz4xJm+h/xjl4G0c0XlP6a74=",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1726755586,
"narHash": "sha256-PmUr/2GQGvFTIJ6/Tvsins7Q43KTMvMFhvG6oaYK+Wk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c04d5652cfa9742b1d519688f65d1bbccea9eb7e",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixvim": {
"inputs": {
"devshell": "devshell",
"flake-compat": "flake-compat",
"flake-parts": "flake-parts_2",
"git-hooks": "git-hooks",
"home-manager": "home-manager",
"nix-darwin": "nix-darwin",
"nixpkgs": "nixpkgs_2",
"nuschtosSearch": "nuschtosSearch",
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1727118532,
"narHash": "sha256-nRzlwdPaSb1UCoqndT52AUNpx9e8wLCEjY28eAkCHIg=",
"owner": "nix-community",
"repo": "nixvim",
"rev": "47364df49645e89d8aa03aa61c893e12ecbac366",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixvim",
"type": "github"
}
},
"nuschtosSearch": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1726816132,
"narHash": "sha256-AbB0lgc0IbzLIxj1O3cosiMNAVQak4KJtvq9q8MjHhs=",
"owner": "NuschtOS",
"repo": "search",
"rev": "7733a39a1321057172d87e6251ded7cdeb67171e",
"type": "github"
},
"original": {
"owner": "NuschtOS",
"repo": "search",
"type": "github"
}
},
"root": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": "nixpkgs",
"nixvim": "nixvim"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"treefmt-nix": {
"inputs": {
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1726734507,
"narHash": "sha256-VUH5O5AcOSxb0uL/m34dDkxFKP6WLQ6y4I1B4+N3L2w=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "ee41a466c2255a3abe6bc50fc6be927cdee57a9f",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

47
programs/nixvim/flake.nix Normal file
View File

@@ -0,0 +1,47 @@
{
description = "A nixvim configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixvim.url = "github:nix-community/nixvim";
flake-parts.url = "github:hercules-ci/flake-parts";
};
outputs =
{ nixvim, flake-parts, ... }@inputs:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
perSystem =
{ pkgs, system, ... }:
let
nixvimLib = nixvim.lib.${system};
nixvim' = nixvim.legacyPackages.${system};
nixvimModule = {
inherit pkgs;
module = import ./config; # import the module directly
# You can use `extraSpecialArgs` to pass additional arguments to your module files
extraSpecialArgs = {
inherit pkgs;
};
};
nvim = nixvim'.makeNixvimWithModule nixvimModule;
in
{
checks = {
# Run `nix flake check .` to verify that your config is not broken
default = nixvimLib.check.mkTestDerivationFromNixvimModule nixvimModule;
};
packages = {
# Lets you run `nix run .` to start nixvim
default = nvim;
};
};
};
}

81
programs/pywal/flake.nix Normal file
View File

@@ -0,0 +1,81 @@
{
description = "Pywal Config";
inputs = {
themecord = {
url = "github:danihek/themecord";
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
};
spicetify-nix = {
url = "github:Gerg-L/spicetify-nix";
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
};
spicetify-ext = {
url = "github:rxri/spicetify-extensions";
flake = false;
};
nixpkgs-us.url = "github:nixos/nixpkgs/nixos-unstable";
};
outputs = { self, ... }@inputs: let
system = "x86_64-linux";
pkgs-us = import inputs.nixpkgs-us {
inherit system;
config.allowUnfree = true;
};
in {
hmModule = { config, lib, pkgs, ... }: let
pywalfox-wrapper = pkgs.writeShellScriptBin "pywalfox-wrapper" ''
${pkgs.pywalfox-native}/bin/pywalfox start
'';
in {
imports = [
inputs.spicetify-nix.homeManagerModules.default
];
programs.spicetify = let
spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.system};
in {
enable = true;
spotifyPackage = pkgs-us.spotify;
theme = spicePkgs.themes.default;
enabledExtensions = with spicePkgs.extensions; [
({
src = "${inputs.spicetify-ext}/adblock";
name = "adblock.js";
})
copyToClipboard
oneko
#randomBadToTheBoneRiff #this could be hilarious
];
enabledCustomApps = with spicePkgs.apps; [
ncsVisualizer
];
};
home.packages = with pkgs; [
inputs.themecord.packages.${pkgs.system}.default
vesktop
pkgs-us.pywal16
pywalfox-native
];
home.file.".mozilla/native-messaging-hosts/pywalfox.json".text = lib.replaceStrings [ "<path>" ] [
"${pywalfox-wrapper}/bin/pywalfox-wrapper"
]
(lib.readFile "${pkgs.pywalfox-native}/lib/python3.11/site-packages/pywalfox/assets/manifest.json");
};
};
}

23
programs/rofi/flake.nix Normal file
View File

@@ -0,0 +1,23 @@
{
description = "Rofi Config";
inputs = {
};
outputs = { self, ... }: {
hmModule = { config, lib, pkgs, ... }: {
programs.rofi = {
enable = true;
package = pkgs.rofi-wayland;
cycle = true;
theme = "/home/nathan/.cache/wal/colors-rofi-dark.rasi";
};
};
};
}

View File

@@ -0,0 +1,18 @@
{ config, lib, pkgs, ... }: {
programs.bat = {
enable = true;
extraPackages = with pkgs.bat-extras; [
batman
batpipe
batgrep
batdiff
batwatch
prettybat
];
};
}

View File

@@ -0,0 +1,11 @@
{
description = "bat config";
inputs = {};
outputs = { self, ... }: {
hmModule = import ./bat.nix;
};
}

View File

@@ -0,0 +1,17 @@
{ config, lib, pkgs, ... }: {
programs.eza = {
enable = true;
enableZshIntegration = true;
extraOptions = [
"--color=auto"
];
git = true;
icons = true;
};
}

View File

@@ -0,0 +1,11 @@
{
description = "eza config";
inputs = {};
outputs = { self, ... }: {
hmModule = import ./eza.nix;
};
}

View File

@@ -0,0 +1,29 @@
{
description = "terminal config";
inputs = {
eza.url = "./eza";
bat.url = "./bat";
fzf.url = "./fzf";
zoxide.url = "./zoxide";
kitty.url = "./kitty";
tmux.url = "./tmux";
zsh.url = "./zsh";
};
outputs = { self, ... }@inputs: {
hmModule = { config, lib, pkgs, ... }: {
imports = [
inputs.eza.hmModule
inputs.bat.hmModule
inputs.fzf.hmModule
inputs.zoxide.hmModule
inputs.kitty.hmModule
inputs.tmux.hmModule
inputs.zsh.hmModule
];
};
};
}

View File

@@ -0,0 +1,11 @@
{
description = "fzf config";
inputs = {};
outputs = { self, ... }: {
hmModule = import ./fzf.nix;
};
}

View File

@@ -0,0 +1,15 @@
{ config, lib, pkgs, ... }: {
programs.fzf = {
enable = true;
enableZshIntegration = true;
tmux = {
#enableShellIntegration = true;
#shellIntegrationOptions = [];
};
};
}

View File

@@ -0,0 +1,13 @@
{
description = "Kitty Config";
inputs = {
};
outputs = { self, ... }: {
hmModule = import ./kitty.nix;
};
}

View File

@@ -0,0 +1,33 @@
{ config, lib, pkgs, ... }: {
programs.kitty = {
enable = true;
font = {
name = "FiraCode Nerd Font";
size = 12;
};
extraConfig = ''
confirm_os_window_close 0
include ${config.home.homeDirectory}/.cache/wal/colors-kitty.conf
disable_ligatures never
dynamic_background_opacity yes
tab_bar_edge top
map ctrl+shift+t new_tab
map ctrl+shift+w close_tab
map ctrl+tab next_tab
map ctrl+shift+tab previous_tab
'';
};
}

View File

@@ -0,0 +1,11 @@
{
description = "Tmux config";
inputs = {};
outputs = { self, ... }: {
hmModule = import ./tmux.nix;
};
}

View File

@@ -0,0 +1,23 @@
{ config, lib, pkgs, ... }: {
programs.tmux = {
enable = true;
clock24 = true;
mouse = true;
baseIndex = 1;
keyMode = "vi";
prefix = "C-b";
shell = "${pkgs.zsh}/bin/zsh";
};
}

View File

@@ -0,0 +1,11 @@
{
description = "Zoxide config";
inputs = {};
outputs = { self, ... }: {
hmModule = import ./zoxide.nix;
};
}

View File

@@ -0,0 +1,13 @@
{ config, lib, pkgs, ... }: {
programs.zoxide = {
enable = true;
enableZshIntegration = true;
options = [
"--cmd cd"
];
};
}

View File

@@ -0,0 +1,11 @@
{
description = "zsh config";
inputs = {};
outputs = { self, ... }: {
hmModule = import ./zsh.nix;
};
}

View File

@@ -0,0 +1,153 @@
{ config, lib, pkgs, ... }: {
home.packages = with pkgs; [
oh-my-posh
];
programs.zsh = {
enable = true;
enableCompletion = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
shellAliases = {
ls = "eza";
ll = "ls -l";
ksh = "kitten ssh";
};
history = {
size = 5000;
ignoreAllDups = true;
ignoreSpace = true;
share = true;
};
initExtraFirst = ''
cat ${config.home.homeDirectory}/.cache/wal/sequences
eval "$(oh-my-posh init zsh --config ${config.home.homeDirectory}/.cache/wal/ohmyposh.toml)"
'';
};
home.file.".config/wal/templates/ohmyposh.toml".text = ''
#:schema https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json
version = 2
final_space = true
console_title_template = '{{{{ .Shell }}}} in {{{{ .Folder }}}}'
[[blocks]]
type = 'prompt'
alignment = 'left'
newline = true
[[blocks.segments]]
type = 'os'
style = 'diamond'
trailing_diamond = ''
background = 'p:c1'
foreground = 'p:c12'
template = ' {{{{ .Icon }}}} '
[[blocks.segments]]
type = 'session'
style = 'diamond'
trailing_diamond = ''
background = 'p:c2'
foreground = 'p:c14'
template = '{{{{ .UserName }}}}@{{{{ .HostName }}}}'
[[blocks.segments]]
type = 'path'
style = 'diamond'
trailing_diamond = ''
background = 'p:c4'
foreground = 'p:c13'
template = '{{{{ .Path }}}}'
[blocks.segments.properties]
style = 'full'
[[blocks]]
type = 'prompt'
overflow = 'hidden'
alignment = 'right'
[[blocks.segments]]
type = 'executiontime'
style = 'diamond'
leading_diamond = ''
background = 'p:c4'
foreground = 'p:c13'
template = '{{{{ .FormattedMs }}}}'
[[blocks.segments]]
type = 'time'
style = 'diamond'
leading_diamond = ''
background = 'p:c2'
foreground = 'p:c14'
[[blocks.segments]]
type = 'shell'
style = 'diamond'
leading_diamond = ''
background = 'p:c1'
foreground = 'p:c12'
[[blocks]]
type = 'prompt'
alignment = 'left'
newline = true
[[blocks.segments]]
type = 'text'
style = 'plain'
background = 'transparent'
foreground_templates = [
"{{{{ if gt .Code 0 }}}}p:c13{{{{end}}}}",
"{{{{ if eq .Code 0 }}}}p:c14{{{{end}}}}",
]
template = "{{{{ if gt .Code 0 }}}}! {{{{else}}}} {{{{end}}}}"
[transient_prompt]
foreground_templates = [
"{{{{ if gt .Code 0 }}}}p:c13{{{{end}}}}",
"{{{{ if eq .Code 0 }}}}p:c14{{{{end}}}}",
]
background = 'transparent'
template = "{{{{ if gt .Code 0 }}}}! {{{{else}}}} {{{{end}}}}"
[secondary_prompt]
background = 'transparent'
forground = 'p:c14'
template = " "
[palette]
c0 = "{color0}"
c1 = "{color1}"
c2 = "{color2}"
c3 = "{color3}"
c4 = "{color4}"
c5 = "{color5}"
c6 = "{color6}"
c7 = "{color7}"
c8 = "{color8}"
c9 = "{color9}"
c10 = "{color10}"
c11 = "{color11}"
c12 = "{color12}"
c13 = "{color13}"
c14 = "{color14}"
c15 = "{color15}"
'';
}