Recent updates

This commit is contained in:
Joe Frikker
2025-03-21 19:17:43 -04:00
parent 4829b1fe12
commit faa31d1bff
10 changed files with 535 additions and 39 deletions

View File

@@ -0,0 +1,77 @@
{
enable = true;
extraPackages = epkgs: [
epkgs.catppuccin-theme
epkgs.evil
epkgs.evil-collection
epkgs.general
epkgs.projectile
epkgs.sly
epkgs.sly-macrostep
epkgs.vertico
epkgs.which-key
];
extraConfig = ''
(use-package catppuccin-theme
:config
(setq catppuccin-flavor 'frappe)
(load-theme 'catppuccin :no-confirm))
(use-package evil
:init
(setq evil-want-integration t)
(setq evil-want-keybinding nil)
:config
(evil-mode 1)
(evil-set-leader 'normal (kbd "SPC")))
(use-package evil-collection
:after evil
:config
(evil-collection-init))
(use-package general
:after evil
:config
(general-evil-setup)
(general-define-key
:states 'normal
:prefix "SPC"
"h" '(:ignore t :which-key "Help")
":" '(execute-extended-command :which-key "Execute Command")
";" '(eval-expression :which-key "Evaluate Expression"))
(general-define-key
:states 'normal
:prefix "SPC h"
"v" '(describe-variable :which-key "Describe Variable")))
(use-package projectile
:config (projectile-mode 1))
(use-package sly
:config
(setq inferior-lisp-program "sbcl"))
(use-package sly-macrostep)
(use-package vertico
:config
(vertico-mode))
(use-package which-key
:config
(which-key-mode))
(set-face-attribute 'default nil :font "JetBrainsMono Nerd Font" :height 130)
(set-face-attribute 'fixed-pitch nil :font "JetBrainsMono Nerd Font" :height 130)
(setq inhibit-startup-message t)
(scroll-bar-mode -1)
(tool-bar-mode -1)
(menu-bar-mode -1)
(setf indent-tabs-mode nil)
'';
}

View File

@@ -2,5 +2,5 @@
enable = true;
enableBashIntegration = true;
enableZshIntegration = true;
icons = true;
icons = "auto";
}

View File

@@ -42,16 +42,16 @@
languages.language-server.jdtls.config.java.format.settings.url = "https://raw.githubusercontent.com/google/styleguide/gh-pages/eclipse-java-google-style.xml";
languages.languages = [
languages.language = [
{
name = "typescript";
language-servers = [ "typescript-language-server" "eslint" ];
language-servers = [ "typescript-language-server" "vscode-eslint-language-server" ];
indent.tab-width = 4;
indent.unit = " ";
}
{
name = "tsx";
language-servers = [ "typescript-language-server" "eslint" ];
language-servers = [ "typescript-language-server" "vscode-eslint-language-server" ];
indent.tab-width = 4;
indent.unit = " ";
}

View File

@@ -31,5 +31,6 @@ bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel
bind-key -T launcher g popup -h 100% -w 100% -E lazygit
bind-key g switch-client -Tlauncher
set -g default-command ""
'';
}

View File

@@ -0,0 +1,161 @@
{
enable = true;
extraConfig = ''
local config = {}
local workspace_switcher = wezterm.plugin.require("https://github.com/MLFlexer/smart_workspace_switcher.wezterm")
workspace_switcher.zoxide_path='~/.nix-profile/bin/zoxide'
config.color_scheme = 'Catppuccin Frappe'
config.default_prog = { '/Users/jfrikker/.nix-profile/bin/zsh', '-l' }
config.font_size = 13.0
-- config.font = wezterm.font("JetBrains Mono")
config.inactive_pane_hsb = {
saturation = 0.5,
brightness = 0.5,
}
config.pane_focus_follows_mouse = true
config.switch_to_last_active_tab_when_closing_tab = true
config.tab_bar_at_bottom = true
config.use_fancy_tab_bar = false
config.window_decorations = "RESIZE"
wezterm.on('smart_workspace_switcher.workspace_switcher.created', function(window, path, workspace)
local editor = window:active_tab()
editor:set_title("edit")
editor:panes()[1]:send_text("hx\n")
local run = window:spawn_tab {}
run:set_title "run"
local term = window:spawn_tab {}
term:set_title "term"
editor:activate()
end)
-- From https://alexplescan.com/posts/2024/08/10/wezterm/
local function segments_for_right_status(window)
return {
window:active_workspace(),
}
end
wezterm.on('update-status', function(window, _)
local SOLID_LEFT_ARROW = utf8.char(0xe0b2)
local segments = segments_for_right_status(window)
local color_scheme = window:effective_config().resolved_palette
-- Note the use of wezterm.color.parse here, this returns
-- a Color object, which comes with functionality for lightening
-- or darkening the colour (amongst other things).
local bg = wezterm.color.parse(color_scheme.background)
local fg = color_scheme.foreground
-- Each powerline segment is going to be coloured progressively
-- darker/lighter depending on whether we're on a dark/light colour
-- scheme. Let's establish the "from" and "to" bounds of our gradient.
local gradient_to, gradient_from = bg
gradient_from = gradient_to:lighten(0.2)
-- Yes, WezTerm supports creating gradients, because why not?! Although
-- they'd usually be used for setting high fidelity gradients on your terminal's
-- background, we'll use them here to give us a sample of the powerline segment
-- colours we need.
local gradient = wezterm.color.gradient(
{
orientation = 'Horizontal',
colors = { gradient_from, gradient_to },
},
#segments -- only gives us as many colours as we have segments.
)
-- We'll build up the elements to send to wezterm.format in this table.
local elements = {}
for i, seg in ipairs(segments) do
local is_first = i == 1
if is_first then
table.insert(elements, { Background = { Color = 'none' } })
end
table.insert(elements, { Foreground = { Color = gradient[i] } })
table.insert(elements, { Text = SOLID_LEFT_ARROW })
table.insert(elements, { Foreground = { Color = fg } })
table.insert(elements, { Background = { Color = gradient[i] } })
table.insert(elements, { Text = ' ' .. seg .. ' ' })
end
window:set_right_status(wezterm.format(elements))
end)
config.leader = { key = ' ', mods = 'CTRL', timeout_milliseconds = 10000 }
config.keys = {
{
key = "s",
mods = "CMD",
action = workspace_switcher.switch_workspace(),
},
{
key = "-",
mods = "CMD",
action = wezterm.action.SplitVertical {},
},
{
key = "\\",
mods = "CMD",
action = wezterm.action.SplitHorizontal {},
},
{
key = "h",
mods = "CMD",
action = wezterm.action.ActivatePaneDirection "Left",
},
{
key = "j",
mods = "CMD",
action = wezterm.action.ActivatePaneDirection "Down",
},
{
key = "k",
mods = "CMD",
action = wezterm.action.ActivatePaneDirection "Up",
},
{
key = "l",
mods = "CMD",
action = wezterm.action.ActivatePaneDirection "Right",
},
{
key = "g",
mods = "CMD",
action = wezterm.action.SpawnCommandInNewTab {
args = { wezterm.home_dir .. "/.nix-profile/bin/zsh", "-l", "-c", "lazygit" }
}
},
{
key = "t",
mods = "CMD",
action = wezterm.action.SpawnCommandInNewTab {}
},
{
key = 'z',
mods = 'CMD',
action = wezterm.action.TogglePaneZoomState,
},
{
key = 'd',
mods = 'CMD',
action = wezterm.action.CloseCurrentTab { confirm = true },
},
}
for i = 1, 9 do
-- CTRL+ALT + number to activate that tab
table.insert(config.keys, {
key = tostring(i),
mods = 'LEADER',
action = wezterm.action.ActivateTab(i - 1),
})
end
return config
'';
}

View File

@@ -52,18 +52,21 @@
home.packages = [
# pkgs.apacheKafka
# pkgs.aria
pkgs.asdf_3_3
pkgs.aws-iam-authenticator
pkgs.awscli
pkgs.bashInteractive
pkgs.cargo
pkgs.chezmoi
pkgs.du-dust
pkgs.emacs29
pkgs.emacs
pkgs.fd
pkgs.fend
pkgs.gcc
pkgs.gh
# pkgs.ghc
# pkgs.go
pkgs.graphviz
# pkgs.haskellPackages.cabal-install
# pkgs.haskellPackages.haskell-language-server
# pkgs.helix
@@ -73,28 +76,89 @@
pkgs.just
# pkgs.jsonnet
pkgs.kubectl
pkgs.ledger
pkgs.lorri
# pkgs.maven
# pkgs.mysql-client
pkgs.mysql-client
# pkgs.neovide
pkgs.neovim
# pkgs.nodejs-16_x
# pkgs.nodePackages.typescript-language-server
pkgs.openssh
# pkgs.postgresql
# (pkgs.python3.withPackages (p: [p.ipython p.pyyaml p.boto3]))
pkgs.ripgrep
pkgs.rlwrap
pkgs.roswell
# pkgs.rust-analyzer
# pkgs.rust-script
# pkgs.rust-bin.stable."1.68.0".default
# pkgs.rust-bin.stable."1.68.0".rust-analyzer
# pkgs.rustup
(pkgs.sbcl.withPackages (ps: with ps; [ agnostic-lizard alexandria serapeum slynk ]))
(pkgs.sbcl.withPackages (ps: with ps; [
_3bmd
_3bmd-ext-code-blocks
agnostic-lizard
alexandria
anypool
arrows
async-process
binding-arrows
bt-semaphore
chanl
cl-annot
cl-charms
cl-markup
cl-migratum
cl-migratum_dot_provider_dot_local-path
cl-migratum_dot_driver_dot_dbi
cl-mock
cl-punch
cl-rdkafka
cl-readline
cl-setlocale
clack
clack-handler-hunchentoot
clack-handler-woo
dbd-mysql
dbi
dexador
fare-csv
fiveam
group-by
inquisitor
lack-request
lack-response
lisp-preprocessor
local-time
log4cl
mito
mockingbird
myway
prove
prove-asdf
queues
queues_dot_priority-cqueue
queues_dot_simple-cqueue
replic
serapeum
shasht
slynk
smug
split-sequence
str
sxql-composer
trivial-ws
trivial-open-browser
trivial-timeout
uuid
yason ]))
# pkgs.source-code-pro
# pkgs.stack
pkgs.tokei
pkgs.xh
# pkgs.xonsh
pkgs.yubikey-manager
# pkgs.yarn
# pkgs.zellij
];
@@ -132,8 +196,11 @@
programs.lazygit.enable = true;
programs.starship = import ./home-starship.nix pkgs;
programs.tmux = import ./home-tmux.nix pkgs;
# programs.zoxide.enable = true;
programs.wezterm = import ./home-wezterm.nix;
programs.zoxide.enable = true;
programs.zsh = import ./home-zsh.nix pkgs;
# programs.neovim = import ./home-neovim.nix pkgs;
# programs.emacs = import ./home-emacs.nix;
}