Преглед на файлове

initial commit with most everything migrated and working

Zander Hawke преди 1 година
ревизия
c28f16b273
променени са 54 файла, в които са добавени 1540 реда и са изтрити 0 реда
  1. 7 0
      .editorconfig
  2. 5 0
      .gitignore
  3. 21 0
      LICENSE
  4. 6 0
      README.md
  5. 364 0
      flake.lock
  6. 56 0
      flake.nix
  7. 1 0
      modules/default.nix
  8. 4 0
      users/thomas/cli/bash.nix
  9. 28 0
      users/thomas/cli/bat.nix
  10. 17 0
      users/thomas/cli/default.nix
  11. 3 0
      users/thomas/cli/direnv.nix
  12. 16 0
      users/thomas/cli/fish.nix
  13. 22 0
      users/thomas/cli/fzf.nix
  14. 145 0
      users/thomas/cli/git.nix
  15. 3 0
      users/thomas/cli/github.nix
  16. 22 0
      users/thomas/cli/gnupg.nix
  17. 22 0
      users/thomas/cli/shell-aliases.nix
  18. 17 0
      users/thomas/cli/ssh.nix
  19. 3 0
      users/thomas/cli/starship.nix
  20. 3 0
      users/thomas/cli/yazi.nix
  21. 6 0
      users/thomas/cli/zoxide.nix
  22. 6 0
      users/thomas/cli/zsh.nix
  23. 30 0
      users/thomas/default.nix
  24. 133 0
      users/thomas/desktop/alacritty.nix
  25. 9 0
      users/thomas/desktop/default.nix
  26. 9 0
      users/thomas/desktop/fonts.nix
  27. 59 0
      users/thomas/desktop/ghostty.nix
  28. 3 0
      users/thomas/desktop/syncthing.nix
  29. 38 0
      users/thomas/desktop/yubikey.nix
  30. 7 0
      users/thomas/nvim/colorschemes.nix
  31. 20 0
      users/thomas/nvim/default.nix
  32. 24 0
      users/thomas/nvim/keymaps.nix
  33. 77 0
      users/thomas/nvim/options.nix
  34. 15 0
      users/thomas/nvim/plugins.nix
  35. 4 0
      users/thomas/nvim/plugins/avante.nix
  36. 44 0
      users/thomas/nvim/plugins/cmp.nix
  37. 3 0
      users/thomas/nvim/plugins/comment.nix
  38. 23 0
      users/thomas/nvim/plugins/conform.nix
  39. 32 0
      users/thomas/nvim/plugins/elixir-tools.nix
  40. 3 0
      users/thomas/nvim/plugins/fidget.nix
  41. 12 0
      users/thomas/nvim/plugins/gitsigns.nix
  42. 3 0
      users/thomas/nvim/plugins/indent-blankline.nix
  43. 13 0
      users/thomas/nvim/plugins/lint.nix
  44. 25 0
      users/thomas/nvim/plugins/mdx.nix
  45. 13 0
      users/thomas/nvim/plugins/mini.nix
  46. 10 0
      users/thomas/nvim/plugins/oil.nix
  47. 3 0
      users/thomas/nvim/plugins/sleuth.nix
  48. 62 0
      users/thomas/nvim/plugins/telescope.nix
  49. 3 0
      users/thomas/nvim/plugins/tmux.nix
  50. 4 0
      users/thomas/nvim/plugins/todo-comments.nix
  51. 17 0
      users/thomas/nvim/plugins/treesitter.nix
  52. 3 0
      users/thomas/nvim/plugins/web-devicons.nix
  53. 48 0
      users/thomas/nvim/plugins/which-key.nix
  54. 14 0
      users/thomas/nvim/plugins/zenmode.nix

+ 7 - 0
.editorconfig

@@ -0,0 +1,7 @@
+root = true
+[*]
+charset = utf-8
+end_of_line = lf
+insert_final_newline = true
+indent_style = space
+indent_size = 2

+ 5 - 0
.gitignore

@@ -0,0 +1,5 @@
+.devenv
+.direnv
+result*
+*.qcow2
+.DS_Store

+ 21 - 0
LICENSE

@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2025, Thomas Stachl
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.

+ 6 - 0
README.md

@@ -0,0 +1,6 @@
+# my home manager configuration
+
+Simply run this on any system that has `nix` and a user `thomas`:
+```bash
+nix run github:nix-community/home-manager -- switch --flake .#thomas
+```

+ 364 - 0
flake.lock

@@ -0,0 +1,364 @@
+{
+  "nodes": {
+    "devshell": {
+      "inputs": {
+        "nixpkgs": [
+          "nixvim",
+          "nixpkgs"
+        ]
+      },
+      "locked": {
+        "lastModified": 1735644329,
+        "narHash": "sha256-tO3HrHriyLvipc4xr+Ewtdlo7wM1OjXNjlWRgmM7peY=",
+        "owner": "numtide",
+        "repo": "devshell",
+        "rev": "f7795ede5b02664b57035b3b757876703e2c3eac",
+        "type": "github"
+      },
+      "original": {
+        "owner": "numtide",
+        "repo": "devshell",
+        "type": "github"
+      }
+    },
+    "flake-compat": {
+      "locked": {
+        "lastModified": 1733328505,
+        "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
+        "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
+        "revCount": 69,
+        "type": "tarball",
+        "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.1.0/01948eb7-9cba-704f-bbf3-3fa956735b52/source.tar.gz"
+      },
+      "original": {
+        "type": "tarball",
+        "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"
+      }
+    },
+    "flake-parts": {
+      "inputs": {
+        "nixpkgs-lib": [
+          "nixvim",
+          "nixpkgs"
+        ]
+      },
+      "locked": {
+        "lastModified": 1736143030,
+        "narHash": "sha256-+hu54pAoLDEZT9pjHlqL9DNzWz0NbUn8NEAHP7PQPzU=",
+        "owner": "hercules-ci",
+        "repo": "flake-parts",
+        "rev": "b905f6fc23a9051a6e1b741e1438dbfc0634c6de",
+        "type": "github"
+      },
+      "original": {
+        "owner": "hercules-ci",
+        "repo": "flake-parts",
+        "type": "github"
+      }
+    },
+    "flake-utils": {
+      "inputs": {
+        "systems": "systems"
+      },
+      "locked": {
+        "lastModified": 1731533236,
+        "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
+        "owner": "numtide",
+        "repo": "flake-utils",
+        "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
+        "type": "github"
+      },
+      "original": {
+        "owner": "numtide",
+        "repo": "flake-utils",
+        "type": "github"
+      }
+    },
+    "git-hooks": {
+      "inputs": {
+        "flake-compat": [
+          "nixvim",
+          "flake-compat"
+        ],
+        "gitignore": "gitignore",
+        "nixpkgs": [
+          "nixvim",
+          "nixpkgs"
+        ]
+      },
+      "locked": {
+        "lastModified": 1737465171,
+        "narHash": "sha256-R10v2hoJRLq8jcL4syVFag7nIGE7m13qO48wRIukWNg=",
+        "owner": "cachix",
+        "repo": "git-hooks.nix",
+        "rev": "9364dc02281ce2d37a1f55b6e51f7c0f65a75f17",
+        "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": [
+          "nixpkgs"
+        ]
+      },
+      "locked": {
+        "lastModified": 1736373539,
+        "narHash": "sha256-dinzAqCjenWDxuy+MqUQq0I4zUSfaCvN9rzuCmgMZJY=",
+        "owner": "nix-community",
+        "repo": "home-manager",
+        "rev": "bd65bc3cde04c16755955630b344bc9e35272c56",
+        "type": "github"
+      },
+      "original": {
+        "owner": "nix-community",
+        "ref": "release-24.11",
+        "repo": "home-manager",
+        "type": "github"
+      }
+    },
+    "home-manager_2": {
+      "inputs": {
+        "nixpkgs": [
+          "nixvim",
+          "nixpkgs"
+        ]
+      },
+      "locked": {
+        "lastModified": 1737630279,
+        "narHash": "sha256-wJQCxyMRc4P26zDrHmZiRD5bbfcJpqPG3e2djdGG3pk=",
+        "owner": "nix-community",
+        "repo": "home-manager",
+        "rev": "0db5c8bfcce78583ebbde0b2abbc95ad93445f7c",
+        "type": "github"
+      },
+      "original": {
+        "owner": "nix-community",
+        "repo": "home-manager",
+        "type": "github"
+      }
+    },
+    "ixx": {
+      "inputs": {
+        "flake-utils": [
+          "nixvim",
+          "nuschtosSearch",
+          "flake-utils"
+        ],
+        "nixpkgs": [
+          "nixvim",
+          "nuschtosSearch",
+          "nixpkgs"
+        ]
+      },
+      "locked": {
+        "lastModified": 1729958008,
+        "narHash": "sha256-EiOq8jF4Z/zQe0QYVc3+qSKxRK//CFHMB84aYrYGwEs=",
+        "owner": "NuschtOS",
+        "repo": "ixx",
+        "rev": "9fd01aad037f345350eab2cd45e1946cc66da4eb",
+        "type": "github"
+      },
+      "original": {
+        "owner": "NuschtOS",
+        "ref": "v0.0.6",
+        "repo": "ixx",
+        "type": "github"
+      }
+    },
+    "nix-darwin": {
+      "inputs": {
+        "nixpkgs": [
+          "nixvim",
+          "nixpkgs"
+        ]
+      },
+      "locked": {
+        "lastModified": 1737504076,
+        "narHash": "sha256-/B4XJnzYU/6K1ZZOBIgsa3K4pqDJrnC2579c44c+4rI=",
+        "owner": "lnl7",
+        "repo": "nix-darwin",
+        "rev": "65cc1fa8e36ceff067daf6cfb142331f02f524d3",
+        "type": "github"
+      },
+      "original": {
+        "owner": "lnl7",
+        "repo": "nix-darwin",
+        "type": "github"
+      }
+    },
+    "nixpkgs": {
+      "locked": {
+        "lastModified": 1737569578,
+        "narHash": "sha256-6qY0pk2QmUtBT9Mywdvif0i/CLVgpCjMUn6g9vB+f3M=",
+        "owner": "nixos",
+        "repo": "nixpkgs",
+        "rev": "47addd76727f42d351590c905d9d1905ca895b82",
+        "type": "github"
+      },
+      "original": {
+        "owner": "nixos",
+        "ref": "nixos-24.11",
+        "repo": "nixpkgs",
+        "type": "github"
+      }
+    },
+    "nixpkgs-darwin": {
+      "locked": {
+        "lastModified": 1737604399,
+        "narHash": "sha256-6mhxTomwwim6OrUXnXzsbIEdNdUXPF4F2+sXf1MrXPw=",
+        "owner": "nixos",
+        "repo": "nixpkgs",
+        "rev": "be24912af5998c5298b827d5304462e16d27215d",
+        "type": "github"
+      },
+      "original": {
+        "owner": "nixos",
+        "ref": "nixpkgs-24.11-darwin",
+        "repo": "nixpkgs",
+        "type": "github"
+      }
+    },
+    "nixpkgs-unstable": {
+      "locked": {
+        "lastModified": 1737557748,
+        "narHash": "sha256-BaMuhctP1x00+8cBE2cJveJQb70/tWHI50MHj/ZrtOY=",
+        "owner": "nixos",
+        "repo": "nixpkgs",
+        "rev": "606996d74f6e2a12635d41c1bf58bfc7ea3bb5ec",
+        "type": "github"
+      },
+      "original": {
+        "owner": "nixos",
+        "ref": "nixpkgs-unstable",
+        "repo": "nixpkgs",
+        "type": "github"
+      }
+    },
+    "nixvim": {
+      "inputs": {
+        "devshell": "devshell",
+        "flake-compat": "flake-compat",
+        "flake-parts": "flake-parts",
+        "git-hooks": "git-hooks",
+        "home-manager": "home-manager_2",
+        "nix-darwin": "nix-darwin",
+        "nixpkgs": [
+          "nixpkgs-unstable"
+        ],
+        "nuschtosSearch": "nuschtosSearch",
+        "treefmt-nix": "treefmt-nix"
+      },
+      "locked": {
+        "lastModified": 1737667561,
+        "narHash": "sha256-BKUapQPTji3V2uxymGq62/UWF1XMjfHvKd565jj1HlA=",
+        "owner": "nix-community",
+        "repo": "nixvim",
+        "rev": "aab2b81792567237c104b90c3936e073d28a9ac6",
+        "type": "github"
+      },
+      "original": {
+        "owner": "nix-community",
+        "ref": "main",
+        "repo": "nixvim",
+        "type": "github"
+      }
+    },
+    "nuschtosSearch": {
+      "inputs": {
+        "flake-utils": "flake-utils",
+        "ixx": "ixx",
+        "nixpkgs": [
+          "nixvim",
+          "nixpkgs"
+        ]
+      },
+      "locked": {
+        "lastModified": 1737372689,
+        "narHash": "sha256-nH3zK2ki0fd5o5qvbGHxukE4qnOLJa1uCzoDObG5vrE=",
+        "owner": "NuschtOS",
+        "repo": "search",
+        "rev": "570cc17bbc25650eb7d69e4fcda8cfd2f1656922",
+        "type": "github"
+      },
+      "original": {
+        "owner": "NuschtOS",
+        "repo": "search",
+        "type": "github"
+      }
+    },
+    "root": {
+      "inputs": {
+        "home-manager": "home-manager",
+        "nixpkgs": "nixpkgs",
+        "nixpkgs-darwin": "nixpkgs-darwin",
+        "nixpkgs-unstable": "nixpkgs-unstable",
+        "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": 1737483750,
+        "narHash": "sha256-5An1wq5U8sNycOBBg3nsDDgpwBmR9liOpDGlhliA6Xo=",
+        "owner": "numtide",
+        "repo": "treefmt-nix",
+        "rev": "f2cc121df15418d028a59c9737d38e3a90fbaf8f",
+        "type": "github"
+      },
+      "original": {
+        "owner": "numtide",
+        "repo": "treefmt-nix",
+        "type": "github"
+      }
+    }
+  },
+  "root": "root",
+  "version": 7
+}

+ 56 - 0
flake.nix

@@ -0,0 +1,56 @@
+{
+  description = "my home manager configuration";
+  
+  inputs = {
+    nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
+    nixpkgs-darwin.url = "github:nixos/nixpkgs/nixpkgs-24.11-darwin";
+    nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable";
+
+    home-manager.url = "github:nix-community/home-manager/release-24.11";
+    home-manager.inputs.nixpkgs.follows = "nixpkgs";
+
+    nixvim.url = "github:nix-community/nixvim/main";
+    nixvim.inputs.nixpkgs.follows = "nixpkgs-unstable";
+  };
+
+  outputs = { self, nixpkgs, nixpkgs-darwin, nixpkgs-unstable, home-manager, ... }@inputs:
+    let
+      inherit (self) outputs;
+      forAllSystems = nixpkgs.lib.genAttrs [
+        "aarch64-linux" "x86_64-linux" "aarch64-darwin" "x86_64-darwin"
+      ];
+    in
+    {
+
+      homeManagerModules = import ./modules;
+
+      packages = forAllSystems (system:
+        let
+          pkgs = if builtins.elem "darwin" (builtins.split "\\." system) then
+              nixpkgs-darwin.legacyPackages.${system}
+            else
+              nixpkgs.legacyPackages.${system};
+        in {
+
+          homeConfigurations = {
+            thomas = home-manager.lib.homeManagerConfiguration {
+              inherit pkgs;
+              extraSpecialArgs = { inherit inputs; inherit outputs; };
+              modules = [
+                ./users/thomas
+                ./users/thomas/desktop
+                ./users/thomas/nvim
+              ];
+            };
+
+            thomas-slim = home-manager.lib.homeManagerConfiguration {
+              inherit pkgs;
+              extraSpecialArgs = { inherit inputs; inherit outputs; };
+              modules = [ ./users/thomas ];
+            };
+          };
+
+        }
+      );
+    };
+}

+ 1 - 0
modules/default.nix

@@ -0,0 +1 @@
+{}

+ 4 - 0
users/thomas/cli/bash.nix

@@ -0,0 +1,4 @@
+{
+  programs.bash.enable = true;
+  programs.bash.shellAliases = import ./shell-aliases.nix;
+}

+ 28 - 0
users/thomas/cli/bat.nix

@@ -0,0 +1,28 @@
+{ pkgs, ... }:
+{
+  programs.bat = {
+    enable = true;
+    config = { theme = "kanagawa"; };
+    themes = {
+      nord = {
+        src = pkgs.fetchFromGitHub {
+          owner = "crabique";
+          repo = "Nord-plist";
+          rev = "0d655b23d6b300e691676d9b90a68d92b267f7ec";
+          sha256 = "sha256-YUogcLO+W1hD0X/nsworGS1SHsOolp/g9N0rQJ/Q5wc=";
+        };
+        file = "/Nord.tmTheme";
+      };
+
+      kanagawa = {
+        src = pkgs.fetchFromGitHub {
+          owner = "rebelot";
+          repo = "kanagawa.nvim";
+          rev = "7b411f9e66c6f4f6bd9771f3e5affdc468bcbbd2";
+          sha256 = "sha256-kV+hNZ9tgC8bQi4pbVWRcNyQib0+seQrrFnsg7UMdBE=";
+        };
+        file = "/extras/kanagawa.tmTheme";
+      };
+    };
+  };
+}

+ 17 - 0
users/thomas/cli/default.nix

@@ -0,0 +1,17 @@
+{
+  imports = [
+    ./bash.nix
+    ./bat.nix
+    ./direnv.nix
+    ./fish.nix
+    ./fzf.nix
+    ./git.nix
+    ./github.nix
+    ./gnupg.nix
+    ./ssh.nix
+    ./starship.nix
+    ./yazi.nix
+    ./zoxide.nix
+    ./zsh.nix
+  ];
+}

+ 3 - 0
users/thomas/cli/direnv.nix

@@ -0,0 +1,3 @@
+{
+  programs.direnv.enable = true;
+}

+ 16 - 0
users/thomas/cli/fish.nix

@@ -0,0 +1,16 @@
+{ lib, pkgs, ... }:
+{
+  programs.fish = {
+    enable = true;
+    shellAliases = import ./shell-aliases.nix;
+
+    interactiveShellInit = lib.mkAfter ''
+      ${lib.strings.fileContents (pkgs.fetchFromGitHub {
+          owner = "rebelot";
+          repo = "kanagawa.nvim";
+          rev = "de7fb5f5de25ab45ec6039e33c80aeecc891dd92";
+          sha256 = "sha256-f/CUR0vhMJ1sZgztmVTPvmsAgp0kjFov843Mabdzvqo=";
+        } + "/extras/kanagawa.fish")}
+    '';
+  };
+}

+ 22 - 0
users/thomas/cli/fzf.nix

@@ -0,0 +1,22 @@
+{ pkgs, ... }:
+{
+  home.packages = with pkgs; [ fd ];
+
+  programs.fzf = rec {
+    # TODO(@tstachl): figure out why this is happening in tmux
+    # fish: Unknown command: fzf_key_bindings
+    # source /nix/store/.../share/fzf/key-bindings.fish && fzf_key_bindings
+    enable = false;
+    changeDirWidgetCommand = defaultCommand;
+    changeDirWidgetOptions = [ "--type=d" ] ++ defaultOptions;
+    defaultCommand = "${pkgs.fd}/bin/fd";
+    defaultOptions = [
+      "--strip-cwd-prefix"
+      "--hidden"
+      "--exclude .git"
+    ];
+    fileWidgetCommand = defaultCommand;
+    fileWidgetOptions = [ "--type=f" ] ++ defaultOptions;
+    tmux.enableShellIntegration = true;
+  };
+}

+ 145 - 0
users/thomas/cli/git.nix

@@ -0,0 +1,145 @@
+{ pkgs, ... }:
+{
+  home.packages = [ pkgs.git pkgs.git-crypt ];
+
+  programs.git = {
+    enable = true;
+    userName = "Thomas Stachl";
+    userEmail = "[email protected]";
+
+    signing = {
+      gpgPath = "${pkgs.gnupg}/bin/gpg";
+      key = "ED5EAAA8E895B23A";
+      signByDefault = true;
+    };
+
+    aliases = {
+      b = "branch";
+      bc = "checkout -b";
+      bl = "branch -v";
+      bL = "branch -av";
+      bx = "branch -d";
+      bX = "branch -D";
+      bm = "branch -m";
+      bM = "branch -M";
+      bs = "show-branch";
+      bS = "show-branch -a";
+      co = "checkout";
+      co0 = "checkout HEAD --";
+      f = "fetch";
+      fm = "pull";
+      fo = "fetch origin";
+      m = "merge";
+      mom = "merge origin/master";
+      p = "push";
+      pa = "push --all";
+      pt = "push --tags";
+      r = "rebase";
+      ra = "rebase --abort";
+      rc = "rebase --continue";
+      ri = "rebase --interactive";
+      rs = "rebase --skip";
+      rom = "rebase origin/master";
+      c = "commit -v";
+      ca = "commit --all -v";
+      cm = "commit --message";
+      cam = "commit --all --message";
+      camend = "commit --amend --reuse-message HEAD";
+      cundo = "reset --soft 'HEAD^'";
+      cp = "cherry-pick";
+      d = "diff          # Diff working dir to index";
+      ds = "diff --staged # Diff index to HEAD";
+      dc = "diff --staged # Diff index to HEAD";
+      dh = "diff HEAD     # Diff working dir and index to HEAD";
+      hub = "browse";
+      hubd = "compare";
+      s = "status";
+      a = "add";
+      ia = "add";
+      ir = "reset";
+      l = "log --topo-order --pretty=format:'%C(yellow)%h %C(cyan)%cn %C(blue)%cr%C(reset) %s'";
+      ls = "log --topo-order --stat --pretty=format:'%C(bold)%C(yellow)Commit:%C(reset) %C(yellow)%H%C(red)%d%n%C(bold)%C(yellow)Author:%C(reset) %C(cyan)%an <%ae>%n%C(bold)%C(yellow)Date:%C(reset)   %C(blue)%ai (%ar)%C(reset)%n%+B'";
+      ld = "log --topo-order --stat --patch --full-diff --pretty=format:'%C(bold)%C(yellow)Commit:%C(reset) %C(yellow)%H%C(red)%d%n%C(bold)%C(yellow)Author:%C(reset) %C(cyan)%an <%ae>%n%C(bold)%C(yellow)Date:%C(reset)   %C(blue)%ai (%ar)%C(reset)%n%+B'";
+      lg = "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit";
+      lga = "log --topo-order --all --graph --pretty=format:'%C(yellow)%h %C(cyan)%cn%C(reset) %s %C(red)%d%C(reset)%n'";
+      lm = "log --topo-order --pretty=format:'%s'";
+      lh = "shortlog --summary --numbered";
+      llf = "fsck --lost-found";
+      lg1 = "log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all";
+      lg2 = "log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n''          %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all";
+      re = "remote";
+      rel = "remote --verbose";
+      rea = "remote add";
+      rex = "remote rm";
+      rem = "remote rename";
+    };
+
+    extraConfig = {
+      core = {
+        editor = "vim";
+        pager = "less -FRSX";
+        whitespace = "fix,-indent-with-non-tab,trailing-space,cr-at-eol";
+      };
+
+      color = {
+        grep = "always";
+        pager = "true";
+        showbranch = "auto";
+        ui = "always";
+
+        interactive = {
+          error = "red bold";
+        };
+
+        branch = {
+          current = "yellow reverse";
+          local = "yellow";
+          remote = "green";
+        };
+
+        diff = {
+          meta = "yellow";
+          frag = "magenta";
+          old = "red";
+          new = "green";
+          whitespace = "white reverse";
+        };
+
+        status = {
+          added = "yellow";
+          changed = "green";
+          untracked = "cyan";
+          branch = "magenta";
+        };
+      };
+
+      diff.tool = "vimdiff";
+      difftool.prompt = "false";
+      merge.tool = "vimdiff";
+      push.default = "matching";
+      pull.rebase = "false";
+      init.defaultBranch = "master";
+
+      url = {
+        "[email protected]:" = {
+          insteadOf = "github:";
+        };
+      };
+
+      branch = {
+        master = {
+          remote = "origin";
+          merge = "refs/head/master";
+        };
+      };
+    };
+  };
+}
+
+
+# [filter "lfs"]
+# 	clean = git-lfs clean -- %f
+# 	smudge = git-lfs smudge -- %f
+# 	process = git-lfs filter-process
+# 	required = true
+

+ 3 - 0
users/thomas/cli/github.nix

@@ -0,0 +1,3 @@
+{
+  programs.gh.enable = true;
+}

+ 22 - 0
users/thomas/cli/gnupg.nix

@@ -0,0 +1,22 @@
+{ config, pkgs, ... }:
+let
+  inherit (config.xdg) configHome;
+in
+{
+  home.sessionVariables = {
+    GNUPGHOME = "${configHome}/gnupg";
+  };
+
+  programs.gpg = {
+    enable = true;
+    homedir = "${configHome}/gnupg";
+
+    publicKeys = [{
+      source = pkgs.fetchurl {
+        url = "https://keys.openpgp.org/vks/v1/by-fingerprint/7A53D4C6B481F7711588D34FDE749C31D060A160";
+        sha256 = "c4I7c+mZVOJpm54aOhIJQtAXAhBQZPnyp4LHEzuH09w=";
+      };
+      trust = 5;
+    }];
+  };
+}

+ 22 - 0
users/thomas/cli/shell-aliases.nix

@@ -0,0 +1,22 @@
+{
+  "..." = "cd ../..";
+  "...." = "cd ../../..";
+
+  # Git stuff
+  g = "git";
+  gco = "git checkout ";
+  gcob = "git checkout -b ";
+  ghic = "gh issue create --body '' ";
+
+  # nix stuff
+  hmb = "nix run github:nix-community/home-manager -- build";
+  hms = "nix run github:nix-community/home-manager -- switch";
+
+  home-manager = "nix run github:nix-community/home-manager --";
+
+  drb = "nix run github:lnl7/nix-darwin -- build";
+  drs = "nix run github:lnl7/nix-darwin -- switch";
+
+  nrb = "nix run github:nixos/nixpkgs -- build";
+  nrs = "nix run github:nixos/nixpkgs -- switch";
+}

+ 17 - 0
users/thomas/cli/ssh.nix

@@ -0,0 +1,17 @@
+{
+  programs.ssh = {
+    enable = true;
+    compression = true;
+    forwardAgent = true;
+
+    matchBlocks = {
+      modgud = {
+        hostname = "modgud.t5.st";
+        user = "thomas";
+      };
+
+      "github.com".user = "git";
+      github.hostname = "github.com";
+    };
+  };
+}

+ 3 - 0
users/thomas/cli/starship.nix

@@ -0,0 +1,3 @@
+{
+  programs.starship.enable = true;
+}

+ 3 - 0
users/thomas/cli/yazi.nix

@@ -0,0 +1,3 @@
+{
+  programs.yazi.enable = true;
+}

+ 6 - 0
users/thomas/cli/zoxide.nix

@@ -0,0 +1,6 @@
+{
+  programs.zoxide.enable = true;
+  programs.zoxide.options = [
+    "--cmd cd"
+  ];
+}

+ 6 - 0
users/thomas/cli/zsh.nix

@@ -0,0 +1,6 @@
+{
+  programs.zsh = {
+    enable = true;
+    shellAliases = import ./shell-aliases.nix;
+  };
+}

+ 30 - 0
users/thomas/default.nix

@@ -0,0 +1,30 @@
+{ pkgs, lib, config, outputs, ... }:
+let
+  homeLocation = with pkgs.stdenv.hostPlatform;
+    if isDarwin then "/Users" else "/home";
+in
+{
+  imports = [
+    ./cli
+  ] ++ (builtins.attrValues outputs.homeManagerModules);
+
+  nix.package = lib.mkDefault pkgs.nixVersions.stable;
+  nix.settings.trusted-users = [ "thomas" ];
+  nix.extraOptions = ''
+    warn-dirty = false
+    experimental-features = nix-command flakes impure-derivations
+  '';
+
+  manual.manpages.enable = false;
+  xdg.enable = true;
+
+  home = {
+    username = lib.mkDefault "thomas";
+    homeDirectory = lib.mkDefault "${homeLocation}/${config.home.username}";
+    sessionVariables = {
+      EDITOR = "${pkgs.neovim}/bin/nvim";
+      SHELL = "${pkgs.fish}/bin/fish";
+    };
+    stateVersion = lib.mkDefault "24.11";
+  };
+}

+ 133 - 0
users/thomas/desktop/alacritty.nix

@@ -0,0 +1,133 @@
+{ pkgs, ... }:
+{
+  programs.alacritty = {
+    enable = true;
+
+    settings = {
+      env = {
+        LC_ALL = "en_US.UTF-8";
+        LC_CTYPE = "en_US.UTF-8";
+        TERM = "xterm-256color";
+      };
+
+      font = {
+        normal = {
+          family = "FiraCode Nerd Font";
+          style = "Regular";
+        };
+        bold = {
+          family = "FiraCode Nerd Font";
+          style = "Bold";
+        };
+        italic = {
+          family = "FiraCode Nerd Font";
+          style = "Italic";
+        };
+        bold_italic = {
+          family = "FiraCode Nerd Font";
+          style = "Bold Italic";
+        };
+        size = 11.0;
+      };
+
+      colors = {
+        primary = {
+          background = "#1f1f28";
+          foreground = "#dcd7ba";
+        };
+
+        normal = {
+          black = "#090618";
+          red = "#c34043";
+          green = "#76946a";
+          yellow = "#c0a36e";
+          blue = "#7e9cd8";
+          magenta = "#957fb8";
+          cyan = "#6a9589";
+          white = "#c8c093";
+        };
+
+        bright = {
+          black = "#727169";
+          red = "#e82424";
+          green = "#98bb6c";
+          yellow = "#e6c384";
+          blue = "#7fb4ca";
+          magenta = "#938aa9";
+          cyan = "#7aa89f";
+          white = "#dcd7ba";
+        };
+
+        selection = {
+          background = "#2d4f67";
+          foreground = "#c8c093";
+        };
+      };
+
+      bell = {
+        animation = "EaseOutExpo";
+        duration = 400;
+        color = "#ffffff";
+      };
+
+      window = {
+        padding = {
+          x = 12;
+          y = 12;
+        };
+        opacity = 0.8;
+      };
+
+      terminal.shell = {
+        program = "${pkgs.fish}/bin/fish";
+        args = [ "--login" ];
+      };
+
+      keyboard.bindings = [
+       { key = "Space"; mods = "Shift"; mode = "~Search"; action = "ToggleViMode"; }
+
+        # TODO: figure out why I set these
+        # { key = "Up"; mods = "Alt"; chars = "\x1b[1;5A"; }
+        # { key = "Down"; mods = "Alt"; chars = "\x1b[1;5B"; }
+        # { key = "Left"; mods = "Alt"; chars = "\x1bb"; }
+        # { key = "Right"; mods = "Alt"; chars = "\x1bf"; }
+        # { key = "A"; mods = "Alt"; chars = "\x1ba"; }
+        # { key = "B"; mods = "Alt"; chars = "\x1bb"; }
+        # { key = "C"; mods = "Alt"; chars = "\x1bc"; }
+        # { key = "D"; mods = "Alt"; chars = "\x1bd"; }
+        # { key = "E"; mods = "Alt"; chars = "\x1be"; }
+        # { key = "F"; mods = "Alt"; chars = "\x1bf"; }
+        # { key = "G"; mods = "Alt"; chars = "\x1bg"; }
+        # { key = "H"; mods = "Alt"; chars = "\x1bh"; }
+        # { key = "I"; mods = "Alt"; chars = "\x1bi"; }
+        # { key = "J"; mods = "Alt"; chars = "\x1bj"; }
+        # { key = "K"; mods = "Alt"; chars = "\x1bk"; }
+        # { key = "L"; mods = "Alt"; chars = "\x1bl"; }
+        # { key = "M"; mods = "Alt"; chars = "\x1bm"; }
+        # { key = "N"; mods = "Alt"; chars = "\x1bn"; }
+        # { key = "O"; mods = "Alt"; chars = "\x1bo"; }
+        # { key = "P"; mods = "Alt"; chars = "\x1bp"; }
+        # { key = "Q"; mods = "Alt"; chars = "\x1bq"; }
+        # { key = "R"; mods = "Alt"; chars = "\x1br"; }
+        # { key = "S"; mods = "Alt"; chars = "\x1bs"; }
+        # { key = "T"; mods = "Alt"; chars = "\x1bt"; }
+        # { key = "U"; mods = "Alt"; chars = "\x1bu"; }
+        # { key = "V"; mods = "Alt"; chars = "\x1bv"; }
+        # { key = "W"; mods = "Alt"; chars = "\x1bw"; }
+        # { key = "X"; mods = "Alt"; chars = "\x1bx"; }
+        # { key = "Y"; mods = "Alt"; chars = "\x1by"; }
+        # { key = "Z"; mods = "Alt"; chars = "\x1bz"; }
+        # { key = "Key0"; mods = "Alt"; chars = "º"; }
+        # { key = "Key1"; mods = "Alt"; chars = "¡"; }
+        # { key = "Key2"; mods = "Alt"; chars = "€"; }
+        # { key = "Key3"; mods = "Alt"; chars = "#"; }
+        # { key = "Key4"; mods = "Alt"; chars = "¢"; }
+        # { key = "Key5"; mods = "Alt"; chars = "∞"; }
+        # { key = "Key6"; mods = "Alt"; chars = "§"; }
+        # { key = "Key7"; mods = "Alt"; chars = "¶"; }
+        # { key = "Key8"; mods = "Alt"; chars = "•"; }
+        # { key = "Key9"; mods = "Alt"; chars = "ª"; }
+      ];
+    };
+  };
+}

+ 9 - 0
users/thomas/desktop/default.nix

@@ -0,0 +1,9 @@
+{
+  imports = [
+    ./alacritty.nix
+    ./fonts.nix
+    ./ghostty.nix
+    ./syncthing.nix
+    ./yubikey.nix
+  ];
+}

+ 9 - 0
users/thomas/desktop/fonts.nix

@@ -0,0 +1,9 @@
+{ pkgs, ... }:
+{
+  fonts.fontconfig.enable = true;
+
+  home.packages = with pkgs; [
+    (nerdfonts.override { fonts = [ "FiraCode" ]; })
+    liberation_ttf
+  ];
+}

+ 59 - 0
users/thomas/desktop/ghostty.nix

@@ -0,0 +1,59 @@
+{
+  programs.ghostty = {
+    enable = false;
+
+    installVimSyntax = true;
+
+    themes = {
+      iceberg-dark = {
+        background = "161821";
+        foreground = "c6c8d1";
+
+        selection-background = "1e2132";
+        selection-foreground = "c6c8d1";
+
+        cursor-color = "#d2d4de";
+
+        palette = [
+          # black
+          "0=#161821"
+          "8=#6b7089"
+          # red
+          "1=#e27878"
+          "9=#e98989"
+          # green
+          "2=#b4be82"
+          "10=#c0ca8e"
+          # yellow
+          "3=#e2a478"
+          "11=#e9b189"
+          # blue
+          "4=#84a0c6"
+          "12=#91acd1"
+          # magenta
+          "5=#a093c7"
+          "13=#ada0d3"
+          # cyan
+          "6=#89b8c2"
+          "14=#95c4ce"
+          # white
+          "7=#c6c8d1"
+          "15=#d2d4de"
+        ];
+      };
+    };
+
+    settings = {
+      background-opacity = 0.8;
+      font-family = "FiraCode Nerd Font";
+      font-size = 11.0;
+
+      macos-titlebar-style = "hidden";
+      theme = "iceberg-dark";
+
+      window-padding-x = 12;
+      window-padding-y = 12;
+      window-theme = "ghostty";
+    };
+  };
+}

+ 3 - 0
users/thomas/desktop/syncthing.nix

@@ -0,0 +1,3 @@
+{
+  services.syncthing.enable = true;
+}

+ 38 - 0
users/thomas/desktop/yubikey.nix

@@ -0,0 +1,38 @@
+{ lib, pkgs, ... }:
+
+with lib;
+
+let
+  inherit (pkgs.stdenv.hostPlatform) isLinux;
+in
+{
+  programs.gpg = {
+    settings = {
+      no-comments = true;
+      no-emit-version = true;
+      no-symkey-cache = true;
+      default-new-key-algo = "ed25519/cert,sign+cv25519/encr";
+      personal-cipher-preferences = "AES256 CAMELLIA256 AES192 CAMELLIA192 AES CAMELLIA128";
+      personal-compress-preferences = "ZLIB BZIP2 ZIP Uncompressed";
+      personal-digest-preferences = "SHA512 SHA384 SHA256";
+      pinentry-mode = "loopback";
+    };
+
+    scdaemonSettings = {
+      reader-port = "Yubico Yubi";
+      disable-ccid = true;
+    };
+  };
+
+  services.gpg-agent = mkIf isLinux {
+    enable = mkDefault true;
+    enableBashIntegration = true;
+    enableFishIntegration = true;
+    enableSshSupport = true;
+    pinentryFlavor = "curses";
+    sshKeys = [
+      "0C8022799396573FE31D595B2C4B60B871618D9C"
+    ];
+  };
+}
+

+ 7 - 0
users/thomas/nvim/colorschemes.nix

@@ -0,0 +1,7 @@
+{
+  colorschemes.kanagawa = {
+    enable = true;
+    settings.theme = "dragon";
+    settings.transparent = true;
+  };
+}

+ 20 - 0
users/thomas/nvim/default.nix

@@ -0,0 +1,20 @@
+{ inputs, lib, ... }:
+let
+  # Define `recursiveUpdateMany` if not present
+  recursiveUpdateMany = sets: lib.fold lib.attrsets.recursiveUpdate {} sets;
+
+  # Merge all plugin configurations directly from imports
+  nixvim = recursiveUpdateMany [
+    (import ./colorschemes.nix)
+    (import ./keymaps.nix)
+    (import ./options.nix)
+    (import ./plugins.nix)
+  ];
+in
+{
+  imports = [
+    inputs.nixvim.homeManagerModules.nixvim
+  ];
+
+  programs.nixvim = nixvim;
+}

+ 24 - 0
users/thomas/nvim/keymaps.nix

@@ -0,0 +1,24 @@
+{
+  keymaps = [
+    # clear search highlight on <ESC>
+    { key = "<Esc>"; action = "<cmd>nohlsearch<CR>"; mode = "n"; }
+    # Diagnostic keymaps
+    # { key = "<leader>q"; action.__raw = "vim.diagnostic.setloclist"; mode = "n"; options.desc = "Open diagnostic [Q]uickfix list"; }
+    # Exit terminal mode in the builtin terminal
+    # { key = "<Esc><Esc>"; action = "<C-\\><C-n>"; mode = "t"; option.desc = "Exit terminal mode"; }
+    # Keybinds to make split navigation easier.
+    { key = "<C-h>"; action = "<C-w><C-h>"; mode = "n"; options.desc = "Move focus to the left window"; }
+    { key = "<C-l>"; action = "<C-w><C-l>"; mode = "n"; options.desc = "Move focus to the right window"; }
+    { key = "<C-j>"; action = "<C-w><C-j>"; mode = "n"; options.desc = "Move focus to the lower window"; }
+    { key = "<C-k>"; action = "<C-w><C-k>"; mode = "n"; options.desc = "Move focus to the upper window"; }
+    # Move highlighed blocks of code up and down
+    { key = "K"; action = ":m '<-2<CR>gv=gv"; mode = "v"; }
+    { key = "J"; action = ":m '>+1<CR>gv=gv"; mode = "v"; }
+
+    { key = "J"; action = "mzJ`z"; mode = "n"; }
+    { key = "<C-d>"; action = "<C-d>zz"; mode = "n"; }
+    { key = "<C-u>"; action = "<C-u>zz"; mode = "n"; }
+    { key = "n"; action = "nzzzv"; mode = "n"; }
+    { key = "N"; action = "Nzzzv"; mode = "n"; }
+  ];
+}

+ 77 - 0
users/thomas/nvim/options.nix

@@ -0,0 +1,77 @@
+{
+  globals.mapleader = " ";
+  globals.maplocalleader = " ";
+  globals.have_nerd_font = true;
+
+  opts = {
+    # Make line numbers default
+    number = true;
+    relativenumber = true;
+    # Enable mouse mode, can be useful for resizing splits for example!
+    mouse = "a";
+    # Don't show the mode, since it's already in the status line
+    showmode = false;
+    # Enable break indent
+    breakindent = true;
+    # Save undo history
+    undofile = true;
+    # Case-insensitive searching UNLESS \C or one or more capital letters in the search term
+    ignorecase = true;
+    smartcase = true;
+    # Keep signcolumn on by default
+    signcolumn = "yes";
+    # Decrease update time
+    updatetime = 250;
+    # Decrease mapped sequence wait time
+    # Displays which-key popup sooner
+    timeoutlen = 300;
+    # Configure how new splits should be opened
+    splitright = true;
+    splitbelow = true;
+    # Sets how neovim will display certain whitespace characters in the editor.
+    list = true;
+    listchars = { tab = "» "; trail = "·"; nbsp = "␣"; };
+    # Preview substitutions live, as you type!
+    inccommand = "split";
+    # Show which line your cursor is on
+    cursorline = true;
+    # Minimal number of screen lines to keep above and below the cursor.
+    scrolloff = 10;
+    # Set highlight on search
+    hlsearch = true;
+    # Disable swapfile and backup
+    swapfile = false;
+    backup = false;
+    # Set's the conceal level
+    conceallevel = 1;
+    # I don't need a status all the time
+    laststatus = 3;
+    # Hide command bar
+    cmdheight = 0;
+
+    # guicursor = "";
+    # incsearch = true;
+    # termguicolors = true;
+    # scrolloff = 8;
+    # isfname = [ "@-@" ];
+    # colorcolumn = "80";
+  };
+
+  autoCmd = [
+    {
+      event = "TextYankPost";
+      desc = "Highlight when yanking (copying) text";
+      group = "kickstart-highlight-yank";
+      callback.__raw = ''
+        function()
+          vim.highlight.on_yank()
+        end
+      '';
+    }
+  ];
+
+  autoGroups = {
+    "kickstart-highlight-yank".clear = true;
+  };
+}
+

