misc
This commit is contained in:
1 parent
d1cb788ec6
commit
f85e11c817
4 files changed
+2
-267
No files matched your search
@@ -40,6 +40,7 @@
|
||||
# tools
|
||||
fastfetch
|
||||
gparted
|
||||
ranger
|
||||
killall
|
||||
tealdeer
|
||||
unrar
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{ pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
services.displayManager.sddm.enable = true;
|
||||
services.displayManager.gdm.enable = true; # TODO: look into ly/greetd/something less heavy
|
||||
services.displayManager.autoLogin = {
|
||||
enable = true;
|
||||
user = "djai";
|
||||
|
||||
-136
@@ -1,136 +0,0 @@
|
||||
{ pkgs, inputs, ... }:
|
||||
|
||||
let
|
||||
system = pkgs.stdenv.hostPlatform.system;
|
||||
nvchad = inputs.nix4nvchad.packages.${system}.default.override {
|
||||
extraConfig = ''
|
||||
local map = vim.keymap.set
|
||||
local builtin = require('telescope.builtin')
|
||||
|
||||
map("n", ";", ":", { desc = "CMD enter command mode" })
|
||||
map("n", "<leader>sw", "<cmd> set wrap! <CR>", {desc = "Toggle text wrapping"})
|
||||
map("n", "<leader>fm", function() require("conform").format() end, {desc = "Format with conform"})
|
||||
map("n", "<leader>-", "<cmd> Oil <CR>", {desc = "Open directory in oil"})
|
||||
map("n", "<leader>rcu", function() require('crates').upgrade_all_crates() end, {desc = "Upgrade rust crates"})
|
||||
map("n", "<leader>ca", function() vim.lsp.buf.code_action() end, {desc = "Lsp code action"})
|
||||
map("n", "<leader>gr", function() vim.lsp.buf.references() end, {desc = "Lsp references"})
|
||||
map("n", "<leader>gm", "<cmd>Telescope git_commits<CR>", { desc = "telescope git commits" })
|
||||
|
||||
map('n', '<leader>fi', function()
|
||||
builtin.live_grep({
|
||||
prompt_title = "Files matching TODO",
|
||||
default_text = "(TODO|todo|FIXME|THOUGHT|REFACTOR|TEST)",
|
||||
})
|
||||
end, {desc = "find comments using telescope"})
|
||||
|
||||
-- stay in v mode after indenting
|
||||
map("v", "<", "<gv")
|
||||
map("v", ">", ">gv")
|
||||
'';
|
||||
|
||||
extraPlugins = ''
|
||||
return {
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
config = function()
|
||||
require "configs.lspconfig"
|
||||
end,
|
||||
},{
|
||||
"rcarriga/nvim-notify",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
local notify = require "notify"
|
||||
notify.setup {
|
||||
background_colour = "#2D3540",
|
||||
}
|
||||
vim.notify = notify
|
||||
end,
|
||||
},{
|
||||
"stevearc/oil.nvim",
|
||||
opts = {},
|
||||
dependencies = { "nvim-tree/nvim-web-devicons"},
|
||||
lazy = false
|
||||
},{
|
||||
'saecki/crates.nvim',
|
||||
event = { "BufRead Cargo.toml" },
|
||||
config = function()
|
||||
require('crates').setup()
|
||||
end,
|
||||
},{
|
||||
"jglasovic/venv-lsp.nvim",
|
||||
config = function()
|
||||
require("venv-lsp").setup()
|
||||
end,
|
||||
lazy = false,
|
||||
}
|
||||
}
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
programs.java.enable = true;
|
||||
programs.nix-ld.libraries = with pkgs; [
|
||||
stdenv.cc.cc.lib
|
||||
zlib
|
||||
ncurses5
|
||||
libGL
|
||||
libGLU
|
||||
vulkan-loader
|
||||
libdrm
|
||||
mesa
|
||||
libx11
|
||||
libxcursor
|
||||
libxrandr
|
||||
libxi
|
||||
libxext
|
||||
libxfixes
|
||||
libxcb
|
||||
wayland
|
||||
libpulseaudio
|
||||
alsa-lib
|
||||
nss
|
||||
nspr
|
||||
expat
|
||||
glib
|
||||
dbus
|
||||
systemd
|
||||
freetype
|
||||
fontconfig
|
||||
];
|
||||
|
||||
users.users.djai.packages = with pkgs; [
|
||||
# dev environment
|
||||
godot
|
||||
nvchad
|
||||
jq
|
||||
lazygit
|
||||
ripgrep
|
||||
|
||||
# toolchains
|
||||
cargo
|
||||
gcc
|
||||
gnumake
|
||||
openssl
|
||||
python3
|
||||
rustc
|
||||
uv
|
||||
|
||||
# containers / secrets
|
||||
age
|
||||
fluxcd
|
||||
k9s
|
||||
kubectl
|
||||
kubectx
|
||||
sops
|
||||
|
||||
# hosts / networks
|
||||
wireguard-tools
|
||||
lm_sensors
|
||||
|
||||
];
|
||||
|
||||
# TODO: switch to home manager
|
||||
# FIXME: use builtins.readfile to store these config options i think
|
||||
# home-manager.users.djai.home.packages = with pkgs; [];
|
||||
|
||||
}
|
||||
@@ -1,130 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.defaultPackages = with pkgs; [
|
||||
fbterm
|
||||
kitty
|
||||
starship
|
||||
];
|
||||
|
||||
# TODO: switch to home manager
|
||||
# FIXME: do not embed our entire tmux config into this
|
||||
programs.fish.enable = true;
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
|
||||
extraConfig = ''
|
||||
# use <C-a> as leader
|
||||
unbind C-b
|
||||
set-option -g prefix C-a
|
||||
bind-key C-a send-prefix
|
||||
|
||||
bind ? list-keys
|
||||
|
||||
# window/pane management
|
||||
bind s split-window -h -c "#{pane_current_path}"
|
||||
bind C-s select-layout main-horizontal \; swap-pane -t 0 \; select-pane -t 0
|
||||
bind S select-layout even-horizontal
|
||||
bind v split-window -v -c "#{pane_current_path}"
|
||||
bind C-v select-layout main-vertical \; swap-pane -t 0 \; select-pane -t 0
|
||||
bind V select-layout even-vertical
|
||||
bind c new-window -c "#{pane_current_path}"
|
||||
# move pane to new tab
|
||||
bind b break-pane
|
||||
# swap active pane and first pane
|
||||
bind a swap-pane -t 0 \; select-pane -t 0
|
||||
unbind '"'
|
||||
unbind %
|
||||
|
||||
# vim-style pane switching with <A-j> through <A-l>
|
||||
bind -n M-h select-pane -L
|
||||
bind -n M-j select-pane -D
|
||||
bind -n M-k select-pane -U
|
||||
bind -n M-l select-pane -R
|
||||
bind h select-pane -L
|
||||
bind j select-pane -D
|
||||
bind k select-pane -U
|
||||
bind l select-pane -R
|
||||
# Resize using caps
|
||||
bind -r H resize-pane -L 5
|
||||
bind -r J resize-pane -D 5
|
||||
bind -r K resize-pane -U 5
|
||||
bind -r L resize-pane -R 5
|
||||
|
||||
# vim-style copy mode
|
||||
set-window-option -g mode-keys vi
|
||||
bind-key -T copy-mode-vi 'v' send-keys -X begin-selection
|
||||
bind-key -T copy-mode-vi 'y' send-keys -X copy-selection-and-cancel
|
||||
bind-key p paste-buffer
|
||||
|
||||
# window traversal
|
||||
bind -n M-n next-window
|
||||
bind tab next-window
|
||||
|
||||
|
||||
# reload config with r
|
||||
bind r source-file ~/.config/tmux/tmux.conf
|
||||
# dont rename windows automatically
|
||||
# set-option -g allow-rename off
|
||||
|
||||
# bind m send-keys -R M-k C-a '[kV' C-m M-j 'Pd/[\.ACFGV]' C-m 'Ax'
|
||||
bind m source-file ~/.config/tmux/copy.tmux
|
||||
|
||||
|
||||
# ----- UI/UX -----
|
||||
|
||||
# don't do anything when a 'bell' rings
|
||||
set -g visual-activity off
|
||||
set -g visual-bell off
|
||||
set -g visual-silence off
|
||||
setw -g monitor-activity off
|
||||
set -g bell-action none
|
||||
|
||||
# copy mode
|
||||
setw -g mode-style 'fg=black bg=red bold'
|
||||
|
||||
# panes
|
||||
set -g pane-border-style 'fg=black'
|
||||
set -g pane-active-border-style 'fg=white'
|
||||
|
||||
# status
|
||||
set -g status-position bottom
|
||||
set -g status-justify left
|
||||
set -g status-style 'bg=black fg=white'
|
||||
|
||||
set -g status-left ""
|
||||
set -g status-right ""
|
||||
|
||||
# window status
|
||||
setw -g window-status-current-style 'bg=blue fg=black'
|
||||
setw -g window-status-current-format '◤ #W ◢'
|
||||
|
||||
setw -g window-status-style 'fg=white bg=black'
|
||||
setw -g window-status-format '#[fg=black]◤ #[fg=white]#W #[fg=black]◢' # todo: styling
|
||||
setw -g window-status-bell-style 'fg=yellow bg=red bold'
|
||||
|
||||
# messages
|
||||
set -g message-style 'fg=black bg=blue'
|
||||
'';
|
||||
|
||||
plugins = with pkgs.tmuxPlugins; [
|
||||
sensible
|
||||
resurrect
|
||||
];
|
||||
};
|
||||
|
||||
# home-manager.users.djai = {
|
||||
# programs.fish.enable = true;
|
||||
# programs.tmux.enable = true;
|
||||
#
|
||||
# programs.kitty = {
|
||||
# enable = true;
|
||||
# settings = {
|
||||
# shell = "${pkgs.tmux}/bin/tmux";
|
||||
# font_family = "Iosevka Nerd Font";
|
||||
# };
|
||||
# extraConfig = ""; # TODO theming
|
||||
# };
|
||||
#
|
||||
# };
|
||||
}
|
||||