Compare commits
5 commits
7d98dd2edd
...
edc2ff2282
Author | SHA1 | Date | |
---|---|---|---|
edc2ff2282 | |||
79aae021ce | |||
6af224728d | |||
bb0c1ddac0 | |||
a5b03ec1ad |
4 changed files with 30 additions and 14 deletions
3
Justfile
3
Justfile
|
@ -5,6 +5,9 @@ deployhome:
|
|||
# Impure is required for NixGL with proprietary Nvidia drivers :(
|
||||
home-manager switch --impure -b bak --flake .
|
||||
|
||||
deployhomefr:
|
||||
home-manager switch --refresh --impure -b bak --flake .
|
||||
|
||||
update:
|
||||
nix flake update
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
SUDO_EDITOR = "${EDITOR}";
|
||||
};
|
||||
|
||||
shellAliases = {
|
||||
shellAbbrs = {
|
||||
c = "clear";
|
||||
e = "${config.home.sessionVariables.EDITOR}";
|
||||
v = "${config.home.sessionVariables.EDITOR}";
|
||||
|
|
|
@ -1,4 +1,12 @@
|
|||
{ lib, config, ... }:
|
||||
let
|
||||
has-ripgrep = config.programs.ripgrep.enable;
|
||||
has-fd = config.programs.fd.enable;
|
||||
has-eza = config.programs.eza.enable;
|
||||
has-bat = config.programs.bat.enable;
|
||||
has-tmux = config.programs.tmux.enable;
|
||||
has-delta = config.programs.git.delta.enable;
|
||||
in
|
||||
{
|
||||
programs.fzf = {
|
||||
enable = true;
|
||||
|
@ -15,23 +23,22 @@
|
|||
"--preview-window='border-sharp'"
|
||||
];
|
||||
|
||||
# TODO: Check that rg is installed.
|
||||
defaultCommand = "rg --files --hidden --glob \"!.git\"";
|
||||
defaultCommand = lib.mkIf has-ripgrep "rg --files --hidden --glob \"!.git\"";
|
||||
|
||||
# TODO: Check that fd is installed.
|
||||
changeDirWidgetCommand = "fd --type d";
|
||||
changeDirWidgetOptions = lib.mkIf config.programs.eza.enable [
|
||||
changeDirWidgetCommand = lib.mkIf has-fd "fd --type d";
|
||||
changeDirWidgetOptions = lib.mkIf has-eza [
|
||||
"--preview 'eza --all --color=always --sort=name --group-directories-first --level=3 {}'"
|
||||
];
|
||||
|
||||
# TODO: Check that fd is installed.
|
||||
fileWidgetCommand = "fd --type f";
|
||||
fileWidgetOptions = lib.mkIf config.programs.bat.enable [
|
||||
fileWidgetCommand = lib.mkIf has-fd "fd --type f";
|
||||
fileWidgetOptions = lib.mkIf has-bat [
|
||||
"--preview 'bat {}'"
|
||||
];
|
||||
|
||||
tmux.enableShellIntegration = lib.mkIf config.programs.tmux.enable true;
|
||||
tmux.enableShellIntegration = lib.mkIf has-tmux true;
|
||||
};
|
||||
|
||||
home.sessionVariables.fzf_diff_highlighter = "delta --paging=never --features=arctic-fox";
|
||||
home.sessionVariables = lib.mkIf has-delta {
|
||||
fzf_diff_highlighter = "delta --paging=never --features=arctic-fox";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
{ ... }:
|
||||
{ config, lib, ... }:
|
||||
let
|
||||
has-delta = config.programs.git.delta.enable;
|
||||
in
|
||||
{
|
||||
programs.lazygit = {
|
||||
enable = true;
|
||||
|
@ -8,11 +11,14 @@
|
|||
|
||||
git.paging = {
|
||||
colorArg = "always";
|
||||
# TODO: only set this if delta is installed
|
||||
pager = "delta --paging=never --features=arctic-fox";
|
||||
pager = lib.mkIf has-delta "delta --paging=never --features=arctic-fox";
|
||||
};
|
||||
|
||||
os.editPreset = "nvim-remote";
|
||||
};
|
||||
};
|
||||
|
||||
home.shellAbbrs = {
|
||||
lzg = "lazygit";
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue