Add kidex package with config

Add kidex plugin to anyrun
This commit is contained in:
Evie Litherland-Smith 2023-09-24 10:59:09 +01:00
parent 415460db2d
commit d174a0491e
4 changed files with 71 additions and 2 deletions

View file

@ -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

View file

@ -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
''

47
home/hyprland/kidex.nix Normal file
View file

@ -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
),
],
)
'';
}

View file

@ -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";
};
}