2022-08-23 23:42:36 -03:00
|
|
|
{ config, pkgs, lib, ... }:
|
2023-01-24 10:10:05 -03:00
|
|
|
let inherit (pkgs.uservars) key theme color accent font editor;
|
2022-08-23 23:42:36 -03:00
|
|
|
in {
|
|
|
|
config = {
|
|
|
|
programs.fish = {
|
|
|
|
enable = true;
|
|
|
|
interactiveShellInit = ''
|
2022-11-11 16:16:07 -03:00
|
|
|
set -U fish_features stderr-nocaret qmark-noglob regex-easyesc ampersand-nobg-in-token
|
|
|
|
|
2022-08-23 23:42:36 -03:00
|
|
|
set -g __accent_color "${accent.color}"
|
|
|
|
alias _fish_prompt_accent "_fish_prompt_color '$__accent_color'"
|
|
|
|
set_color red
|
2022-11-07 19:35:50 -03:00
|
|
|
if not test -d "$PASSWORD_STORE_DIR"
|
2022-08-23 23:42:36 -03:00
|
|
|
echo "Password Store not yet setup"
|
|
|
|
end
|
|
|
|
if not test -f "$HOME/.ssh/id_rsa"
|
|
|
|
echo "SSH keys not yet setup"
|
|
|
|
end
|
2022-10-24 22:30:11 -03:00
|
|
|
if not command -qs rustc; or not rustc --version &> /dev/null
|
2022-08-23 23:42:36 -03:00
|
|
|
rustup default stable &>/dev/null &
|
|
|
|
end
|
2022-10-24 22:30:11 -03:00
|
|
|
set_color normal
|
2022-10-17 00:18:10 -03:00
|
|
|
|
|
|
|
bind \cy 'commandline | wl-copy -n'
|
2023-02-25 20:27:07 -03:00
|
|
|
|
|
|
|
function systemctl --wraps systemctl
|
|
|
|
env SYSTEMD_COLORS=1 systemctl $argv | kak-pager
|
|
|
|
end
|
|
|
|
function journalctl --wraps journalctl
|
|
|
|
env SYSTEMD_COLORS=1 journalctl $argv | kak-pager
|
|
|
|
end
|
2022-08-23 23:42:36 -03:00
|
|
|
'';
|
2022-10-24 22:30:11 -03:00
|
|
|
shellAliases = {
|
|
|
|
rm = "trash";
|
|
|
|
tree = "exa -T";
|
|
|
|
};
|
2022-08-23 23:42:36 -03:00
|
|
|
shellAbbrs = {
|
2022-11-09 17:55:48 -03:00
|
|
|
off = "shutdown now";
|
2023-01-24 10:10:05 -03:00
|
|
|
v = {
|
|
|
|
"helix" = "hx";
|
|
|
|
"kakoune" = "kak";
|
|
|
|
}.${editor};
|
2022-08-23 23:42:36 -03:00
|
|
|
ns = "nix develop --command $SHELL";
|
2023-01-27 17:09:48 -03:00
|
|
|
wcf = "wl-copy-file";
|
2022-08-23 23:42:36 -03:00
|
|
|
# system
|
|
|
|
sv = "sudo systemct";
|
|
|
|
suv = "sudo systemct --user";
|
2022-08-25 12:37:53 -03:00
|
|
|
# docker abbrs
|
|
|
|
d = "docker";
|
|
|
|
dc = "docker-compose";
|
2022-08-23 23:42:36 -03:00
|
|
|
# git abbrs
|
|
|
|
g = "git";
|
|
|
|
ga = "git add";
|
|
|
|
gs = "git status";
|
|
|
|
gsh = "git show";
|
|
|
|
gl = "git log";
|
|
|
|
gg = "git graph";
|
|
|
|
gd = "git diff";
|
|
|
|
gds = "git diff --staged";
|
|
|
|
gc = "git commit";
|
|
|
|
gca = "git commit --all";
|
|
|
|
gcf = "git commit --fixup";
|
|
|
|
gp = "git push -u origin (git branch --show-current)";
|
|
|
|
gw = "git switch";
|
|
|
|
gr = "cd (git root)";
|
|
|
|
gri = "git rebase --interactive FETCH_HEAD";
|
|
|
|
};
|
|
|
|
functions = { fish_greeting = ""; };
|
|
|
|
};
|
2022-11-17 17:39:11 -03:00
|
|
|
programs = {
|
|
|
|
zoxide.enable = true;
|
|
|
|
exa.enable = true;
|
|
|
|
exa.enableAliases = true;
|
|
|
|
direnv.enable = true;
|
|
|
|
direnv.nix-direnv.enable = true;
|
|
|
|
};
|
2023-01-25 10:17:26 -03:00
|
|
|
xdg.configFile = {
|
|
|
|
"fish/conf.d/prompt.fish".source = ./fish_prompt.fish;
|
2023-01-25 10:17:39 -03:00
|
|
|
"fish/completions/" = {
|
|
|
|
recursive = true;
|
|
|
|
source = ./completions;
|
|
|
|
};
|
2022-08-23 23:42:36 -03:00
|
|
|
};
|
2023-01-19 09:20:27 -03:00
|
|
|
# programs.command-not-found.enable = true;
|
|
|
|
programs.nix-index.enable = true;
|
2023-01-27 17:09:48 -03:00
|
|
|
home.packages = with pkgs; [
|
|
|
|
trash-cli
|
|
|
|
wl-copy-file
|
|
|
|
];
|
2022-08-23 23:42:36 -03:00
|
|
|
};
|
|
|
|
}
|