dotfiles/modules/home/cli/shell/zoxide/default.nix

48 lines
1 KiB
Nix
Raw Normal View History

2025-10-15 17:05:36 -05:00
{
pkgs,
lib,
flake,
osConfig,
...
}:
let
2025-10-17 14:41:33 -05:00
inherit (flake.config.machines.devices) mars deimos;
2025-10-15 17:05:36 -05:00
hostname = osConfig.networking.hostName;
2025-10-17 14:41:33 -05:00
sharedPaths = ''
${pkgs.zoxide}/bin/zoxide add ~/projects/dotfiles
${pkgs.zoxide}/bin/zoxide add ~/downloads
${pkgs.zoxide}/bin/zoxide add ~/projects
${pkgs.zoxide}/bin/zoxide add /mnt/media/ceres/jellyfin
${pkgs.zoxide}/bin/zoxide add /mnt/media/ceres/comfyui
'';
desktopPaths = ''
${pkgs.zoxide}/bin/zoxide add ~/projects/website
${pkgs.zoxide}/bin/zoxide add ~/projects/workflowbuilder
${pkgs.zoxide}/bin/zoxide add /mnt/media/storage
'';
2025-10-15 17:05:36 -05:00
zoxidePaths = {
2025-10-17 14:41:33 -05:00
home.activation.initZoxidePaths = lib.hm.dag.entryAfter [ "writeBoundary" ] (
if hostname == mars.name then
sharedPaths ++ desktopPaths
else if hostname == deimos.name then
sharedPaths
else
""
);
2025-10-15 17:05:36 -05:00
};
in
2025-10-01 19:51:55 -05:00
{
programs.zoxide = {
enable = true;
enableNushellIntegration = true;
package = pkgs.zoxide;
options = [
];
};
}
2025-10-17 14:41:33 -05:00
// zoxidePaths