Reorganize files
This commit is contained in:
parent
f449490474
commit
58ce7ac394
14 changed files with 2 additions and 2 deletions
66
nix-os/shell.nix
Normal file
66
nix-os/shell.nix
Normal file
|
@ -0,0 +1,66 @@
|
|||
{ 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;
|
||||
# };
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue