66 lines
1.8 KiB
Nix
66 lines
1.8 KiB
Nix
{ config, pkgs, ... }:
|
|
|
|
let
|
|
unstable = import <nixos-unstable> {};
|
|
in
|
|
{
|
|
environment.systemPackages = with pkgs; [
|
|
ranger
|
|
kitty
|
|
];
|
|
|
|
programs.bash.interactiveShellInit = ''
|
|
if test -n "$KITTY_INSTALLATION_DIR"; then
|
|
export KITTY_SHELL_INTEGRATION="enabled,no-sudo"
|
|
source "$KITTY_INSTALLATION_DIR/shell-integration/bash/kitty.bash"
|
|
fi
|
|
'';
|
|
|
|
environment.etc."xdg/kitty/kitty.conf".text = ''
|
|
font_size 10.0
|
|
scrollback_lines 10000
|
|
window_border_width 0.5
|
|
window_padding_width 3
|
|
${if config.services.xserver.desktopManager.gnome.enable then "hide_window_decorations yes" else null}
|
|
background_opacity 0.8
|
|
dynamic_background_opacity yes
|
|
'';
|
|
|
|
environment.etc."ranger/rc.conf".text = ''
|
|
eval import os; fm.set_option_from_string("preview_images", "true") if "KITTY_INSTALLATION_DIR" in os.environ else None;
|
|
eval import os; fm.set_option_from_string("preview_images_method", "kitty") if "KITTY_INSTALLATION_DIR" in os.environ else None;
|
|
set vcs_aware true
|
|
set show_hidden true
|
|
|
|
alias drag shell ${unstable.ripdrag}/bin/ripdrag -Axd %p &
|
|
map <C-d> drag
|
|
'';
|
|
|
|
programs.direnv.enable = true;
|
|
|
|
programs.starship = {
|
|
enable = true;
|
|
settings = {
|
|
format = "$all$line_break\${custom.ranger}$jobs$battery$time$status$os$container$shell$character";
|
|
directory = {
|
|
truncation_length = 5;
|
|
truncation_symbol = "…/";
|
|
};
|
|
username = {
|
|
show_always = true;
|
|
};
|
|
status.disabled = false;
|
|
custom.ranger = {
|
|
when = "test $RANGER_LEVEL";
|
|
command = "echo \"✦\"";
|
|
style = "bold 208";
|
|
};
|
|
# custom.PS1 = {
|
|
# when = true;
|
|
# command = "echo -e \"\\x1b\\x5d133;A\\x1b\\x5c\"";
|
|
# format = "$output";
|
|
# use_stdin = false;
|
|
# };
|
|
};
|
|
};
|
|
}
|