+ 15 - 0
users/thomas/nvim/plugins.nix

@@ -0,0 +1,15 @@
+{
+  imports = [
+    ./plugins/cmp.nix
+    ./plugins/comment.nix
+    ./plugins/fidget.nix
+    ./plugins/indent-blankline.nix
+    ./plugins/mdx.nix
+    ./plugins/telescope.nix
+    ./plugins/tmux.nix
+    ./plugins/treesitter.nix
+    ./plugins/web-devicons.nix
+    ./plugins/which-key.nix
+    ./plugins/zenmode.nix
+  ];
+}

+ 4 - 0
users/thomas/nvim/plugins/avante.nix

@@ -0,0 +1,4 @@
+{
+  plugins.avante.enable = true;
+  plugins.avante.settings.claude.model = "claude-3-5-haiku-20241022";
+}

+ 44 - 0
users/thomas/nvim/plugins/cmp.nix

@@ -0,0 +1,44 @@
+{
+  plugins.cmp.enable = true;
+  plugins.cmp.autoEnableSources = true;
+  plugins.cmp.settings.mapping = {
+    "<C-n>" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})";
+    "<C-p>" = "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})";
+    "<C-b>" = "cmp.mapping.scroll_docs(-4)";
+    "<C-f>" = "cmp.mapping.scroll_docs(4)";
+    "<C-y>" = "cmp.mapping.confirm({ select = true })";
+    "<C-Space>" = "cmp.mapping.complete()";
+    "<C-e>" = "cmp.mapping.close()";
+
+    "<C-l>" = ''
+      cmp.mapping(function()
+        if luasnip.expand_or_locally_jumpable() then
+          luasnip.expand_or_jump()
+        end
+      end, { 'i', 's' })
+    '';
+
+    "<C-h>" = ''
+      cmp.mapping(function()
+        if luasnip.locally_jumpable(-1) then
+          luasnip.jump(-1)
+        end
+      end, { 'i', 's' })
+    '';
+  };
+  plugins.cmp.settings.sources = [
+    { name = "nvim_lsp"; }
+    { name = "luasnip"; }
+    { name = "path"; }
+    { name = "buffer"; }
+    { name = "friendly-snippets"; }
+  ];
+
+  plugins.luasnip.enable = true;
+  plugins.cmp_luasnip.enable = true;
+  plugins.cmp-nvim-lsp.enable = true;
+  plugins.cmp-nvim-lsp-document-symbol.enable = true;
+  plugins.cmp-nvim-lsp-signature-help.enable = true;
+  plugins.cmp-path.enable = true;
+  plugins.friendly-snippets.enable = true;
+}

+ 3 - 0
users/thomas/nvim/plugins/comment.nix

@@ -0,0 +1,3 @@
+{
+  plugins.comment.enable = true;
+}

+ 23 - 0
users/thomas/nvim/plugins/conform.nix

@@ -0,0 +1,23 @@
+{
+  keymaps = [
+    {
+      key = "<leader>f";
+      action.__raw = ''
+        function()
+          require('conform').format { async = true, lsp_fallback = true }
+        end
+      '';
+      options.desc = "[F]ormat buffer";
+    }
+  ];
+
+  plugins.conform-nvim = {
+    enable = true;
+    settings.formatters_by_ft = {
+      lua = [ "lua_ls" ];
+      javascript = [ [ "prettierd" "prettier" ] [ "eslint_d" "eslint" ] ];
+      typescript = [ [ "prettierd" "prettier" ] [ "eslint_d" "eslint" ] ];
+    };
+    settings.notify_on_error = false;
+  };
+}

+ 32 - 0
users/thomas/nvim/plugins/elixir-tools.nix

@@ -0,0 +1,32 @@
+# { pkgs, ... }:
+{
+  plugins.elixir.enable = false;
+  # plugins.elixir.settings = {
+  #   nextls = {
+  #     enable = true;
+  #     cmd = "nextls";
+  #     init_options = {
+  #       mix_env = "production";
+  #       mix_target = "localhost";
+  #       experimental.completions.enable = true;
+  #       extensions.credo = {
+  #         enable = true;
+  #         cli_options = [];
+  #       };
+  #     };
+  #     # on_attach.__raw = ''
+  #     #   function(client, bufnr)
+  #     #     -- from config
+  #     #   end
+  #     # '';
+  #   };
+  # #   nextls.enable = true;
+  # #   nextls.auto_update = true;
+  # #   elixirls.enable = false;
+  # #   projectionist.enable = false;
+  # };
+  # extraPlugins = with pkgs.vimPlugins; [ elixir-tools-nvim ];
+  # extraConfigLua = ''
+  #   require("elixir").setup()
+  # '';
+}

+ 3 - 0
users/thomas/nvim/plugins/fidget.nix

@@ -0,0 +1,3 @@
+{
+  plugins.fidget.enable = true;
+}

+ 12 - 0
users/thomas/nvim/plugins/gitsigns.nix

@@ -0,0 +1,12 @@
+{
+  plugins.gitsigns.enable = true;
+  plugins.gitsigns.settings = {
+    signs = {
+      add = { text = "+"; };
+      change = { text = "~"; };
+      delete = { text = "_"; };
+      topdelete = { text = "‾"; };
+      changedelete = { text = "~"; };
+    };
+  };
+}

+ 3 - 0
users/thomas/nvim/plugins/indent-blankline.nix

@@ -0,0 +1,3 @@
+{
+  plugins.indent-blankline.enable = true;
+}

+ 13 - 0
users/thomas/nvim/plugins/lint.nix

@@ -0,0 +1,13 @@
+{
+  plugins.lint.enable = true;
+  plugins.lint.lintersByFt = {
+    elixir = [ "credo" ];
+  };
+}
+
+      # vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "InsertLeave" }, {
+      #   group = lint_augroup,
+      #   callback = function()
+      #     lint.try_lint()
+      #   end,
+      # })

+ 25 - 0
users/thomas/nvim/plugins/mdx.nix

@@ -0,0 +1,25 @@
+{
+  filetype.extension.mdx = "mdx";
+
+  plugins.treesitter.languageRegister.markdown = "mdx";
+
+  extraFiles = {
+    # highlighting import statements in markdown
+    "queries/markdown/injections.scm".text = ''
+      ; extends
+      ((inline) @injection.content
+        (#lua-match? @injection.content "^%s*import")
+        (#set! injection.language "typescript"))
+      ((inline) @injection.content
+        (#lua-match? @injection.content "^%s*export")
+        (#set! injection.language "typescript"))
+    '';
+
+    # disable spell check if turned on
+    "queries/markdown/highlights.scm".text = ''
+      ; extends
+      ((inline) @_inline (#lua-match? @_inline "^%s*import")) @nospell
+      ((inline) @_inline (#lua-match? @_inline "^%s*export")) @nospell
+    '';
+  };
+}

+ 13 - 0
users/thomas/nvim/plugins/mini.nix

@@ -0,0 +1,13 @@
+{
+  plugins.web-devicons.enable = true;
+  plugins.mini.enable = true;
+  plugins.mini.modules = {
+    ai.n_lines = 500;
+    surround = {};
+    statusline.section_location.__raw = ''
+      function()
+        return '%2l:%-2v'
+      end
+    '';
+  };
+}

+ 10 - 0
users/thomas/nvim/plugins/oil.nix

@@ -0,0 +1,10 @@
+{
+  keymaps = [
+    { key = "-"; action = "<cmd>Oil<cr>"; mode = "n"; }
+  ];
+
+  plugins.oil.enable = true;
+  plugins.oil.settings.keymaps = {
+    "-" = "<cmd>Oil<cr>";
+  };
+}

+ 3 - 0
users/thomas/nvim/plugins/sleuth.nix

@@ -0,0 +1,3 @@
+{
+  plugins.sleuth.enable = true;
+}

+ 62 - 0
users/thomas/nvim/plugins/telescope.nix

@@ -0,0 +1,62 @@
+{
+  plugins.telescope = {
+    enable = true;
+    settings.pickers.find_files.follow = true;
+    extensions.fzf-native.enable = true;
+    extensions.ui-select.enable = true;
+  };
+
+  keymaps = [
+    { mode = "n"; key = "<leader>sh"; action.__raw = "require('telescope.builtin').help_tags"; options.desc = "[S]earch [H]elp"; }
+    { mode = "n"; key = "<leader>sk"; action.__raw = "require('telescope.builtin').keymaps"; options.desc = "[S]earch [K]eymaps"; }
+    { mode = "n"; key = "<leader>sf"; action.__raw = "require('telescope.builtin').find_files"; options.desc = "[S]earch [F]iles"; }
+    { mode = "n"; key = "<leader>ss"; action.__raw = "require('telescope.builtin').builtin"; options.desc = "[S]earch [S]elect Telescope"; }
+    { mode = "n"; key = "<leader>sw"; action.__raw = "require('telescope.builtin').grep_string"; options.desc = "[S]earch current [W]ord"; }
+    { mode = "n"; key = "<leader>sg"; action.__raw = "require('telescope.builtin').live_grep"; options.desc = "[S]earch by [G]rep"; }
+    { mode = "n"; key = "<leader>s."; action.__raw = "require('telescope.builtin').oldfiles"; options.desc = "[S]earch Recent Files (\".\" for repeat)"; }
+    { mode = "n"; key = "<leader>sd"; action.__raw = "require('telescope.builtin').diagnostics"; options.desc = "[S]earch [D]iagnostics"; }
+    { mode = "n"; key = "<leader>sr"; action.__raw = "require('telescope.builtin').resume"; options.desc = "[S]earch [R]esume"; }
+    { mode = "n"; key = "<leader><leader>"; action.__raw = "require('telescope.builtin').buffers"; options.desc = "[ ] Find existing buffers"; }
+
+    {
+      mode = "n";
+      key = "<leader>/";
+      action.__raw = ''
+        function()
+          require('telescope.builtin').current_buffer_fuzzy_find(require('telescope.themes').get_dropdown {
+            winblend = 10,
+            previewer = false,
+          })
+        end
+      '';
+      options.desc = "[/] Fuzzily search in current buffer";
+    }
+
+    {
+      mode = "n";
+      key = "<leader>s/";
+      action.__raw = ''
+        function()
+          require('telescope.builtin').live_grep {
+            grep_open_files = true,
+            prompt_title = 'Live Grep in Open Files',
+          }
+        end
+      '';
+      options.desc = "[S]earch [/] in Open Files";
+    }
+
+    {
+      mode = "n";
+      key = "<leader>sn";
+      action.__raw = ''
+        function()
+          require('telescope.builtin').find_files {
+            cwd = vim.fn.stdpath 'config'
+          }
+        end
+      '';
+      options.desc = "[S]earch [N]eovim files";
+    }
+  ];
+}

+ 3 - 0
users/thomas/nvim/plugins/tmux.nix

@@ -0,0 +1,3 @@
+{
+  plugins.tmux-navigator.enable = true;
+}

+ 4 - 0
users/thomas/nvim/plugins/todo-comments.nix

@@ -0,0 +1,4 @@
+{
+  plugins.todo-comments.enable = true;
+  plugins.todo-comments.settings.signs = false;
+}

+ 17 - 0
users/thomas/nvim/plugins/treesitter.nix

@@ -0,0 +1,17 @@
+{ pkgs, ... }:
+{
+  plugins.treesitter = {
+    grammarPackages =
+      pkgs.stable.vimPlugins.nvim-treesitter.passthru.allGrammars;
+
+    enable = true;
+    settings.ensure_installed = "all";
+    settings.ignore_install = [ "norg" ];
+    settings.highlight.enable = true;
+    settings.highlight.disable = [ "go" ];
+    settings.incremental_selection.enable = true;
+    settings.indent.enable = true;
+    nixvimInjections = true;
+  };
+  plugins.treesitter-context.enable = true;
+}

+ 3 - 0
users/thomas/nvim/plugins/web-devicons.nix

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

+ 48 - 0
users/thomas/nvim/plugins/which-key.nix

@@ -0,0 +1,48 @@
+{
+  plugins.which-key.enable = true;
+  plugins.which-key.settings.spec = [
+    {
+      __unkeyed-1 = "<leader>c";
+      group = "[C]ode";
+      icon = "󰄄 ";
+    }
+    {
+      __unkeyed-1 = "<leader>d";
+      group = "[D]ocuments";
+      icon = "󰄄 ";
+    }
+    {
+      __unkeyed-1 = "<leader>r";
+      group = "[R]ename";
+      icon = "󰄄 ";
+    }
+    {
+      __unkeyed-1 = "<leader>s";
+      group = "[S]earch";
+      icon = "󰄄 ";
+    }
+    {
+      __unkeyed-1 = "<leader>w";
+      group = "[W]orkspace";
+      icon = "󰄄 ";
+    }
+    {
+      __unkeyed-1 = "<leader>t";
+      group = "[T]oggle";
+      icon = "󰄄 ";
+    }
+    {
+      __unkeyed-1 = "<leader>h";
+      group = "Git [H]unk";
+      icon = "󰄄 ";
+      mode = [ "n" "v" ];
+    }
+  ];
+  # { '<leader>c', group = '[C]ode' },
+  # { '<leader>d', group = '[D]ocument' },
+  # { '<leader>r', group = '[R]ename' },
+  # { '<leader>s', group = '[S]earch' },
+  # { '<leader>w', group = '[W]orkspace' },
+  # { '<leader>t', group = '[T]oggle' },
+  # { '<leader>h', group = 'Git [H]unk', mode = { 'n', 'v' } }
+}

+ 14 - 0
users/thomas/nvim/plugins/zenmode.nix

@@ -0,0 +1,14 @@
+{
+  keymaps = [
+    { key = "<leader>z"; action = "<cmd>ZenMode<CR>"; options.desc = "[Z]en Mode"; }
+  ];
+
+  plugins.zen-mode = {
+    enable = true;
+    settings = {
+      plugins.alacritty.enabled = true;
+      plugins.tmux.enabled = true;
+      window.width = 0.5;
+    };
+  };
+}