more treats for chloe

This commit is contained in:
chloe caruso 2025-06-07 13:56:21 -07:00
parent d9967da704
commit ab7dc1a697
5 changed files with 62 additions and 23 deletions

View file

@ -4,9 +4,10 @@
overlays, overlays,
inputs, inputs,
}: }:
user: system: configPath: system:
let let
darwin = nixpkgs.lib.strings.hasSuffix "-darwin" system; darwin = nixpkgs.lib.strings.hasSuffix "-darwin" system;
user = builtins.elemAt (builtins.split "/" configPath) 0;
host = { host = {
inherit darwin; inherit darwin;
@ -19,7 +20,7 @@ in
(inputs.nvf.lib.neovimConfiguration { (inputs.nvf.lib.neovimConfiguration {
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
modules = builtins.filter (f: f != null) [ modules = builtins.filter (f: f != null) [
(../users + ("/" + user + "/vim.nix")) (../users + ("/" + configPath + "/vim.nix"))
../modules/neovim ../modules/neovim
]; ];
extraSpecialArgs = { extraSpecialArgs = {

View file

@ -1,9 +1,12 @@
{ {
config, config,
pkgs,
lib, lib,
host,
... ...
}: }:
let
allowExe = config.shared.allowExe;
in
{ {
# based on default options from upstream: # based on default options from upstream:
# https://github.com/NotAShelf/nvf/blob/main/configuration.nix # https://github.com/NotAShelf/nvf/blob/main/configuration.nix
@ -13,7 +16,7 @@
# #
# override level 999 is used to not conflict with mkDefault as used by nvf. # override level 999 is used to not conflict with mkDefault as used by nvf.
# which allows user configurations to disable/override anything here. # which allows user configurations to disable/override anything here.
vim = lib.mkOverride 999 { config.vim = lib.mkOverride 999 {
theme = { theme = {
enable = true; enable = true;
}; };
@ -34,7 +37,7 @@
}; };
lsp = { lsp = {
# Must be enabled for language modules to hook into the LSP API. # Must be enabled for language modules to hook into the LSP API.
enable = true; enable = allowExe;
formatOnSave = true; formatOnSave = true;
# show errors inline # show errors inline
# https://github.com/folke/trouble.nvim # https://github.com/folke/trouble.nvim
@ -48,30 +51,43 @@
}; };
debugger = { debugger = {
nvim-dap = { nvim-dap = {
enable = true; enable = allowExe;
ui.enable = true; ui.enable = true;
}; };
}; };
languages = { languages = {
enableFormat = true; enableFormat = true;
enableTreesitter = true; enableTreesitter = allowExe;
enableExtraDiagnostics = true; enableExtraDiagnostics = true;
# sort-lines: on # sort-lines: on
assembly.enable = true; assembly.enable = allowExe;
bash.enable = true; bash.enable = allowExe;
clang.enable = true; clang.enable = allowExe;
css.enable = true; css.enable = allowExe;
html.enable = true; html.enable = allowExe;
nix.enable = true; nix.enable = allowExe;
rust.crates.enable = true; rust.crates.enable = allowExe;
rust.enable = true; rust.enable = allowExe;
ts.enable = true; ts.enable = allowExe;
zig.enable = true; zig.enable = allowExe;
# sort-lines: off # sort-lines: off
ts.format.enable = false; # deno fmt is enabled elsewhere
nix.format.type = "nixfmt"; # looks so much nicer nix.format.type = "nixfmt"; # looks so much nicer
}; };
formatter.conform-nvim = {
enable = true;
setupOpts.formatters_by_ft = {
typescript = [ "deno_fmt" ];
typescriptreact = [ "deno_fmt" ];
javascript = [ "deno_fmt" ];
javascriptreact = [ "deno_fmt" ];
};
setupOpts.formatters.deno_fmt = {
command = lib.meta.getExe pkgs.deno;
};
};
filetree = { filetree = {
neo-tree = { neo-tree = {
enable = true; enable = true;
@ -81,7 +97,7 @@
nvimBufferline.enable = true; nvimBufferline.enable = true;
}; };
autocomplete = { autocomplete = {
blink-cmp.enable = true; blink-cmp.enable = allowExe;
}; };
statusline = { statusline = {
lualine = { lualine = {
@ -132,8 +148,8 @@
todo-comments.enable = true; todo-comments.enable = true;
}; };
git = { git = {
enable = true; enable = allowExe;
gitsigns.enable = true; gitsigns.enable = allowExe;
gitsigns.codeActions.enable = false; # throws an annoying debug message gitsigns.codeActions.enable = false; # throws an annoying debug message
}; };
}; };

View file

@ -4,8 +4,6 @@
# packages for all machines # packages for all machines
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
]; ];
# services for all machines
services.karabiner-elements.enable = true;
# configuration for shared modules. # configuration for shared modules.
# all custom options in 'shared' for clarity. # all custom options in 'shared' for clarity.

View file

@ -13,6 +13,7 @@ in
ffmpeg ffmpeg
ripgrep ripgrep
uv uv
nh
]; ];
# packages to install for desktop environments (non-server) # packages to install for desktop environments (non-server)
desktop = [ desktop = [
@ -36,9 +37,31 @@ in
btop.enable = true; btop.enable = true;
fd.enable = true; fd.enable = true;
hyfetch.enable = true; hyfetch.enable = true;
zsh.enable = true;
# sort-lines:end # sort-lines:end
# zsh is the shell i use
zsh = {
enable = true;
enableCompletion = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
history.size = 10000;
shellAliases = {
switch = "nh darwin switch ~/config";
};
profileExtra = ''
function python() {
dirname=$(dirname $1 2>/dev/null)
if [ -z "$dirname" ]; then
dirname=$(pwd)
fi
uv run --project "$dirname" "$@"
}
'';
};
# use a git-specific email # use a git-specific email
git.userEmail = "git@paperclover.net"; git.userEmail = "git@paperclover.net";

View file

@ -1,5 +1,6 @@
{ ... }: { ... }:
{ {
vim.languages.astro.enable = true;
vim.theme.extraConfig = '' vim.theme.extraConfig = ''
if vim.g.neovide then if vim.g.neovide then
vim.g.neovide_cursor_trail_size = 0.3 vim.g.neovide_cursor_trail_size = 0.3