diff --git a/.vscode/settings.json b/.vscode/settings.json index 6e8ecf3..969bc49 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -49,7 +49,8 @@ "thalheim", "togglable", "usbhid", - "xhci" + "xhci", + "zoxide" ], "conventionalCommits.scopes": [ "vscode", @@ -78,7 +79,8 @@ "desktop", "bootloader", "fish", - "git" + "git", + "shell" ], "todohighlight.isEnable": true, "todohighlight.isCaseSensitive": true, diff --git a/configuration.nix b/configuration.nix index 926f265..c6bb692 100644 --- a/configuration.nix +++ b/configuration.nix @@ -137,6 +137,7 @@ nix.enable = true; direnv.enable = true; starship.enable = true; + zoxide.enable = true; fish = { enable = true; direnv.enable = true; diff --git a/modules/shell/zoxide.nix b/modules/shell/zoxide.nix new file mode 100644 index 0000000..4a19c9a --- /dev/null +++ b/modules/shell/zoxide.nix @@ -0,0 +1,23 @@ +{ + config, + lib, + username, + ... +}: +with lib; +with lib.my; let + cfg = config.modules.shell.zoxide; +in { + options.modules.shell.zoxide = { + enable = mkEnableOption "zoxide shell integration"; + }; + + config = mkIf (cfg.enable) { + home-manager.users.${username} = { + programs.zoxide = { + enable = true; + options = ["--cmd cd"]; + }; + }; + }; +}