authorgravatar for git@paperclover.netclover caruso <git@paperclover.net> 2025-06-07 13:56:21-07:00
committergravatar for git@paperclover.netclover caruso <git@paperclover.net> 2025-06-07 13:56:21-07:00
logab7dc1a69776f3bde087126d89f6e6eac17d56e0
tree22e3227b1efa1097fa70a943b6ac3b49240987da
parentd9967da704f341260d3b3c8853e59ab2b7358a01

more treats for chloe


5 files changed, 62 insertions(+), 23 deletions(-)

lib/mkNeovim.nix+3-2
...@@ -4,9 +4,10 @@...@@ -4,9 +4,10 @@
4 overlays,4 overlays,
5 inputs,5 inputs,
6}:6}:
7user: system:7configPath: system:
8let8let
9 darwin = nixpkgs.lib.strings.hasSuffix "-darwin" system;9 darwin = nixpkgs.lib.strings.hasSuffix "-darwin" system;
10 user = builtins.elemAt (builtins.split "/" configPath) 0;
1011
11 host = {12 host = {
12 inherit darwin;13 inherit darwin;
...@@ -19,7 +20,7 @@ in...@@ -19,7 +20,7 @@ in
19(inputs.nvf.lib.neovimConfiguration {20(inputs.nvf.lib.neovimConfiguration {
20 pkgs = nixpkgs.legacyPackages.${system};21 pkgs = nixpkgs.legacyPackages.${system};
21 modules = builtins.filter (f: f != null) [22 modules = builtins.filter (f: f != null) [
22 (../users + ("/" + user + "/vim.nix"))23 (../users + ("/" + configPath + "/vim.nix"))
23 ../modules/neovim24 ../modules/neovim
24 ];25 ];
25 extraSpecialArgs = {26 extraSpecialArgs = {
modules/neovim/default.nix+34-18
...@@ -1,9 +1,12 @@...@@ -1,9 +1,12 @@
1{1{
2 config,2 config,
3 pkgs,
3 lib,4 lib,
4 host,
5 ...5 ...
6}:6}:
7let
8 allowExe = config.shared.allowExe;
9in
7{10{
8 # based on default options from upstream:11 # based on default options from upstream:
9 # https://github.com/NotAShelf/nvf/blob/main/configuration.nix12 # https://github.com/NotAShelf/nvf/blob/main/configuration.nix
...@@ -13,7 +16,7 @@...@@ -13,7 +16,7 @@
13 #16 #
14 # override level 999 is used to not conflict with mkDefault as used by nvf.17 # override level 999 is used to not conflict with mkDefault as used by nvf.
15 # which allows user configurations to disable/override anything here.18 # which allows user configurations to disable/override anything here.
16 vim = lib.mkOverride 999 {19 config.vim = lib.mkOverride 999 {
17 theme = {20 theme = {
18 enable = true;21 enable = true;
19 };22 };
...@@ -34,7 +37,7 @@...@@ -34,7 +37,7 @@
34 };37 };
35 lsp = {38 lsp = {
36 # Must be enabled for language modules to hook into the LSP API.39 # Must be enabled for language modules to hook into the LSP API.
37 enable = true;40 enable = allowExe;
38 formatOnSave = true;41 formatOnSave = true;
39 # show errors inline42 # show errors inline
40 # https://github.com/folke/trouble.nvim43 # https://github.com/folke/trouble.nvim
...@@ -48,30 +51,43 @@...@@ -48,30 +51,43 @@
48 };51 };
49 debugger = {52 debugger = {
50 nvim-dap = {53 nvim-dap = {
51 enable = true;54 enable = allowExe;
52 ui.enable = true;55 ui.enable = true;
53 };56 };
54 };57 };
55 languages = {58 languages = {
56 enableFormat = true;59 enableFormat = true;
57 enableTreesitter = true;60 enableTreesitter = allowExe;
58 enableExtraDiagnostics = true;61 enableExtraDiagnostics = true;
5962
60 # sort-lines: on63 # sort-lines: on
61 assembly.enable = true;64 assembly.enable = allowExe;
62 bash.enable = true;65 bash.enable = allowExe;
63 clang.enable = true;66 clang.enable = allowExe;
64 css.enable = true;67 css.enable = allowExe;
65 html.enable = true;68 html.enable = allowExe;
66 nix.enable = true;69 nix.enable = allowExe;
67 rust.crates.enable = true;70 rust.crates.enable = allowExe;
68 rust.enable = true;71 rust.enable = allowExe;
69 ts.enable = true;72 ts.enable = allowExe;
70 zig.enable = true;73 zig.enable = allowExe;
71 # sort-lines: off74 # sort-lines: off
7275
76 ts.format.enable = false; # deno fmt is enabled elsewhere
73 nix.format.type = "nixfmt"; # looks so much nicer77 nix.format.type = "nixfmt"; # looks so much nicer
74 };78 };
79 formatter.conform-nvim = {
80 enable = true;
81 setupOpts.formatters_by_ft = {
82 typescript = [ "deno_fmt" ];
83 typescriptreact = [ "deno_fmt" ];
84 javascript = [ "deno_fmt" ];
85 javascriptreact = [ "deno_fmt" ];
86 };
87 setupOpts.formatters.deno_fmt = {
88 command = lib.meta.getExe pkgs.deno;
89 };
90 };
75 filetree = {91 filetree = {
76 neo-tree = {92 neo-tree = {
77 enable = true;93 enable = true;
...@@ -81,7 +97,7 @@...@@ -81,7 +97,7 @@
81 nvimBufferline.enable = true;97 nvimBufferline.enable = true;
82 };98 };
83 autocomplete = {99 autocomplete = {
84 blink-cmp.enable = true;100 blink-cmp.enable = allowExe;
85 };101 };
86 statusline = {102 statusline = {
87 lualine = {103 lualine = {
...@@ -132,8 +148,8 @@...@@ -132,8 +148,8 @@
132 todo-comments.enable = true;148 todo-comments.enable = true;
133 };149 };
134 git = {150 git = {
135 enable = true;151 enable = allowExe;
136 gitsigns.enable = true;152 gitsigns.enable = allowExe;
137 gitsigns.codeActions.enable = false; # throws an annoying debug message153 gitsigns.codeActions.enable = false; # throws an annoying debug message
138 };154 };
139 };155 };
users/chloe/configuration.nix-2
...@@ -4,8 +4,6 @@...@@ -4,8 +4,6 @@
4 # packages for all machines4 # packages for all machines
5 environment.systemPackages = with pkgs; [5 environment.systemPackages = with pkgs; [
6 ];6 ];
7 # services for all machines
8 services.karabiner-elements.enable = true;
97
10 # configuration for shared modules.8 # configuration for shared modules.
11 # all custom options in 'shared' for clarity.9 # all custom options in 'shared' for clarity.
users/chloe/home.nix+24-1
...@@ -13,6 +13,7 @@ in...@@ -13,6 +13,7 @@ in
13 ffmpeg13 ffmpeg
14 ripgrep14 ripgrep
15 uv15 uv
16 nh
16 ];17 ];
17 # packages to install for desktop environments (non-server)18 # packages to install for desktop environments (non-server)
18 desktop = [19 desktop = [
...@@ -36,9 +37,31 @@ in...@@ -36,9 +37,31 @@ in
36 btop.enable = true;37 btop.enable = true;
37 fd.enable = true;38 fd.enable = true;
38 hyfetch.enable = true;39 hyfetch.enable = true;
39 zsh.enable = true;
40 # sort-lines:end40 # sort-lines:end
4141
42 # zsh is the shell i use
43 zsh = {
44 enable = true;
45 enableCompletion = true;
46 autosuggestion.enable = true;
47 syntaxHighlighting.enable = true;
48
49 history.size = 10000;
50
51 shellAliases = {
52 switch = "nh darwin switch ~/config";
53 };
54 profileExtra = ''
55 function python() {
56 dirname=$(dirname $1 2>/dev/null)
57 if [ -z "$dirname" ]; then
58 dirname=$(pwd)
59 fi
60 uv run --project "$dirname" "$@"
61 }
62 '';
63 };
64
42 # use a git-specific email65 # use a git-specific email
43 git.userEmail = "git@paperclover.net";66 git.userEmail = "git@paperclover.net";
4467
users/chloe/vim.nix+1
...@@ -1,5 +1,6 @@...@@ -1,5 +1,6 @@
1{ ... }:1{ ... }:
2{2{
3 vim.languages.astro.enable = true;
3 vim.theme.extraConfig = ''4 vim.theme.extraConfig = ''
4 if vim.g.neovide then5 if vim.g.neovide then
5 vim.g.neovide_cursor_trail_size = 0.36 vim.g.neovide_cursor_trail_size = 0.3