Selaa lähdekoodia

so many changes

Zander Hawke 1 vuosi sitten
vanhempi
sitoutus
e9fe1a95e6
94 muutettua tiedostoa jossa 1627 lisäystä ja 607 poistoa
  1. 60 38
      flake.lock
  2. 47 43
      flake.nix
  3. 0 0
      home/features/cli/bash.nix
  4. 3 1
      home/features/cli/bat.nix
  5. 0 0
      home/features/cli/default.nix
  6. 0 0
      home/features/cli/direnv.nix
  7. 5 2
      home/features/cli/fish.nix
  8. 0 0
      home/features/cli/fzf.nix
  9. 6 2
      home/features/cli/git.nix
  10. 0 0
      home/features/cli/github.nix
  11. 15 8
      home/features/cli/gnupg.nix
  12. 0 0
      home/features/cli/nushell.nix
  13. 0 0
      home/features/cli/shell-aliases.nix
  14. 0 0
      home/features/cli/ssh.nix
  15. 0 0
      home/features/cli/starship.nix
  16. 0 0
      home/features/cli/yazi.nix
  17. 0 0
      home/features/cli/zoxide.nix
  18. 0 0
      home/features/cli/zsh.nix
  19. 36 0
      home/features/core.nix
  20. 6 1
      home/features/desktop/alacritty.nix
  21. 0 0
      home/features/desktop/default.nix
  22. 0 0
      home/features/desktop/fonts.nix
  23. 11 6
      home/features/desktop/ghostty.nix
  24. 0 0
      home/features/desktop/syncthing.nix
  25. 0 1
      home/features/desktop/yubikey.nix
  26. 0 0
      home/features/nvim/colorschemes.nix
  27. 2 2
      home/features/nvim/default.nix
  28. 76 0
      home/features/nvim/keymaps.nix
  29. 164 0
      home/features/nvim/lsp.nix
  30. 5 2
      home/features/nvim/options.nix
  31. 1 0
      home/features/nvim/plugins.nix
  32. 0 0
      home/features/nvim/plugins/avante.nix
  33. 0 0
      home/features/nvim/plugins/cmp.nix
  34. 0 0
      home/features/nvim/plugins/comment.nix
  35. 20 2
      home/features/nvim/plugins/conform.nix
  36. 0 0
      home/features/nvim/plugins/elixir-tools.nix
  37. 0 0
      home/features/nvim/plugins/fidget.nix
  38. 22 0
      home/features/nvim/plugins/gitsigns.nix
  39. 0 0
      home/features/nvim/plugins/indent-blankline.nix
  40. 13 0
      home/features/nvim/plugins/lint.nix
  41. 0 0
      home/features/nvim/plugins/mdx.nix
  42. 1 1
      home/features/nvim/plugins/mini.nix
  43. 5 1
      home/features/nvim/plugins/oil.nix
  44. 0 0
      home/features/nvim/plugins/sleuth.nix
  45. 58 0
      home/features/nvim/plugins/snacks.nix
  46. 112 0
      home/features/nvim/plugins/telescope.nix
  47. 0 0
      home/features/nvim/plugins/tmux.nix
  48. 0 0
      home/features/nvim/plugins/todo-comments.nix
  49. 1 2
      home/features/nvim/plugins/treesitter.nix
  50. 0 0
      home/features/nvim/plugins/web-devicons.nix
  51. 4 1
      home/features/nvim/plugins/which-key.nix
  52. 5 1
      home/features/nvim/plugins/zenmode.nix
  53. 13 0
      home/meili.nix
  54. 8 0
      home/modgud.nix
  55. 5 2
      hosts/common/home-manager.nix
  56. 22 11
      hosts/common/nix.nix
  57. 23 0
      hosts/meili/README.md
  58. 102 0
      hosts/meili/aerospace.nix
  59. 0 0
      hosts/meili/colima.nix
  60. 50 0
      hosts/meili/default.nix
  61. 69 0
      hosts/meili/software.nix
  62. 98 0
      hosts/meili/system.nix
  63. 6 1
      hosts/modgud/hardware.nix
  64. 62 0
      lib/default.nix
  65. 6 0
      modules/darwin/default.nix
  66. 32 0
      modules/darwin/networking/remote-login.nix
  67. 76 0
      modules/darwin/security/pam-reattach.nix
  68. 25 0
      modules/darwin/system/rosetta.nix
  69. 160 0
      modules/darwin/virtualization/colima.nix
  70. 6 0
      modules/default.nix
  71. 0 10
      modules/global/cachix.nix
  72. 0 9
      modules/global/default.nix
  73. 0 6
      modules/global/devenv.nix
  74. 0 10
      modules/global/fish.nix
  75. 0 7
      modules/global/fonts.nix
  76. 0 5
      modules/global/gnupg.nix
  77. 0 13
      modules/global/locale.nix
  78. 36 25
      modules/global/nix-config.nix
  79. 0 22
      modules/global/openssh.nix
  80. 0 3
      modules/global/users/default.nix
  81. 0 17
      modules/global/users/thomas.nix
  82. 1 1
      modules/home-manager/default.nix
  83. 79 72
      modules/home-manager/programs/ghostty-darwin.nix
  84. 3 0
      modules/nixos/default.nix
  85. 33 0
      overlays/default.nix
  86. 5 1
      packages/default.nix
  87. 7 0
      packages/hello.nix
  88. 14 0
      packages/photo-cli.nix
  89. 8 3
      users/thomas/default.nix
  90. 0 24
      users/thomas/nvim/keymaps.nix
  91. 0 164
      users/thomas/nvim/lsp.nix
  92. 0 12
      users/thomas/nvim/plugins/gitsigns.nix
  93. 0 13
      users/thomas/nvim/plugins/lint.nix
  94. 0 62
      users/thomas/nvim/plugins/telescope.nix

+ 60 - 38
flake.lock

@@ -28,6 +28,27 @@
         "type": "github"
       }
     },
+    "darwin": {
+      "inputs": {
+        "nixpkgs": [
+          "nixpkgs-darwin"
+        ]
+      },
+      "locked": {
+        "lastModified": 1737421067,
+        "narHash": "sha256-/hgw8fDKDpko0XqOw1e9tX8lS2Hqecg7W/JsONun6Qc=",
+        "owner": "lnl7",
+        "repo": "nix-darwin",
+        "rev": "cae8d1c4a3bd37be5887203fe3b0c3a860c53a07",
+        "type": "github"
+      },
+      "original": {
+        "owner": "lnl7",
+        "ref": "nix-darwin-24.11",
+        "repo": "nix-darwin",
+        "type": "github"
+      }
+    },
     "devenv": {
       "inputs": {
         "cachix": "cachix",
@@ -39,11 +60,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1737999381,
-        "narHash": "sha256-Vi53EAQ9LOon0boDA2AhtTi2/CKz+rWbXAv+EXMxR9I=",
+        "lastModified": 1738414267,
+        "narHash": "sha256-7B+rkQlQ8zIzVgJRiu49ZFST6NBWt+JsnQZ/Q4W3qlI=",
         "owner": "cachix",
         "repo": "devenv",
-        "rev": "b6eaeaca6233887e7db51a2cc7b6ada81c7fadb7",
+        "rev": "3f49b4afbb9a80b1e81fb6071f59dac152177efa",
         "type": "github"
       },
       "original": {
@@ -80,11 +101,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1737038063,
-        "narHash": "sha256-rMEuiK69MDhjz1JgbaeQ9mBDXMJ2/P8vmOYRbFndXsk=",
+        "lastModified": 1738148035,
+        "narHash": "sha256-KYOATYEwaKysL3HdHdS5kbQMXvzS4iPJzJrML+3TKAo=",
         "owner": "nix-community",
         "repo": "disko",
-        "rev": "bf0abfde48f469c256f2b0f481c6281ff04a5db2",
+        "rev": "18d0a984cc2bc82cf61df19523a34ad463aa7f54",
         "type": "github"
       },
       "original": {
@@ -111,12 +132,12 @@
     },
     "flake-compat_2": {
       "locked": {
-        "lastModified": 1696426674,
-        "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
-        "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
-        "revCount": 57,
+        "lastModified": 1733328505,
+        "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
+        "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
+        "revCount": 69,
         "type": "tarball",
-        "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz"
+        "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.1.0/01948eb7-9cba-704f-bbf3-3fa956735b52/source.tar.gz"
       },
       "original": {
         "type": "tarball",
@@ -222,11 +243,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1737043064,
-        "narHash": "sha256-I/OuxGwXwRi5gnFPsyCvVR+IfFstA+QXEpHu1hvsgD8=",
+        "lastModified": 1737465171,
+        "narHash": "sha256-R10v2hoJRLq8jcL4syVFag7nIGE7m13qO48wRIukWNg=",
         "owner": "cachix",
         "repo": "git-hooks.nix",
-        "rev": "94ee657f6032d913fe0ef49adaa743804635b0bb",
+        "rev": "9364dc02281ce2d37a1f55b6e51f7c0f65a75f17",
         "type": "github"
       },
       "original": {
@@ -385,11 +406,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1727438425,
-        "narHash": "sha256-X8ES7I1cfNhR9oKp06F6ir4Np70WGZU5sfCOuNBEwMg=",
+        "lastModified": 1734114420,
+        "narHash": "sha256-n52PUzub5jZWc8nI/sR7UICOheU8rNA+YZ73YaHeCBg=",
         "owner": "domenkozar",
         "repo": "nix",
-        "rev": "f6c5ae4c1b2e411e6b1e6a8181cc84363d6a7546",
+        "rev": "bde6a1a0d1f2af86caa4d20d23eca019f3d57eee",
         "type": "github"
       },
       "original": {
@@ -407,11 +428,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1736820923,
-        "narHash": "sha256-SDuKLOWAh8VJRXlNWQn9QE99bjeEUAAbYXqrKGbsiyk=",
+        "lastModified": 1737421067,
+        "narHash": "sha256-/hgw8fDKDpko0XqOw1e9tX8lS2Hqecg7W/JsONun6Qc=",
         "owner": "lnl7",
         "repo": "nix-darwin",
-        "rev": "944c2b181792ae7ae6b20c0df3f44879c11706c9",
+        "rev": "cae8d1c4a3bd37be5887203fe3b0c3a860c53a07",
         "type": "github"
       },
       "original": {
@@ -439,11 +460,11 @@
     },
     "nixpkgs-darwin": {
       "locked": {
-        "lastModified": 1737728197,
-        "narHash": "sha256-Ltd3Ov3awL2OWS69Dm+6dRLpm1UdMuvQzF9GgfOyz30=",
+        "lastModified": 1738322334,
+        "narHash": "sha256-SYQTFMBJRbvLBaTm0D8qnbrmwfQQkalVtef6XLbGDFs=",
         "owner": "nixos",
         "repo": "nixpkgs",
-        "rev": "8e39f04b54a435f14b9c1d6a6caede0a0a9825b6",
+        "rev": "d42233d3d0c2ec4765314a966981303006a46aa8",
         "type": "github"
       },
       "original": {
@@ -455,11 +476,11 @@
     },
     "nixpkgs-unstable": {
       "locked": {
-        "lastModified": 1737717945,
-        "narHash": "sha256-ET91TMkab3PmOZnqiJQYOtSGvSTvGeHoegAv4zcTefM=",
+        "lastModified": 1738297584,
+        "narHash": "sha256-AYvaFBzt8dU0fcSK2jKD0Vg23K2eIRxfsVXIPCW9a0E=",
         "owner": "nixos",
         "repo": "nixpkgs",
-        "rev": "ecd26a469ac56357fd333946a99086e992452b6a",
+        "rev": "9189ac18287c599860e878e905da550aa6dec1cd",
         "type": "github"
       },
       "original": {
@@ -487,11 +508,11 @@
     },
     "nixpkgs_3": {
       "locked": {
-        "lastModified": 1737672001,
-        "narHash": "sha256-YnHJJ19wqmibLQdUeq9xzE6CjrMA568KN/lFPuSVs4I=",
+        "lastModified": 1738277201,
+        "narHash": "sha256-6L+WXKCw5mqnUIExvqkD99pJQ41xgyCk6z/H9snClwk=",
         "owner": "nixos",
         "repo": "nixpkgs",
-        "rev": "035f8c0853c2977b24ffc4d0a42c74f00b182cd8",
+        "rev": "666e1b3f09c267afd66addebe80fb05a5ef2b554",
         "type": "github"
       },
       "original": {
@@ -516,11 +537,11 @@
         "treefmt-nix": "treefmt-nix"
       },
       "locked": {
-        "lastModified": 1737283156,
-        "narHash": "sha256-FyHmM6vvz+UxCrPZo/poIaZBZejLHVKkAH4cjtUxZDA=",
+        "lastModified": 1737731711,
+        "narHash": "sha256-6ubhKkCkBMuqFMjzeg+/2L5dNipKKf1KE9i8r8inyEg=",
         "owner": "nix-community",
         "repo": "nixvim",
-        "rev": "abcbd250b8a2c7aab1f4b2b9e01598ee24b42337",
+        "rev": "841155edf9c4578f2f9a7bd6993e1da2ce73b35c",
         "type": "github"
       },
       "original": {
@@ -540,11 +561,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1735854821,
-        "narHash": "sha256-Iv59gMDZajNfezTO0Fw6LHE7uKAShxbvMidmZREit7c=",
+        "lastModified": 1737372689,
+        "narHash": "sha256-nH3zK2ki0fd5o5qvbGHxukE4qnOLJa1uCzoDObG5vrE=",
         "owner": "NuschtOS",
         "repo": "search",
-        "rev": "836908e3bddd837ae0f13e215dd48767aee355f0",
+        "rev": "570cc17bbc25650eb7d69e4fcda8cfd2f1656922",
         "type": "github"
       },
       "original": {
@@ -555,6 +576,7 @@
     },
     "root": {
       "inputs": {
+        "darwin": "darwin",
         "devenv": "devenv",
         "disko": "disko",
         "home-manager": "home-manager",
@@ -587,11 +609,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1737103437,
-        "narHash": "sha256-uPNWcYbhY2fjY3HOfRCR5jsfzdzemhfxLSxwjXYXqNc=",
+        "lastModified": 1737483750,
+        "narHash": "sha256-5An1wq5U8sNycOBBg3nsDDgpwBmR9liOpDGlhliA6Xo=",
         "owner": "numtide",
         "repo": "treefmt-nix",
-        "rev": "d1ed3b385f8130e392870cfb1dbfaff8a63a1899",
+        "rev": "f2cc121df15418d028a59c9737d38e3a90fbaf8f",
         "type": "github"
       },
       "original": {

+ 47 - 43
flake.nix

@@ -1,11 +1,14 @@
 {
-  description = "my home manager configuration";
-  
+  description = "my nix 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";
 
+    darwin.url = "github:lnl7/nix-darwin/nix-darwin-24.11";
+    darwin.inputs.nixpkgs.follows = "nixpkgs-darwin";
+
     devenv.url = "github:cachix/devenv";
     devenv.inputs.nixpkgs.follows = "nixpkgs-unstable";
 
@@ -19,56 +22,57 @@
     nixvim.inputs.nixpkgs.follows = "nixpkgs";
   };
 
-  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
+  outputs =
     {
+      self,
+
+      nixpkgs,
+      nixpkgs-darwin,
+      nixpkgs-unstable,
+
+      devenv,
+      disko,
+      home-manager,
+      nixvim,
+      ...
+    }@inputs:
+    rec {
+
+      lib = import ./lib {
+        inherit inputs;
+        inherit (self) outputs;
+      };
 
+      homeConfigurations = {
+        "thomas@meili" = lib.mkHome {
+          system = "aarch64-darwin";
+          modules = [ ./home/meili.nix ];
+        };
 
-      modules = {
-        home-manager = import ./modules/home-manager;
-        global = import ./modules/global;
+        "thomas@modgud" = lib.mkHome {
+          system = "x86_64-linux";
+          modules = [ ./home/modgud.nix ];
+        };
       };
 
       nixosConfigurations = {
-        modgud = nixpkgs.lib.nixosSystem {
-          specialArgs = { inherit inputs; inherit outputs; };
+        modgud = lib.mkSystem {
+          system = "x86_64-linux";
           modules = [ ./hosts/modgud ];
         };
       };
 
-      packages = forAllSystems (system:
-        let
-          pkgs = if builtins.elem "darwin" (builtins.split "\\." system) then
-              nixpkgs-darwin.legacyPackages.${system}
-            else
-              nixpkgs.legacyPackages.${system};
-        in {
-          homeConfigurations = {
-            "thomas@meili" = home-manager.lib.homeManagerConfiguration {
-              inherit pkgs;
-              extraSpecialArgs = { inherit inputs; inherit outputs; };
-              modules = [
-                ./users/thomas
-                ./users/thomas/desktop
-                ./users/thomas/nvim
-              ];
-            };
-
-            "thomas@modgud" = home-manager.lib.homeManagerConfiguration {
-              inherit pkgs;
-              extraSpecialArgs = { inherit inputs; inherit outputs; };
-              modules = [
-                ./users/thomas
-                ./users/thomas/modgud
-              ];
-            };
-          };
-        } // import ./packages { inherit pkgs; }
-      );
+      darwinConfigurations = {
+        meili = lib.mkDarwin {
+          system = "aarch64-darwin";
+          modules = [ ./hosts/meili ];
+        };
+      };
+
+      modules = import ./modules;
+      overlays = import ./overlays { inherit inputs; };
+
+      packages = lib.forAllSystemsWithPkgs (import ./packages);
+      formatter = lib.forAllSystems (system: nixpkgs.legacyPackages.${system}.nixfmt-rfc-style);
     };
 }

+ 0 - 0
users/thomas/cli/bash.nix → home/features/cli/bash.nix


+ 3 - 1
users/thomas/cli/bat.nix → home/features/cli/bat.nix

@@ -2,7 +2,9 @@
 {
   programs.bat = {
     enable = true;
-    config = { theme = "kanagawa"; };
+    config = {
+      theme = "kanagawa";
+    };
     themes = {
       nord = {
         src = pkgs.fetchFromGitHub {

+ 0 - 0
users/thomas/cli/default.nix → home/features/cli/default.nix


+ 0 - 0
users/thomas/cli/direnv.nix → home/features/cli/direnv.nix


+ 5 - 2
users/thomas/cli/fish.nix → home/features/cli/fish.nix

@@ -5,12 +5,15 @@
     shellAliases = import ./shell-aliases.nix;
 
     interactiveShellInit = lib.mkAfter ''
-      ${lib.strings.fileContents (pkgs.fetchFromGitHub {
+      ${lib.strings.fileContents (
+        pkgs.fetchFromGitHub {
           owner = "rebelot";
           repo = "kanagawa.nvim";
           rev = "de7fb5f5de25ab45ec6039e33c80aeecc891dd92";
           sha256 = "sha256-f/CUR0vhMJ1sZgztmVTPvmsAgp0kjFov843Mabdzvqo=";
-        } + "/extras/kanagawa.fish")}
+        }
+        + "/extras/kanagawa.fish"
+      )}
     '';
   };
 }

+ 0 - 0
users/thomas/cli/fzf.nix → home/features/cli/fzf.nix


+ 6 - 2
users/thomas/cli/git.nix → home/features/cli/git.nix

@@ -1,6 +1,9 @@
 { pkgs, ... }:
 {
-  home.packages = [ pkgs.git pkgs.git-crypt ];
+  home.packages = [
+    pkgs.git
+    pkgs.git-crypt
+  ];
 
   programs.git = {
     enable = true;
@@ -136,10 +139,11 @@
   };
 }
 
-
 # [filter "lfs"]
 # 	clean = git-lfs clean -- %f
 # 	smudge = git-lfs smudge -- %f
 # 	process = git-lfs filter-process
 # 	required = true
 
+# TODO: Proton Drive
+# ln -s ~/Library/CloudStorage/[email protected]/Photos ~/Photos

+ 0 - 0
users/thomas/cli/github.nix → home/features/cli/github.nix


+ 15 - 8
users/thomas/cli/gnupg.nix → home/features/cli/gnupg.nix

@@ -1,4 +1,9 @@
-{ config, lib, pkgs, ... }:
+{
+  config,
+  lib,
+  pkgs,
+  ...
+}:
 let
   configHome = "${config.xdg.configHome}/gnupg";
 in
@@ -11,13 +16,15 @@ in
     enable = true;
     homedir = configHome;
 
-    publicKeys = [{
-      source = pkgs.fetchurl {
-        url = "https://keys.openpgp.org/vks/v1/by-fingerprint/7A53D4C6B481F7711588D34FDE749C31D060A160";
-        sha256 = "c4I7c+mZVOJpm54aOhIJQtAXAhBQZPnyp4LHEzuH09w=";
-      };
-      trust = 5;
-    }];
+    publicKeys = [
+      {
+        source = pkgs.fetchurl {
+          url = "https://keys.openpgp.org/vks/v1/by-fingerprint/7A53D4C6B481F7711588D34FDE749C31D060A160";
+          sha256 = "c4I7c+mZVOJpm54aOhIJQtAXAhBQZPnyp4LHEzuH09w=";
+        };
+        trust = 5;
+      }
+    ];
   };
 
   services.gpg-agent = {

+ 0 - 0
users/thomas/cli/nushell.nix → home/features/cli/nushell.nix


+ 0 - 0
users/thomas/cli/shell-aliases.nix → home/features/cli/shell-aliases.nix


+ 0 - 0
users/thomas/cli/ssh.nix → home/features/cli/ssh.nix


+ 0 - 0
users/thomas/cli/starship.nix → home/features/cli/starship.nix


+ 0 - 0
users/thomas/cli/yazi.nix → home/features/cli/yazi.nix


+ 0 - 0
users/thomas/cli/zoxide.nix → home/features/cli/zoxide.nix


+ 0 - 0
users/thomas/cli/zsh.nix → home/features/cli/zsh.nix


+ 36 - 0
home/features/core.nix

@@ -0,0 +1,36 @@
+{
+  pkgs,
+  outputs,
+  lib,
+  ...
+}:
+{
+  imports = [
+    # INFO: this is shared between home-manager, nixos, and darwin
+    outputs.modules.global.nix-config
+  ];
+
+  xdg.enable = true;
+
+  home = {
+    username = "thomas";
+    homeDirectory = if pkgs.stdenv.isDarwin then "/Users/thomas" else "/home/thomas";
+
+    packages = with pkgs; [
+      curl
+      fd
+      ripgrep
+      wget
+    ];
+
+    sessionVariables = {
+      EDITOR = "nvim";
+      PAGER = "less";
+      VISUAL = "nvim";
+    };
+
+    stateVersion = lib.mkDefault "24.11";
+  };
+
+  manual.manpages.enable = lib.mkDefault false;
+}

+ 6 - 1
users/thomas/desktop/alacritty.nix → home/features/desktop/alacritty.nix

@@ -84,7 +84,12 @@
       };
 
       keyboard.bindings = [
-       { key = "Space"; mods = "Shift"; mode = "~Search"; action = "ToggleViMode"; }
+        {
+          key = "Space";
+          mods = "Shift";
+          mode = "~Search";
+          action = "ToggleViMode";
+        }
 
         # TODO: figure out why I set these
         # { key = "Up"; mods = "Alt"; chars = "\x1b[1;5A"; }

+ 0 - 0
users/thomas/desktop/default.nix → home/features/desktop/default.nix


+ 0 - 0
users/thomas/desktop/fonts.nix → home/features/desktop/fonts.nix


+ 11 - 6
users/thomas/desktop/ghostty.nix → home/features/desktop/ghostty.nix

@@ -1,7 +1,12 @@
-{ pkgs, config, outputs, ... }:
+{
+  pkgs,
+  config,
+  outputs,
+  ...
+}:
 {
   imports = [
-    outputs.modules.home-manager.ghostty
+    outputs.modules.home-manager.ghostty-darwin
   ];
 
   programs.ghostty-darwin = {
@@ -81,10 +86,10 @@
 
         "ctrl+a>z=toggle_split_zoom"
 
-        "opt+j=resize_split:down,10"
-        "opt+k=resize_split:up,10"
-        "opt+h=resize_split:left,10"
-        "opt+l=resize_split:right,10"
+        "ctrl+shift+j=resize_split:down,10"
+        "ctrl+shift+k=resize_split:up,10"
+        "ctrl+shift+h=resize_split:left,10"
+        "ctrl+shift+l=resize_split:right,10"
       ];
     };
   };

+ 0 - 0
users/thomas/desktop/syncthing.nix → home/features/desktop/syncthing.nix


+ 0 - 1
users/thomas/desktop/yubikey.nix → home/features/desktop/yubikey.nix

@@ -35,4 +35,3 @@ in
     ];
   };
 }
-

+ 0 - 0
users/thomas/nvim/colorschemes.nix → home/features/nvim/colorschemes.nix


+ 2 - 2
users/thomas/nvim/default.nix → home/features/nvim/default.nix

@@ -1,11 +1,11 @@
 { inputs, lib, ... }:
 let
   # Define `recursiveUpdateMany` if not present
-  recursiveUpdateMany = sets: lib.fold lib.attrsets.recursiveUpdate {} sets;
+  recursiveUpdateMany = sets: lib.fold lib.attrsets.recursiveUpdate { } sets;
 
   # Merge all plugin configurations directly from imports
   nixvim = recursiveUpdateMany [
-    ({ 
+    ({
       enable = true;
       defaultEditor = true;
       vimdiffAlias = true;

+ 76 - 0
home/features/nvim/keymaps.nix

@@ -0,0 +1,76 @@
+{
+  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";
+    }
+  ];
+}

+ 164 - 0
home/features/nvim/lsp.nix

@@ -0,0 +1,164 @@
+{
+  autoCmd = [
+    {
+      event = "LspAttach";
+      desc = "Keymaps for when LSP is attached";
+      group = "kickstart-lsp-attach";
+      callback.__raw = ''
+        function(event)
+          local map = function(keys, func, desc)
+            vim.keymap.set('n', keys, func, { buffer = event.buf, desc = 'LSP: ' .. desc })
+          end
+
+          -- Jump to the definition of the word under your cursor.
+          --  This is where a variable was first declared, or where a function is defined, etc.
+          --  To jump back, press <C-t>.
+          map('gd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition')
+
+          -- Find references for the word under your cursor.
+          map('gr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences')
+
+          -- Jump to the implementation of the word under your cursor.
+          --  Useful when your language has ways of declaring types without an actual implementation.
+          map('gI', require('telescope.builtin').lsp_implementations, '[G]oto [I]mplementation')
+
+          -- Jump to the type of the word under your cursor.
+          --  Useful when you're not sure what type a variable is and you want to see
+          --  the definition of its *type*, not where it was *defined*.
+          map('<leader>D', require('telescope.builtin').lsp_type_definitions, 'Type [D]efinition')
+
+          -- Fuzzy find all the symbols in your current document.
+          --  Symbols are things like variables, functions, types, etc.
+          map('<leader>ds', require('telescope.builtin').lsp_document_symbols, '[D]ocument [S]ymbols')
+
+          -- Fuzzy find all the symbols in your current workspace.
+          --  Similar to document symbols, except searches over your entire project.
+          map('<leader>ws', require('telescope.builtin').lsp_dynamic_workspace_symbols, '[W]orkspace [S]ymbols')
+
+          -- Rename the variable under your cursor.
+          --  Most Language Servers support renaming across files, etc.
+          map('<leader>rn', vim.lsp.buf.rename, '[R]e[n]ame')
+
+          -- Execute a code action, usually your cursor needs to be on top of an error
+          -- or a suggestion from your LSP for this to activate.
+          map('<leader>ca', vim.lsp.buf.code_action, '[C]ode [A]ction')
+
+          -- WARN: This is not Goto Definition, this is Goto Declaration.
+          --  For example, in C this would take you to the header.
+          map('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration')
+
+          -- The following two autocommands are used to highlight references of the
+          -- word under your cursor when your cursor rests there for a little while.
+          --    See `:help CursorHold` for information about when this is executed
+          --
+          -- When you move your cursor, the highlights will be cleared (the second autocommand).
+          local client = vim.lsp.get_client_by_id(event.data.client_id)
+          if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_documentHighlight) then
+            local highlight_augroup = vim.api.nvim_create_augroup('kickstart-lsp-highlight', { clear = false })
+            vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, {
+              buffer = event.buf,
+              group = highlight_augroup,
+              callback = vim.lsp.buf.document_highlight,
+            })
+
+            vim.api.nvim_create_autocmd({ 'CursorMoved', 'CursorMovedI' }, {
+              buffer = event.buf,
+              group = highlight_augroup,
+              callback = vim.lsp.buf.clear_references,
+            })
+
+            vim.api.nvim_create_autocmd('LspDetach', {
+              group = vim.api.nvim_create_augroup('kickstart-lsp-detach', { clear = true }),
+              callback = function(event2)
+                vim.lsp.buf.clear_references()
+                vim.api.nvim_clear_autocmds { group = 'kickstart-lsp-highlight', buffer = event2.buf }
+              end,
+            })
+          end
+
+          -- The following code creates a keymap to toggle inlay hints in your
+          -- code, if the language server you are using supports them
+          --
+          -- This may be unwanted, since they displace some of your code
+          if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_inlayHint) then
+            map('<leader>th', function()
+              vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled { bufnr = event.buf })
+            end, '[T]oggle Inlay [H]ints')
+          end
+        end
+      '';
+    }
+  ];
+
+  autoGroups = {
+    "kickstart-lsp-attach".clear = true;
+  };
+
+  keymaps = [
+    {
+      key = "<C-h>";
+      action.__raw = "vim.lsp.buf.signature_help";
+      mode = "i";
+    }
+  ];
+
+  plugins.lsp = {
+    enable = true;
+
+    keymaps = {
+      diagnostic = {
+        "<leader>vd" = "open_float";
+        "[d" = "goto_next";
+        "]d" = "goto_prev";
+      };
+
+      lspBuf = {
+        "<leader>f" = "format";
+        "gd" = "definition";
+        "K" = "hover";
+        "<leader>vws" = "workspace_symbol";
+        "<leader>vca" = "code_action";
+        "<leader>vrr" = "references";
+        "<leader>vrn" = "rename";
+      };
+    };
+
+    servers = {
+      astro.enable = true;
+      bashls.enable = true;
+
+      denols = {
+        enable = true;
+        rootDir = "require('lspconfig').util.root_pattern('deno.json')";
+        extraOptions.init_options = {
+          lint = true;
+          unstable = true;
+        };
+      };
+
+      gopls.enable = true;
+
+      # elixirls.enable = true;
+      nextls.enable = true;
+      nil_ls.enable = true;
+      tailwindcss.enable = true;
+
+      ts_ls = {
+        enable = true;
+        extraOptions.single_file_support = false;
+        rootDir = ''
+          require('lspconfig').util.root_pattern("tsconfig.json")
+        '';
+      };
+
+      volar.enable = true;
+      #   rootDir = ''
+      #     # root_pattern = { 'vite.config.ts', 'nuxt.config.ts' },
+      #
+      #
+      #     require('lspconfig').util.root_pattern("vite.config.mts")
+      #     '';
+      # };
+    };
+  };
+}

+ 5 - 2
users/thomas/nvim/options.nix → home/features/nvim/options.nix

@@ -30,7 +30,11 @@
     splitbelow = true;
     # Sets how neovim will display certain whitespace characters in the editor.
     list = true;
-    listchars = { tab = "» "; trail = "·"; nbsp = "␣"; };
+    listchars = {
+      tab = "» ";
+      trail = "·";
+      nbsp = "␣";
+    };
     # Preview substitutions live, as you type!
     inccommand = "split";
     # Show which line your cursor is on
@@ -74,4 +78,3 @@
     "kickstart-highlight-yank".clear = true;
   };
 }
-

+ 1 - 0
users/thomas/nvim/plugins.nix → home/features/nvim/plugins.nix

@@ -11,6 +11,7 @@
     ./plugins/mdx.nix
     ./plugins/mini.nix
     ./plugins/oil.nix
+    # ./plugins/snacks.nix
     ./plugins/telescope.nix
     ./plugins/tmux.nix
     ./plugins/todo-comments.nix

+ 0 - 0
users/thomas/nvim/plugins/avante.nix → home/features/nvim/plugins/avante.nix


+ 0 - 0
users/thomas/nvim/plugins/cmp.nix → home/features/nvim/plugins/cmp.nix


+ 0 - 0
users/thomas/nvim/plugins/comment.nix → home/features/nvim/plugins/comment.nix


+ 20 - 2
users/thomas/nvim/plugins/conform.nix → home/features/nvim/plugins/conform.nix

@@ -15,8 +15,26 @@
     enable = true;
     settings.formatters_by_ft = {
       lua = [ "lua_ls" ];
-      javascript = [ [ "prettierd" "prettier" ] [ "eslint_d" "eslint" ] ];
-      typescript = [ [ "prettierd" "prettier" ] [ "eslint_d" "eslint" ] ];
+      javascript = [
+        [
+          "prettierd"
+          "prettier"
+        ]
+        [
+          "eslint_d"
+          "eslint"
+        ]
+      ];
+      typescript = [
+        [
+          "prettierd"
+          "prettier"
+        ]
+        [
+          "eslint_d"
+          "eslint"
+        ]
+      ];
     };
     settings.notify_on_error = false;
   };

+ 0 - 0
users/thomas/nvim/plugins/elixir-tools.nix → home/features/nvim/plugins/elixir-tools.nix


+ 0 - 0
users/thomas/nvim/plugins/fidget.nix → home/features/nvim/plugins/fidget.nix


+ 22 - 0
home/features/nvim/plugins/gitsigns.nix

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

+ 0 - 0
users/thomas/nvim/plugins/indent-blankline.nix → home/features/nvim/plugins/indent-blankline.nix


+ 13 - 0
home/features/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,
+# })

+ 0 - 0
users/thomas/nvim/plugins/mdx.nix → home/features/nvim/plugins/mdx.nix


+ 1 - 1
users/thomas/nvim/plugins/mini.nix → home/features/nvim/plugins/mini.nix

@@ -3,7 +3,7 @@
   plugins.mini.enable = true;
   plugins.mini.modules = {
     ai.n_lines = 500;
-    surround = {};
+    surround = { };
     statusline.section_location.__raw = ''
       function()
         return '%2l:%-2v'

+ 5 - 1
users/thomas/nvim/plugins/oil.nix → home/features/nvim/plugins/oil.nix

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

+ 0 - 0
users/thomas/nvim/plugins/sleuth.nix → home/features/nvim/plugins/sleuth.nix


+ 58 - 0
home/features/nvim/plugins/snacks.nix

@@ -0,0 +1,58 @@
+{
+  plugins.snacks = {
+    enable = true;
+    autoLoad = true;
+    settings = {
+      bigfile = {
+        enabled = true;
+      };
+      dashboard = {
+        width = 60;
+        row = null;
+        col = null;
+        pane_gap = 4;
+        autokeys = "1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
+
+        sections = [
+          { section = "header"; }
+          {
+            section = "keys";
+            gap = 1;
+          }
+          {
+            icon = " ";
+            title = "Recent Files";
+            section = "recent_files";
+            indent = 2;
+            padding = [
+              2
+              2
+            ];
+          }
+          {
+            icon = " ";
+            title = "Projects";
+            section = "projects";
+            indent = 2;
+            padding = 2;
+          }
+          { section = "startup"; }
+        ];
+      };
+      notifier = {
+        enabled = true;
+        timeout = 3000;
+      };
+      quickfile = {
+        enabled = true;
+      };
+      statuscolumn = {
+        enabled = true;
+      };
+      words = {
+        debounce = 100;
+        enabled = true;
+      };
+    };
+  };
+}

+ 112 - 0
home/features/nvim/plugins/telescope.nix

@@ -0,0 +1,112 @@
+{
+  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";
+    }
+  ];
+}

+ 0 - 0
users/thomas/nvim/plugins/tmux.nix → home/features/nvim/plugins/tmux.nix


+ 0 - 0
users/thomas/nvim/plugins/todo-comments.nix → home/features/nvim/plugins/todo-comments.nix


+ 1 - 2
users/thomas/nvim/plugins/treesitter.nix → home/features/nvim/plugins/treesitter.nix

@@ -1,8 +1,7 @@
 { pkgs, ... }:
 {
   plugins.treesitter = {
-    grammarPackages =
-      pkgs.vimPlugins.nvim-treesitter.passthru.allGrammars;
+    grammarPackages = pkgs.vimPlugins.nvim-treesitter.passthru.allGrammars;
 
     enable = true;
     settings.ensure_installed = "all";

+ 0 - 0
users/thomas/nvim/plugins/web-devicons.nix → home/features/nvim/plugins/web-devicons.nix


+ 4 - 1
users/thomas/nvim/plugins/which-key.nix → home/features/nvim/plugins/which-key.nix

@@ -35,7 +35,10 @@
       __unkeyed-1 = "<leader>h";
       group = "Git [H]unk";
       icon = "󰄄 ";
-      mode = [ "n" "v" ];
+      mode = [
+        "n"
+        "v"
+      ];
     }
   ];
   # { '<leader>c', group = '[C]ode' },

+ 5 - 1
users/thomas/nvim/plugins/zenmode.nix → home/features/nvim/plugins/zenmode.nix

@@ -1,6 +1,10 @@
 {
   keymaps = [
-    { key = "<leader>z"; action = "<cmd>ZenMode<CR>"; options.desc = "[Z]en Mode"; }
+    {
+      key = "<leader>z";
+      action = "<cmd>ZenMode<CR>";
+      options.desc = "[Z]en Mode";
+    }
   ];
 
   plugins.zen-mode = {

+ 13 - 0
home/meili.nix

@@ -0,0 +1,13 @@
+{
+  imports = [
+    ./features/core.nix
+
+    ./features/cli
+    ./features/desktop
+    ./features/nvim
+  ];
+
+  programs.fish.interactiveShellInit = ''
+    eval "$(/opt/homebrew/bin/brew shellenv)"
+  '';
+}

+ 8 - 0
home/modgud.nix

@@ -0,0 +1,8 @@
+{
+  imports = [
+    ./features/core.nix
+
+    ./features/cli
+    # ./features/nvim/minimal.nix
+  ];
+}

+ 5 - 2
hosts/common/home-manager.nix

@@ -7,11 +7,14 @@ let
       inputs.home-manager.nixosModules.home-manager;
 in
 {
-  imports = [ home-manager-module ];  
+  imports = [ home-manager-module ];
   home-manager = {
     # INFO: since we also use home-manager standalone, we don't want to mix up packages.
     # useGlobalPkgs = true;
     # useUserPackages = true;
-    extraSpecialArgs = { inherit inputs; inherit outputs; };
+    extraSpecialArgs = {
+      inherit inputs;
+      inherit outputs;
+    };
   };
 }

+ 22 - 11
hosts/common/nix.nix

@@ -1,4 +1,10 @@
-{ lib, pkgs, config, outputs, ... }:
+{
+  lib,
+  pkgs,
+  config,
+  outputs,
+  ...
+}:
 {
   nix = {
     settings = {
@@ -14,18 +20,24 @@
         "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
       ];
 
-      trusted-users = [ "root" "@wheel" "@admin" ];
+      trusted-users = [
+        "root"
+        "@wheel"
+        "@admin"
+      ];
     };
 
     optimise.automatic = lib.mkDefault true;
 
-    extraOptions = ''
-      warn-dirty = false
-      experimental-features = nix-command flakes impure-derivations
-      auto-optimise-store = true
-    '' + lib.optionalString (pkgs.system == "aarch64-darwin") ''
-      extra-platforms = x86_64-darwin aarch64-darwin x86_64-linux aarch64-linux
-    '';
+    extraOptions =
+      ''
+        warn-dirty = false
+        experimental-features = nix-command flakes impure-derivations
+        auto-optimise-store = true
+      ''
+      + lib.optionalString (pkgs.system == "aarch64-darwin") ''
+        extra-platforms = x86_64-darwin aarch64-darwin x86_64-linux aarch64-linux
+      '';
 
     gc = {
       automatic = true;
@@ -34,8 +46,7 @@
 
     # Map registries to channels
     # Very useful when using legacy commands
-    nixPath = lib.mapAttrsToList (key: value: "${key}=${value.to.path}")
-      config.nix.registry;
+    nixPath = lib.mapAttrsToList (key: value: "${key}=${value.to.path}") config.nix.registry;
   };
 
   nixpkgs = {

+ 23 - 0
hosts/meili/README.md

@@ -0,0 +1,23 @@
+# Meili (Mɛile)
+
+> In Norse mythology, Meili (Old Norse: [ˈmɛile], 'the lovely one'[1]) is a god, son of the god Odin and Jörð, and brother of the god Thor. Meili is attested in the Poetic Edda, compiled in the 13th century from earlier traditional sources, and the Prose Edda, written in the 13th century by Snorri Sturluson. Other than Meili's relation to Odin and Thor, no additional information is provided about the deity in either source.
+
+## Installation
+
+```bash
+nix run github:lnl7/nix-darwin -- switch --flake .#meili
+nix run github:nix-community/home-manager -- switch --flake .#thomas@meili
+```
+
+## Services and Applications
+
+### Zen Browser
+### Obsidian
+### Raycast
+### Ghostty
+### Open Audible
+### Signal (Molly)
+### ProtonVPN
+### VLC
+### Yubi Authenticator
+### AeroSpace

+ 102 - 0
hosts/meili/aerospace.nix

@@ -0,0 +1,102 @@
+{
+  services.aerospace = {
+    enable = true;
+    settings = {
+      gaps = {
+        inner.horizontal = 10;
+        inner.vertical = 10;
+        outer.left = 10;
+        outer.bottom = 10;
+        outer.top = 10;
+        outer.right = 10;
+      };
+
+      mode.main.binding = {
+        alt-1 = "workspace 1";
+        alt-2 = "workspace 2";
+        alt-3 = "workspace 3";
+        alt-4 = "workspace 4";
+        alt-5 = "workspace 5";
+        alt-b = "workspace B"; # Browser
+        alt-e = "workspace E"; # Finder
+        alt-t = "workspace T"; # Terminal
+        alt-m = "workspace M"; # Mail
+        alt-s = "workspace S"; # Signal
+        alt-v = "workspace V"; # Video
+
+        # moving windows to workspaces
+        alt-shift-1 = "move-node-to-workspace 1";
+        alt-shift-2 = "move-node-to-workspace 2";
+        alt-shift-3 = "move-node-to-workspace 3";
+        alt-shift-4 = "move-node-to-workspace 4";
+        alt-shift-5 = "move-node-to-workspace 5";
+        alt-shift-b = "move-node-to-workspace B";
+        alt-shift-e = "move-node-to-workspace E";
+        alt-shift-t = "move-node-to-workspace T";
+        alt-shift-m = "move-node-to-workspace M";
+        alt-shift-s = "move-node-to-workspace S";
+        alt-shift-v = "move-node-to-workspace V";
+
+        alt-shift-f = "fullscreen";
+
+        # focus between windows
+        alt-h = "focus left";
+        alt-l = "focus right";
+        alt-k = "focus up";
+        alt-j = "focus down";
+
+        # move between windows
+        alt-shift-h = "move left";
+        alt-shift-l = "move right";
+        alt-shift-k = "move up";
+        alt-shift-j = "move down";
+
+        alt-shift-minus = "resize smart -50";
+        alt-shift-equal = "resize smart +50";
+
+        alt-tab = "workspace-back-and-forth";
+        alt-shift-tab = "move-workspace-to-monitor --wrap-around next";
+
+        alt-shift-semicolon = "mode service";
+
+        alt-slash = "layout tiles horizontal vertical";
+        alt-comma = "layout accordion horizontal vertical";
+      };
+
+      mode.service.binding = {
+        esc = ["reload-config" "mode main"];
+        r = ["flatten-workspace-tree" "mode main"];
+        f = ["layout floating tiling" "mode main"];
+        backspace = ["close-all-windows-but-current" "mode main"];
+
+        alt-shift-h = ["join-with left" "mode main"];
+        alt-shift-j = ["join-with down" "mode main"];
+        alt-shift-k = ["join-with up" "mode main"];
+        alt-shift-l = ["join-with right" "mode main"];
+      };
+
+      on-window-detected = [
+        {
+          "if".app-id = "org.whispersystems.signal-desktop";
+          check-further-callbacks = false;
+          run = [ "move-node-to-workspace S" ];
+        }
+        {
+          "if".app-id = "com.apple.finder";
+          check-further-callbacks = false;
+          run = [ "move-node-to-workspace E" ];
+        }
+        {
+          "if".app-id = "com.apple.mail";
+          check-further-callbacks = false;
+          run = [ "move-node-to-workspace M" ];
+        }
+        {
+          "if".app-id = "com.mitchellh.ghostty";
+          check-further-callbacks = false;
+          run = [ "move-node-to-workspace T" ];
+        }
+      ];
+    };
+  };
+}

+ 0 - 0
modules/global/colima.nix → hosts/meili/colima.nix


+ 50 - 0
hosts/meili/default.nix

@@ -0,0 +1,50 @@
+{ outputs, ... }:
+{
+  imports = [
+    outputs.modules.global.nix-config
+
+    ./aerospace.nix
+    ./colima.nix
+
+    ./system.nix
+    ./software.nix
+  ] ++ (builtins.attrValues outputs.modules.darwin);
+
+  # NOTE: this seems to be needed to make nix work in fish
+  programs.fish = {
+    enable = true;
+    vendor = {
+      completions.enable = true;
+      config.enable = true;
+      functions.enable = true;
+    };
+  };
+
+  # TODO: move into module:
+  # system.activationScripts.extraActivation.text = lib.mkAfter ''
+  #   # disable spotlight
+  #   echo "disable spotlight..." >&2
+  #   mdutil -i off /
+  # '';
+
+  # TODO:
+  #   - Proton Mail Bridge
+  #   - Proton Drive set up home folders
+
+  programs = {
+    nix-index.enable = true;
+    gnupg.agent.enable = true;
+  };
+
+  services.nix-daemon.enable = true;
+
+  users.users.thomas.home = "/Users/thomas";
+
+  networking = {
+    hostName = "meili";
+    remote-login = true;
+  };
+
+  time.timeZone = "America/Los_Angeles";
+  system.stateVersion = 4;
+}

+ 69 - 0
hosts/meili/software.nix

@@ -0,0 +1,69 @@
+{ pkgs, outputs, ... }:
+{
+  # TODO:
+  #   - Proton Mail Bridge
+  #   - Proton Drive set up home folders
+
+  environment.systemPackages = with pkgs; [
+    git
+    gnupg
+    jq
+    ripgrep
+
+    unstable.devenv
+  ];
+
+  environment.shellInit = ''
+    eval "$(/opt/homebrew/bin/brew shellenv)"
+  '';
+
+  homebrew = {
+    casks = [
+      # "mac-mouse-fix"
+      # "alacritty" # => we're using the home-manager package now
+      # "bitwarden"
+      # "brave-browser"
+      # "docker"
+      # "deepl"
+      "ghostty"
+      # "hot"
+      # "ledger-live"
+      # "mullvadvpn"
+      "obsidian"
+      "openaudible"
+
+      "proton-drive"
+      "proton-mail-bridge"
+      "proton-pass"
+      "protonvpn"
+
+      "signal"
+      # "tailscale"
+      "tor-browser"
+      "vlc"
+      # "whatsapp"
+      # "krunkit"
+    ];
+
+    masApps = {
+      # "Bitwarden" = 1352778147;
+      "Yubico Authenticator" = 1497506650;
+      # "UTM Virtual Machines" = 1538878817; costs $9.99 in the app store
+      # "Speechify" = 1624912180;
+      # "DaVinci Resolve" = 571213070;
+      # "Orbot" = 1609461599;
+
+      # Safari Extensions
+      # "AdGuard for Safari" = 1440147259;
+      # "Bitwarden for Safari" = 1352778147;
+      # "SimpleLogin" = 1494051017;
+      # "Video Speed Controller" = 1588368612;
+      # "Vimari" = 1480933944;
+      # "XCode" = 497799835;
+    };
+
+    enable = true;
+    onActivation.autoUpdate = true;
+    onActivation.cleanup = "zap";
+  };
+}

+ 98 - 0
hosts/meili/system.nix

@@ -0,0 +1,98 @@
+{
+  system = {
+    keyboard = {
+      enableKeyMapping = true;
+      userKeyMapping = [
+        {
+          # map caps lock to skhd leader
+          HIDKeyboardModifierMappingSrc = 30064771129;
+          HIDKeyboardModifierMappingDst = 30064771298;
+        }
+      ];
+    };
+
+    defaults = {
+      SoftwareUpdate.AutomaticallyInstallMacOSUpdates = true;
+
+      dock = {
+        autohide = true;
+        expose-group-apps = true;
+        orientation = "bottom";
+        wvous-bl-corner = 10; # put display to sleep
+        wvous-br-corner = 14; # quick note
+        wvous-tl-corner = 1; # disabled
+        wvous-tr-corner = 1; # disabled
+      };
+
+      finder = {
+        AppleShowAllExtensions = true;
+        AppleShowAllFiles = true;
+        CreateDesktop = true;
+        _FXShowPosixPathInTitle = true;
+        FXEnableExtensionChangeWarning = false;
+        FXPreferredViewStyle = "clmv";
+        QuitMenuItem = true;
+        ShowPathbar = true;
+        ShowStatusBar = true;
+      };
+
+      loginwindow = {
+        DisableConsoleAccess = false;
+        GuestEnabled = false;
+        LoginwindowText = null;
+        PowerOffDisabledWhileLoggedIn = false;
+        RestartDisabled = false;
+        RestartDisabledWhileLoggedIn = false;
+        SHOWFULLNAME = true;
+        ShutDownDisabled = false;
+        ShutDownDisabledWhileLoggedIn = false;
+        SleepDisabled = false;
+        autoLoginUser = null;
+      };
+
+      NSGlobalDomain = {
+        AppleInterfaceStyle = "Dark";
+        AppleKeyboardUIMode = 3;
+        ApplePressAndHoldEnabled = false;
+        AppleShowAllExtensions = true;
+        AppleShowAllFiles = true;
+        KeyRepeat = 1;
+        InitialKeyRepeat = 12;
+        NSAutomaticCapitalizationEnabled = false;
+        NSDocumentSaveNewDocumentsToCloud = true;
+        NSNavPanelExpandedStateForSaveMode = true;
+        NSNavPanelExpandedStateForSaveMode2 = true;
+        NSWindowResizeTime = 0.001;
+        PMPrintingExpandedStateForPrint = true;
+        PMPrintingExpandedStateForPrint2 = true;
+        # WebKitDeveloperExtras = true;
+        _HIHideMenuBar = true;
+        "com.apple.swipescrolldirection" = true;
+        # "com.apple.BezelServices" = 5;
+      };
+
+      screencapture.location = "/tmp";
+
+      screensaver.askForPassword = true;
+
+      trackpad = {
+        ActuationStrength = 0;
+        Clicking = true;
+        Dragging = null;
+        FirstClickThreshold = 1;
+        SecondClickThreshold = 1;
+        TrackpadRightClick = null;
+        TrackpadThreeFingerDrag = true;
+      };
+
+      WindowManager.StageManagerHideWidgets = true;
+      WindowManager.StandardHideDesktopIcons = true;
+      WindowManager.StandardHideWidgets = true;
+    };
+
+    rosetta.enable = true;
+  };
+
+  security.pam.enableSudoTouchIdAuth = true;
+  security.pam.enablePamReattach = true;
+}

+ 6 - 1
hosts/modgud/hardware.nix

@@ -12,7 +12,12 @@
     efiInstallAsRemovable = true;
   };
 
-  boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_blk" ];
+  boot.initrd.availableKernelModules = [
+    "ata_piix"
+    "uhci_hcd"
+    "virtio_pci"
+    "virtio_blk"
+  ];
   boot.initrd.kernelModules = [ ];
   boot.kernelModules = [ "kvm-intel" ];
   boot.extraModulePackages = [ ];

+ 62 - 0
lib/default.nix

@@ -0,0 +1,62 @@
+{ inputs, outputs }:
+let
+  # Helper to determine if a system is Darwin
+  isDarwin = system: builtins.elem "darwin" (builtins.split "-" system);
+
+  # Helper to get the appropriate nixpkgs for a system
+  getPkgsForSystem =
+    system:
+    if isDarwin system then
+      inputs.nixpkgs-darwin.legacyPackages.${system}
+    else
+      inputs.nixpkgs.legacyPackages.${system};
+in
+rec {
+  mkSystem =
+    {
+      system,
+      nixpkgs ? inputs.nixpkgs,
+      modules ? [ ],
+    }:
+    inputs.nixpkgs.lib.nixosSystem {
+      inherit system modules nixpkgs;
+      specialArgs = { inherit inputs outputs; };
+    };
+
+  mkDarwin =
+    {
+      system,
+      modules ? [ ],
+    }:
+    inputs.darwin.lib.darwinSystem {
+      inherit system modules;
+      specialArgs = { inherit inputs outputs; };
+    };
+
+  mkHome =
+    {
+      system,
+      modules ? [ ],
+    }:
+    inputs.home-manager.lib.homeManagerConfiguration {
+      inherit modules;
+      pkgs = getPkgsForSystem system;
+      extraSpecialArgs = { inherit inputs outputs; };
+    };
+
+  forAllSystems = inputs.nixpkgs.lib.genAttrs [
+    "x86_64-linux"
+    "x86_64-darwin"
+    "aarch64-linux"
+    "aarch64-darwin"
+  ];
+
+  forAllSystemsWithPkgs =
+    f:
+    forAllSystems (
+      system:
+      f {
+        pkgs = getPkgsForSystem system;
+      }
+    );
+}

+ 6 - 0
modules/darwin/default.nix

@@ -0,0 +1,6 @@
+{
+  colima = import ./virtualization/colima.nix;
+  pam-reattach = import ./security/pam-reattach.nix;
+  remote-login = import ./networking/remote-login.nix;
+  rosetta = import ./system/rosetta.nix;
+}

+ 32 - 0
modules/darwin/networking/remote-login.nix

@@ -0,0 +1,32 @@
+{ config, lib, ... }:
+
+with lib;
+
+let
+
+  cfg = config.networking;
+
+  remoteLogin = optionalString (cfg.remote-login) ''
+    systemsetup -setremotelogin on
+  '';
+
+in
+
+{
+  options = {
+
+    networking.remote-login = mkEnableOption "remote login";
+
+  };
+
+  config = {
+
+    system.activationScripts.networking.text = mkIf cfg.remote-login (mkAfter ''
+      # enable remote login
+      echo "enabling remote login..." >&2
+
+      ${remoteLogin}
+    '');
+
+  };
+}

+ 76 - 0
modules/darwin/security/pam-reattach.nix

@@ -0,0 +1,76 @@
+{
+  config,
+  lib,
+  pkgs,
+  ...
+}:
+
+with lib;
+
+let
+  cfg = config.security.pam;
+
+  mkPamReattachScript =
+    isEnabled:
+    let
+      file = "/etc/pam.d/sudo";
+      option = "security.pam.reattach";
+      sed = "${pkgs.gnused}/bin/sed";
+    in
+    ''
+      ${
+        if isEnabled then
+          ''
+            # If enable and in file, remove and re-add in case the store path has
+            # changed
+            if grep '${option}' ${file} > /dev/null; then
+              ${sed} -i '/${option}/d' ${file}
+            fi
+
+            ${sed} -i '2i\
+            auth       optional       ${pkgs.pam-reattach}/lib/pam/pam_reattach.so ignore_ssh # nix-darwin: ${option}
+            ' ${file}
+          ''
+        else
+          ''
+            # Disable pam_reattach, if added by nix-darwin
+            if grep '${option}' ${file} > /dev/null; then
+              ${sed} -i '/${option}/d' ${file}
+            fi
+          ''
+      }
+    '';
+in
+
+{
+  options = {
+    security.pam.enablePamReattach = mkEnableOption "" // {
+      description = lib.mdDoc ''
+        Enable pam_reattach sudo authentication with Touch ID in tmux/screen.
+
+        When enabled, this option adds the following line to
+        {file}`/etc/pam.d/sudo`:
+
+        ```
+        auth       optional     pam_reattach.so ignore_ssh
+        ```
+
+        ::: {.note}
+        macOS resets this file when doing a system update. As such,
+        pam_reattach won't work after a system update
+        until the nix-darwin configuration is reapplied.
+        :::
+      '';
+    };
+  };
+
+  config = {
+    environment.systemPackages = mkIf cfg.enablePamReattach [ pkgs.pam-reattach ];
+
+    system.activationScripts.pam.text = ''
+      # PAM settings
+      echo >&2 "setting up pam..."
+      ${mkPamReattachScript cfg.enablePamReattach}
+    '';
+  };
+}

+ 25 - 0
modules/darwin/system/rosetta.nix

@@ -0,0 +1,25 @@
+{ config, lib, ... }:
+
+with lib;
+
+let
+  cfg = config.system.rosetta;
+in
+
+{
+  options = {
+    system.rosetta.enable = mkOption {
+      type = types.bool;
+      default = false;
+      description = "Whether to enable Rosetta.";
+    };
+  };
+
+  config = {
+    system.activationScripts.extraActivation.text = optionalString cfg.enable (mkAfter ''
+      # enable rosetta
+      echo "enable rosetta..." >&2
+      softwareupdate --install-rosetta --agree-to-license
+    '');
+  };
+}

+ 160 - 0
modules/darwin/virtualization/colima.nix

@@ -0,0 +1,160 @@
+{
+  config,
+  lib,
+  pkgs,
+  ...
+}:
+
+with lib;
+let
+  cfg = config.services.colima;
+  user = config.users.users."colima";
+  group = config.users.groups."_colima";
+in
+{
+  options.services.colima = {
+    enable = mkEnableOption "Container runtimes on macOS";
+
+    createDockerSocket = mkEnableOption ''
+      Create a symlink from Colima's socket to /var/run/docker.sock, and set
+      it's permissions so that users part of the _colima group can use it.
+    '';
+
+    package = mkOption {
+      type = types.package;
+      default = pkgs.colima;
+      defaultText = literalExpression "pkgs.colima";
+    };
+
+    logFile = mkOption {
+      type = types.path;
+      default = "/var/log/colima.log";
+      description = "Stdout and sterr of the colima process.";
+    };
+
+    groupMembers = mkOption {
+      type = types.listOf types.str;
+      default = [ ];
+      description = "List of users that should be added to the colima group.";
+    };
+
+    runtime = mkOption {
+      type = types.enum [
+        "docker"
+        "containerd"
+        "incus"
+      ];
+      default = "docker";
+      description = "The runtime to use with Colima.";
+    };
+
+    architectue = mkOption {
+      type = types.enum [
+        "x86_64"
+        "aarch64"
+        "host"
+      ];
+      default = "host";
+      description = "The architecture to use for the Colima virtual machine.";
+    };
+
+    extraFlags = mkOption {
+      type = types.listOf types.str;
+      default = [ ];
+      example = [ "--vz-rosetta" ];
+      description = "Extra commandline options to pass to the colima start command.";
+    };
+
+    vmType = mkOption {
+      type = types.enum [
+        "qemu"
+        "vz"
+      ];
+      default = "vz";
+      description = "Virtual machine type to use with Colima.";
+    };
+  };
+
+  config = mkIf cfg.enable {
+    launchd.daemons.colima-create-docker-socket-and-set-permissions = {
+      script = ''
+        until [ -S ${user.home}/.colima/default/docker.sock ]
+        do
+          sleep 5
+        done
+
+        chmod g+rw ${user.home}/.colima/default/docker.sock
+        ln -sf ${user.home}/.colima/default/docker.sock /var/run/docker.sock
+      '';
+
+      serviceConfig.RunAtLoad = cfg.createDockerSocket;
+      serviceConfig.EnvironmentVariables.PATH = "/usr/bin:/bin:/usr/sbin:/sbin";
+    };
+
+    launchd.daemons.colima = {
+      script = concatStringsSep " " (
+        [
+          "exec"
+          (getExe cfg.package)
+          "start"
+          "--foreground"
+          "--runtime ${cfg.runtime}"
+          "--arch ${cfg.architectue}"
+          "--vm-type ${cfg.vmType}"
+        ]
+        ++ cfg.extraFlags
+      );
+
+      serviceConfig.KeepAlive = true;
+      serviceConfig.RunAtLoad = true;
+      serviceConfig.StandardErrorPath = cfg.logFile;
+      serviceConfig.StandardOutPath = cfg.logFile;
+      serviceConfig.GroupName = group.name;
+      serviceConfig.UserName = user.name;
+      serviceConfig.WorkingDirectory = user.home;
+      serviceConfig.EnvironmentVariables = {
+        PATH = "${pkgs.colima}/bin:${pkgs.docker}/bin:/usr/bin:/bin:/usr/sbin:/sbin";
+        COLIMA_HOME = "${user.home}/.colima";
+      };
+    };
+
+    system.activationScripts.preActivation.text = ''
+      touch '${cfg.logFile}'
+      chown ${toString user.uid}:${toString user.gid} '${cfg.logFile}'
+    '';
+
+    users.knownGroups = [
+      "colima"
+      "_colima"
+    ];
+    users.knownUsers = [
+      "colima"
+      "_colima"
+    ];
+
+    users.users."colima" = {
+      uid = mkDefault 400;
+      gid = mkDefault group.gid;
+      home = mkDefault "/var/lib/colima";
+      # The username isn't allowed to have an underscore in its name, the VM
+      # will fail to start with the following error otherwise
+      #   > "[hostagent] identifier \"_colima\" must match ^[A-Za-z0-9]+(?:[._-](?:[A-Za-z0-9]+))*$: invalid argument" fields.level=fatal
+      name = "colima";
+      createHome = true;
+      shell = "/bin/bash";
+      description = "System user for Colima";
+    };
+
+    users.groups."_colima" = {
+      gid = mkDefault 32002;
+      name = "_colima";
+      description = "System group for Colima";
+    };
+
+    users.groups."_colima".members = cfg.groupMembers;
+  };
+
+  meta.maintainers = [
+    lib.maintainers.bryanhonof or "bryanhonof"
+  ];
+}

+ 6 - 0
modules/default.nix

@@ -0,0 +1,6 @@
+{
+  darwin = import ./darwin;
+  global = import ./global;
+  home-manager = import ./home-manager;
+  # nixos = import ./nixos;
+}

+ 0 - 10
modules/global/cachix.nix

@@ -1,10 +0,0 @@
-{
-  nix.settings.substituters = [
-    "https://cachix.cachix.org"
-  ];
-  nix.settings.trusted-public-keys = [
-    "cachix.cachix.org-1:eWNHQldwUO7G2VkjpnjDbWwy4KQ/HNxht7H4SSoMckM="
-  ];
-
-  services.cachix-agent.enable = true;
-}

+ 0 - 9
modules/global/default.nix

@@ -1,12 +1,3 @@
 {
-  cachix = import ./cachix.nix;
-  colima = import ./colima.nix;
-  devenv = import ./devenv.nix;
-  fish = import ./fish.nix;
-  fonts = import ./fonts.nix;
-  gnupg = import ./gnupg.nix;
-  locale = import ./locale.nix;
   nix-config = import ./nix-config.nix;
-  openssh = import ./openssh.nix;
-  users = import ./users;
 }

+ 0 - 6
modules/global/devenv.nix

@@ -1,6 +0,0 @@
-{ pkgs, ... }:
-{
-  environment.systemPackages = [
-    pkgs.unstable.devenv
-  ];
-}

+ 0 - 10
modules/global/fish.nix

@@ -1,10 +0,0 @@
-{
-  programs.fish = {
-    enable = true;
-    vendor = {
-      completions.enable = true;
-      config.enable = true;
-      functions.enable = true;
-    };
-  };
-}

+ 0 - 7
modules/global/fonts.nix

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

+ 0 - 5
modules/global/gnupg.nix

@@ -1,5 +0,0 @@
-{ pkgs, ... }:
-{
-  programs.gnupg.agent.enable = true;
-  environment.systemPackages = with pkgs; [ gnupg ];
-}

+ 0 - 13
modules/global/locale.nix

@@ -1,13 +0,0 @@
-{ lib, ... }:
-{
-  i18n = {
-    defaultLocale = lib.mkDefault "en_US.UTF-8";
-    extraLocaleSettings = {
-      LC_TIME = lib.mkDefault "en_US.UTF-8";
-    };
-    supportedLocales = lib.mkDefault [
-      "en_US.UTF-8/UTF-8"
-      "de_AT.UTF-8/UTF-8"
-    ];
-  };
-}

+ 36 - 25
modules/global/nix-config.nix

@@ -1,32 +1,45 @@
-{ lib, pkgs, config, ... }:
+{
+  lib,
+  pkgs,
+  config,
+  outputs,
+  ...
+}:
 {
   nix = {
     package = pkgs.nix;
 
     settings = {
       substituters = [
-        "https://cache.nixos.org/"
+        "https://cache.nixos.org"
+        "https://cachix.cachix.org"
         "https://devenv.cachix.org"
         "https://nix-community.cachix.org"
       ];
 
       trusted-public-keys = [
         "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
+        "cachix.cachix.org-1:eWNHQldwUO7G2VkjpnjDbWwy4KQ/HNxht7H4SSoMckM="
         "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw="
         "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
       ];
 
-      trusted-users = [ "root" "@wheel" "@admin" ];
+      trusted-users = [
+        "root"
+        "@wheel"
+        "@admin"
+      ];
     };
 
-
-    extraOptions = ''
-      warn-dirty = false
-      experimental-features = nix-command flakes impure-derivations
-      auto-optimise-store = true
-    '' + lib.optionalString (pkgs.system == "aarch64-darwin") ''
-      extra-platforms = x86_64-darwin aarch64-darwin x86_64-linux aarch64-linux
-    '';
+    extraOptions =
+      ''
+        warn-dirty = false
+        experimental-features = nix-command flakes impure-derivations
+        auto-optimise-store = true
+      ''
+      + lib.optionalString (pkgs.system == "aarch64-darwin") ''
+        extra-platforms = x86_64-darwin aarch64-darwin x86_64-linux aarch64-linux
+      '';
 
     gc = {
       automatic = true;
@@ -35,23 +48,21 @@
 
     # Map registries to channels
     # Very useful when using legacy commands
-    nixPath = lib.mapAttrsToList (key: value: "${key}=${value.to.path}")
-      config.nix.registry;
-
-  # TODO: Conditionally add the optimise attribute if it exists
-  # } // lib.mkIf (lib.hasAttr "nix.optimise.automatic" config) {
-  #   optimise = {
-  #     automatic = lib.mkDefault true;
-  #   };
+    nixPath = lib.mapAttrsToList (key: value: "${key}=${value.to.path}") config.nix.registry;
+
+    # TODO: Conditionally add the optimise attribute if it exists
+    # } // lib.mkIf (lib.hasAttr "nix.optimise.automatic" config) {
+    #   optimise = {
+    #     automatic = lib.mkDefault true;
+    #   };
   };
 
   nixpkgs = {
-    # TODO: re-enable overlays when we bring them back here
-    # overlays = [
-    #   outputs.overlays.additions
-    #   outputs.overlays.modifications
-    #   outputs.overlays.unstable-packages
-    # ];
+    overlays = [
+      outputs.overlays.additions
+      outputs.overlays.modifications
+      outputs.overlays.unstable-packages
+    ];
 
     config = {
       allowUnfree = true;

+ 0 - 22
modules/global/openssh.nix

@@ -1,22 +0,0 @@
-{
-  services.openssh = {
-    enable = true;
-    settings = {
-      PasswordAuthentication = false;
-      PermitRootLogin = "no";
-    };
-    extraConfig = ''
-      StreamLocalBindUnlink yes
-    '';
-  };
-
-  # programs.ssh.knownHostsFiles = [
-  #   ../../../keys/github.keys
-  #   ../../../keys/thor.keys
-  #   ../../../keys/penguin.keys
-  #   ../../../keys/vault.keys
-  # ];
-
-  # Passwordless sudo when SSH'ing with keys
-  security.pam.sshAgentAuth.enable = true;
-}

+ 0 - 3
modules/global/users/default.nix

@@ -1,3 +0,0 @@
-{
-  thomas = import ./thomas.nix;
-}

+ 0 - 17
modules/global/users/thomas.nix

@@ -1,17 +0,0 @@
-{ pkgs, lib, ... }:
-let
-  homeLocation = with pkgs.stdenv.hostPlatform;
-    if isDarwin then "/Users" else "/home";
-in
-{
-  imports = [
-    ../fish.nix
-  ];
-
-  environment.shells = [ pkgs.fish ];
-
-  users.users.thomas = {
-    home = lib.mkDefault "${homeLocation}/thomas";
-    shell = pkgs.fish;
-  };
-}

+ 1 - 1
modules/home-manager/default.nix

@@ -1,3 +1,3 @@
 {
-  ghostty = import ./programs/ghostty.nix;
+  ghostty-darwin = import ./programs/ghostty-darwin.nix;
 }

+ 79 - 72
modules/home-manager/programs/ghostty.nix → modules/home-manager/programs/ghostty-darwin.nix

@@ -1,4 +1,9 @@
-{ config, lib, pkgs, ... }:
+{
+  config,
+  lib,
+  pkgs,
+  ...
+}:
 let
   cfg = config.programs.ghostty-darwin;
 
@@ -7,7 +12,8 @@ let
     mkKeyValue = lib.generators.mkKeyValueDefault { } " = ";
   };
   keyValue = pkgs.formats.keyValue keyValueSettings;
-in {
+in
+{
   meta.maintainers = [ lib.maintainers.HeitorAugustoLN ];
 
   options.programs.ghostty-darwin = {
@@ -76,14 +82,11 @@ in {
       description = "Whether to clear default keybinds.";
     };
 
-    installVimSyntax =
-      lib.mkEnableOption "installation of Ghostty configuration syntax for Vim";
+    installVimSyntax = lib.mkEnableOption "installation of Ghostty configuration syntax for Vim";
 
-    installBatSyntax =
-      lib.mkEnableOption "installation of Ghostty configuration syntax for bat"
-      // {
-        default = true;
-      };
+    installBatSyntax = lib.mkEnableOption "installation of Ghostty configuration syntax for bat" // {
+      default = true;
+    };
 
     enableBashIntegration = lib.mkEnableOption ''
       bash shell integration.
@@ -110,68 +113,72 @@ in {
     '';
   };
 
-  config = lib.mkIf cfg.enable (lib.mkMerge [
-    {
-      programs.ghostty.settings = lib.mkIf cfg.clearDefaultKeybinds {
-        keybind = lib.mkBefore [ "clear" ];
-      };
-
-      # MacOS also supports XDG configuration directory, so we use it for both
-      # Linux and macOS to reduce complexity
-      xdg.configFile = lib.mkMerge [
-        {
-          "ghostty/config" = lib.mkIf (cfg.settings != { }) {
-            source = keyValue.generate "ghostty-config" cfg.settings;
-            onChange = "ghostty +validate-config";
-          };
-        }
-
-        (lib.mkIf (cfg.themes != { }) (lib.mapAttrs' (name: value: {
-          name = "ghostty/themes/${name}";
-          value.source = keyValue.generate "ghostty-${name}-theme" value;
-        }) cfg.themes))
-      ];
-    }
-
-    # (lib.mkIf cfg.installVimSyntax {
-    #   programs.vim.plugins = [ cfg.package.vim ];
-    # })
-
-    # (lib.mkIf cfg.installBatSyntax {
-    #   programs.bat = {
-    #     syntaxes.ghostty = {
-    #       src = cfg.package;
-    #       file = "share/bat/syntaxes/ghostty.sublime-syntax";
-    #     };
-    #     config.map-syntax =
-    #       [ "${config.xdg.configHome}/ghostty/config:Ghostty Config" ];
-    #   };
-    # })
-
-    (lib.mkIf cfg.enableBashIntegration {
-      # Make order 101 to be placed exactly after bash completions, as Ghostty
-      # documentation suggests sourcing the script as soon as possible
-      programs.bash.initExtra = lib.mkOrder 101 ''
-        if [[ -n "''${GHOSTTY_RESOURCES_DIR}" ]]; then
-          builtin source "''${GHOSTTY_RESOURCES_DIR}/shell-integration/bash/ghostty.bash"
-        fi
-      '';
-    })
-
-    (lib.mkIf cfg.enableFishIntegration {
-      programs.fish.shellInit = ''
-        if set -q GHOSTTY_RESOURCES_DIR
-          source "$GHOSTTY_RESOURCES_DIR/shell-integration/fish/vendor_conf.d/ghostty-shell-integration.fish"
-        end
-      '';
-    })
+  config = lib.mkIf cfg.enable (
+    lib.mkMerge [
+      {
+        programs.ghostty.settings = lib.mkIf cfg.clearDefaultKeybinds {
+          keybind = lib.mkBefore [ "clear" ];
+        };
 
-    (lib.mkIf cfg.enableZshIntegration {
-      programs.zsh.initExtra = ''
-        if [[ -n $GHOSTTY_RESOURCES_DIR ]]; then
-          source "$GHOSTTY_RESOURCES_DIR"/shell-integration/zsh/ghostty-integration
-        fi
-      '';
-    })
-  ]);
+        # MacOS also supports XDG configuration directory, so we use it for both
+        # Linux and macOS to reduce complexity
+        xdg.configFile = lib.mkMerge [
+          {
+            "ghostty/config" = lib.mkIf (cfg.settings != { }) {
+              source = keyValue.generate "ghostty-config" cfg.settings;
+              onChange = "ghostty +validate-config";
+            };
+          }
+
+          (lib.mkIf (cfg.themes != { }) (
+            lib.mapAttrs' (name: value: {
+              name = "ghostty/themes/${name}";
+              value.source = keyValue.generate "ghostty-${name}-theme" value;
+            }) cfg.themes
+          ))
+        ];
+      }
+
+      # (lib.mkIf cfg.installVimSyntax {
+      #   programs.vim.plugins = [ cfg.package.vim ];
+      # })
+
+      # (lib.mkIf cfg.installBatSyntax {
+      #   programs.bat = {
+      #     syntaxes.ghostty = {
+      #       src = cfg.package;
+      #       file = "share/bat/syntaxes/ghostty.sublime-syntax";
+      #     };
+      #     config.map-syntax =
+      #       [ "${config.xdg.configHome}/ghostty/config:Ghostty Config" ];
+      #   };
+      # })
+
+      (lib.mkIf cfg.enableBashIntegration {
+        # Make order 101 to be placed exactly after bash completions, as Ghostty
+        # documentation suggests sourcing the script as soon as possible
+        programs.bash.initExtra = lib.mkOrder 101 ''
+          if [[ -n "''${GHOSTTY_RESOURCES_DIR}" ]]; then
+            builtin source "''${GHOSTTY_RESOURCES_DIR}/shell-integration/bash/ghostty.bash"
+          fi
+        '';
+      })
+
+      (lib.mkIf cfg.enableFishIntegration {
+        programs.fish.shellInit = ''
+          if set -q GHOSTTY_RESOURCES_DIR
+            source "$GHOSTTY_RESOURCES_DIR/shell-integration/fish/vendor_conf.d/ghostty-shell-integration.fish"
+          end
+        '';
+      })
+
+      (lib.mkIf cfg.enableZshIntegration {
+        programs.zsh.initExtra = ''
+          if [[ -n $GHOSTTY_RESOURCES_DIR ]]; then
+            source "$GHOSTTY_RESOURCES_DIR"/shell-integration/zsh/ghostty-integration
+          fi
+        '';
+      })
+    ]
+  );
 }

+ 3 - 0
modules/nixos/default.nix

@@ -0,0 +1,3 @@
+{
+  users = import ./users;
+}

+ 33 - 0
overlays/default.nix

@@ -0,0 +1,33 @@
+{ inputs, ... }:
+rec {
+  # This one brings our custom packages from the 'pkgs' directory
+  additions = final: _prev: import ../packages { pkgs = final; };
+
+  # This one contains whatever you want to overlay
+  # You can change versions, add patches, set compilation flags, anything really.
+  # https://nixos.wiki/wiki/Overlays
+  modifications = final: prev: {
+    # example = prev.example.overrideAttrs (oldAttrs: rec {
+    # ...
+    # });
+
+    makeModulesClosure = x: prev.makeModulesClosure (x // { allowMissing = true; });
+
+    kraft = prev.kraft.overrideAttrs (
+      old: inputs.nixpkgs.lib.recursiveUpdate old { meta.broken = false; }
+    );
+  };
+
+  # When applied, the unstable nixpkgs set (declared in the flake inputs) will
+  # be accessible through 'pkgs.unstable'
+  unstable-packages = final: _prev: {
+    unstable = import inputs.nixpkgs-unstable {
+      system = final.system;
+      overlays = [
+        additions
+        modifications
+      ];
+      # config.allowUnfree = true;
+    };
+  };
+}

+ 5 - 1
packages/default.nix

@@ -1,4 +1,8 @@
-{ pkgs ? (import <nixpkgs>) {} }:
+{
+  pkgs ? (import <nixpkgs>) { },
+}:
 {
   # ghostty = pkgs.callPackage ./ghostty/package.nix {};
+  hello = pkgs.callPackage ./hello.nix { };
+  photo-cli = pkgs.callPackage ./photo-cli.nix { };
 }

+ 7 - 0
packages/hello.nix

@@ -0,0 +1,7 @@
+{ writeShellApplication }:
+writeShellApplication {
+  name = "hello";
+  text = ''
+    echo "Hello World ..."
+  '';
+}

+ 14 - 0
packages/photo-cli.nix

@@ -0,0 +1,14 @@
+{ buildDotnetGlobalTool, lib, ... }:
+
+buildDotnetGlobalTool {
+  pname = "photo-cli";
+  version = "0.3.3";
+
+  nugetHash = "sha512-bSD5i6e6YoNafiQdOHpem+iTNYD6e41VxedpCCzPd+la+Wc1n0/cc6iI+u/puujhUitG48lcz8BJ0ESnCXSG8g==";
+
+  meta = {
+    homepage = "https://photocli.com/";
+    changelog = "https://github.com/photo-cli/photo-cli/blob/main/CHANGELOG.md";
+    license = lib.licenses.asl20;
+  };
+}

+ 8 - 3
users/thomas/default.nix

@@ -1,7 +1,12 @@
-{ pkgs, lib, config, outputs, ... }:
+{
+  pkgs,
+  lib,
+  config,
+  outputs,
+  ...
+}:
 let
-  homeLocation = with pkgs.stdenv.hostPlatform;
-    if isDarwin then "/Users" else "/home";
+  homeLocation = with pkgs.stdenv.hostPlatform; if isDarwin then "/Users" else "/home";
 in
 {
   imports = [

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

@@ -1,24 +0,0 @@
-{
-  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"; }
-  ];
-}

+ 0 - 164
users/thomas/nvim/lsp.nix

@@ -1,164 +0,0 @@
-{
-  autoCmd = [
-    {
-      event = "LspAttach";
-      desc = "Keymaps for when LSP is attached";
-      group = "kickstart-lsp-attach";
-      callback.__raw = ''
-      function(event)
-        local map = function(keys, func, desc)
-          vim.keymap.set('n', keys, func, { buffer = event.buf, desc = 'LSP: ' .. desc })
-        end
-
-        -- Jump to the definition of the word under your cursor.
-        --  This is where a variable was first declared, or where a function is defined, etc.
-        --  To jump back, press <C-t>.
-        map('gd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition')
-
-        -- Find references for the word under your cursor.
-        map('gr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences')
-
-        -- Jump to the implementation of the word under your cursor.
-        --  Useful when your language has ways of declaring types without an actual implementation.
-        map('gI', require('telescope.builtin').lsp_implementations, '[G]oto [I]mplementation')
-
-        -- Jump to the type of the word under your cursor.
-        --  Useful when you're not sure what type a variable is and you want to see
-        --  the definition of its *type*, not where it was *defined*.
-        map('<leader>D', require('telescope.builtin').lsp_type_definitions, 'Type [D]efinition')
-
-        -- Fuzzy find all the symbols in your current document.
-        --  Symbols are things like variables, functions, types, etc.
-        map('<leader>ds', require('telescope.builtin').lsp_document_symbols, '[D]ocument [S]ymbols')
-
-        -- Fuzzy find all the symbols in your current workspace.
-        --  Similar to document symbols, except searches over your entire project.
-        map('<leader>ws', require('telescope.builtin').lsp_dynamic_workspace_symbols, '[W]orkspace [S]ymbols')
-
-        -- Rename the variable under your cursor.
-        --  Most Language Servers support renaming across files, etc.
-        map('<leader>rn', vim.lsp.buf.rename, '[R]e[n]ame')
-
-        -- Execute a code action, usually your cursor needs to be on top of an error
-        -- or a suggestion from your LSP for this to activate.
-        map('<leader>ca', vim.lsp.buf.code_action, '[C]ode [A]ction')
-
-        -- WARN: This is not Goto Definition, this is Goto Declaration.
-        --  For example, in C this would take you to the header.
-        map('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration')
-
-        -- The following two autocommands are used to highlight references of the
-        -- word under your cursor when your cursor rests there for a little while.
-        --    See `:help CursorHold` for information about when this is executed
-        --
-        -- When you move your cursor, the highlights will be cleared (the second autocommand).
-        local client = vim.lsp.get_client_by_id(event.data.client_id)
-        if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_documentHighlight) then
-          local highlight_augroup = vim.api.nvim_create_augroup('kickstart-lsp-highlight', { clear = false })
-          vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, {
-            buffer = event.buf,
-            group = highlight_augroup,
-            callback = vim.lsp.buf.document_highlight,
-          })
-
-          vim.api.nvim_create_autocmd({ 'CursorMoved', 'CursorMovedI' }, {
-            buffer = event.buf,
-            group = highlight_augroup,
-            callback = vim.lsp.buf.clear_references,
-          })
-
-          vim.api.nvim_create_autocmd('LspDetach', {
-            group = vim.api.nvim_create_augroup('kickstart-lsp-detach', { clear = true }),
-            callback = function(event2)
-              vim.lsp.buf.clear_references()
-              vim.api.nvim_clear_autocmds { group = 'kickstart-lsp-highlight', buffer = event2.buf }
-            end,
-          })
-        end
-
-        -- The following code creates a keymap to toggle inlay hints in your
-        -- code, if the language server you are using supports them
-        --
-        -- This may be unwanted, since they displace some of your code
-        if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_inlayHint) then
-          map('<leader>th', function()
-            vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled { bufnr = event.buf })
-          end, '[T]oggle Inlay [H]ints')
-        end
-      end
-      '';
-    }
-  ];
-
-  autoGroups = {
-    "kickstart-lsp-attach".clear = true;
-  };
-
-  keymaps = [
-    {
-      key = "<C-h>";
-      action.__raw = "vim.lsp.buf.signature_help";
-      mode = "i";
-    }
-  ];
-
-  plugins.lsp = {
-    enable = true;
-
-    keymaps = {
-      diagnostic = {
-        "<leader>vd" = "open_float";
-        "[d" = "goto_next";
-        "]d" = "goto_prev";
-      };
-
-      lspBuf = {
-        "<leader>f" = "format";
-        "gd" = "definition";
-        "K" = "hover";
-        "<leader>vws" = "workspace_symbol";
-        "<leader>vca" = "code_action";
-        "<leader>vrr" = "references";
-        "<leader>vrn" = "rename";
-      };
-    };
-
-    servers = {
-      astro.enable = true;
-      bashls.enable = true;
-
-      denols = {
-        enable = true;
-        rootDir = "require('lspconfig').util.root_pattern('deno.json')";
-        extraOptions.init_options = {
-          lint = true;
-          unstable = true;
-        };
-      };
-
-      gopls.enable = true;
-
-      # elixirls.enable = true;
-      nextls.enable = true;
-      nil_ls.enable = true;
-      tailwindcss.enable = true;
-
-      ts_ls = {
-        enable = true;
-        extraOptions.single_file_support = false;
-        rootDir = ''
-          require('lspconfig').util.root_pattern("tsconfig.json")
-          '';
-      };
-
-      volar.enable = true;
-      #   rootDir = ''
-      #     # root_pattern = { 'vite.config.ts', 'nuxt.config.ts' },
-      #
-      #
-      #     require('lspconfig').util.root_pattern("vite.config.mts")
-      #     '';
-      # };
-    };
-  };
-}

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

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

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

@@ -1,13 +0,0 @@
-{
-  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,
-      # })

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

@@ -1,62 +0,0 @@
-{
-  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";
-    }
-  ];
-}