nixos-config/nixos/system/desktop/hoard.nix

55 lines
1.4 KiB
Nix
Raw Normal View History

2023-05-22 09:45:58 +02:00
{ config, pkgs, ... }:
let
hoardSrc = pkgs.fetchFromGitHub {
owner = "Hyde46";
repo = "hoard";
rev = "v1.3.1";
sha256 = "sha256-Gm3X6/g5JQJEl7wRvWcO4j5XpROhtfRJ72LNaUeZRGc=";
};
in
{
# todo : sync via syncthing
backup.dirs = [
"/root/.config/hoard"
"/home/palo/.config/hoard"
];
environment.systemPackages = [ pkgs.hoard ];
home-manager.users.mainUser = {
xdg.configFile."hoard/config.yml".text = builtins.toJSON {
version = "1.0.1";
default_namespace = "default";
config_home_path = "/home/palo/.config/hoard";
trove_path = "/home/palo/.config/hoard/trove.yml";
2023-05-27 00:13:30 +02:00
query_prefix = " >";
2023-05-22 09:45:58 +02:00
primary_color = [ 87 142 87 ];
secondary_color = [ 203 184 144 ];
tertiary_color = [ 30 30 30 ];
command_color = [ 30 30 30 ];
parameter_token = "#";
read_from_current_directory = true;
};
programs.zsh.initExtra = ''
2023-05-27 00:13:30 +02:00
export HOARD_NOBIND=1
2023-05-22 09:45:58 +02:00
source ${hoardSrc}/src/shell/hoard.zsh
2023-05-27 00:13:30 +02:00
bindkey '^x' _hoard_list_widget
2023-05-22 09:45:58 +02:00
'';
};
2023-05-27 00:13:30 +02:00
# use showkey -a
# todo Ctrl-h is equivalent to Ctrl-Backspace (for some reason)
2023-05-22 09:45:58 +02:00
programs.zsh.interactiveShellInit = ''
2023-05-27 00:13:30 +02:00
export HOARD_NOBIND=1
2023-05-22 09:45:58 +02:00
source ${hoardSrc}/src/shell/hoard.zsh
2023-05-27 00:13:30 +02:00
bindkey '^x' _hoard_list_widget
2023-05-22 09:45:58 +02:00
'';
programs.bash.interactiveShellInit = ''
2023-05-27 00:13:30 +02:00
export HOARD_NOBIND=1
2023-05-22 09:45:58 +02:00
source ${hoardSrc}/src/shell/hoard.bash
2023-05-27 00:13:30 +02:00
bind -x '"\C-x": __hoard_list'
2023-05-22 09:45:58 +02:00
'';
}