diff --git a/home/hyprland/anyrun.nix b/home/hyprland/anyrun.nix index 0ae54183..86780bb2 100644 --- a/home/hyprland/anyrun.nix +++ b/home/hyprland/anyrun.nix @@ -1,5 +1,5 @@ -{ pkgs, anyrun, ... }: { - imports = [ anyrun.homeManagerModules.default ]; +{ config, pkgs, anyrun, ... }: { + imports = [ anyrun.homeManagerModules.default ./kidex.nix ]; home.packages = with pkgs; [ rink ]; programs.anyrun = { enable = true; @@ -8,6 +8,7 @@ plugins = with anyrun.packages.${pkgs.system}; [ applications dictionary + kidex randr rink shell diff --git a/home/hyprland/config.nix b/home/hyprland/config.nix index 8d82c5a6..6992ccd8 100644 --- a/home/hyprland/config.nix +++ b/home/hyprland/config.nix @@ -246,4 +246,5 @@ in '' exec-once = ${pkgs.hyprpaper}/bin/hyprpaper exec-once = ${pkgs.protonmail-bridge}/bin/protonmail-bridge -n exec-once = ${pkgs.dex}/bin/dex --autostart + exec-once = kidex '' diff --git a/home/hyprland/kidex.nix b/home/hyprland/kidex.nix new file mode 100644 index 00000000..00bfcbf9 --- /dev/null +++ b/home/hyprland/kidex.nix @@ -0,0 +1,47 @@ +{ config, lib, pkgs, ... }: + +{ + home.packages = [ (pkgs.callPackage ./pkgs/kidex/default.nix { }) ]; + xdg.configFile."kidex.ron".text = '' + Config( + ignored: [".git*"], // A list of patterns to be ignored in all directories + directories: [ + WatchDir( + path: "${config.xdg.userDirs.documents}", // The root folder to be indexed + recurse: true, // Recursively index and watch all subfolders + ignored: [], // Ignore patterns specifically for this directory + ), + WatchDir( + path: "${config.xdg.userDirs.desktop}", // The root folder to be indexed + recurse: true, // Recursively index and watch all subfolders + ignored: [], // Ignore patterns specifically for this directory + ), + WatchDir( + path: "${config.xdg.userDirs.download}", // The root folder to be indexed + recurse: true, // Recursively index and watch all subfolders + ignored: [], // Ignore patterns specifically for this directory + ), + WatchDir( + path: "${config.xdg.userDirs.music}", // The root folder to be indexed + recurse: true, // Recursively index and watch all subfolders + ignored: [], // Ignore patterns specifically for this directory + ), + WatchDir( + path: "${config.xdg.userDirs.pictures}", // The root folder to be indexed + recurse: true, // Recursively index and watch all subfolders + ignored: [], // Ignore patterns specifically for this directory + ), + WatchDir( + path: "${config.xdg.userDirs.templates}", // The root folder to be indexed + recurse: true, // Recursively index and watch all subfolders + ignored: [], // Ignore patterns specifically for this directory + ), + WatchDir( + path: "${config.xdg.userDirs.videos}", // The root folder to be indexed + recurse: true, // Recursively index and watch all subfolders + ignored: [], // Ignore patterns specifically for this directory + ), + ], + ) + ''; +} diff --git a/home/hyprland/pkgs/kidex/default.nix b/home/hyprland/pkgs/kidex/default.nix new file mode 100644 index 00000000..70cfd4dc --- /dev/null +++ b/home/hyprland/pkgs/kidex/default.nix @@ -0,0 +1,20 @@ +{ lib, fetchFromGitHub, rustPlatform, ... }: + +rustPlatform.buildRustPackage rec { + pname = "kidex"; + version = "0.1.1"; + + src = fetchFromGitHub { + owner = "Kirottu"; + repo = pname; + rev = "d1aad240eb0bac7f017183fc80b0dc41f49a98d3"; + sha256 = "LgY4hYJOzGSNZxOK1O4L6A+4/qgv4dhouKo0nLKK25A="; + }; + + cargoSha256 = "BkpiJZZ83RrSSmbxM/TBl8rx5wIxLwYDZvFWdTwlUSI="; + + meta = { + description = "A simple file indexing service"; + homepage = "https://github.com/Kirottu/kidex"; + }; +}