Something went wrong. Try again.
NixOS configuration
Something went wrong. Try again.
2.0 kB · 73 lines
Nix
at sway
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374{ pkgs, lib, inputs, ...}: { # Fish config programs.fish = { enable = true; generateCompletions = true; functions = { fish_user_key_bindings = { body = '' # Make ctr-space accept autosuggestion bind -M insert ctrl-space accept-autosuggestion # Unbind \eh from help bind --erase --preset -M insert \eh bind --erase --preset \eh bind --erase --preset -M visual \eh # bind alt-jkhl to arrow keys bind -M insert \ej down-line bind -M insert \ek up-line bind -M insert \eh backward-char bind -M insert \el forward-char ''; }; }; interactiveShellInit = '' fish_config theme choose tokyonight_moon set -g fish_key_bindings fish_vi_key_bindings set -g fish_greeting "" ''; shellAbbrs = { cat = "bat"; cp = "xcp"; du = "dua"; find = "fd"; gits = "git status"; grep = "rg"; hexdump = "hexyl"; tar = "ouch"; }; shellAliases = { glog = "${ lib.getExe pkgs.git } log --graph --pretty=format:'%Cred%h%Creset %an: %s - %Creset %C(yellow)%d%Creset %Cgreen(%cr)%Creset' --abbrev-commit --date=relative $argv"; net_connected = "sudo ${lib.getExe pkgs.lsof} -i -n | grep -v LISTEN"; net_listening = "sudo ${lib.getExe pkgs.lsof} -i -n | grep LISTEN"; oath = "${lib.getExe pkgs.yubikey-manager} oath accounts code"; }; };
xdg.configFile."fish/themes" = { source = "${inputs.tokyo}/extras/fish_themes"; };
# Starship config programs.starship = { enable = true; enableFishIntegration = true; settings = { add_newline = false; character = { success_symbol = "[λ](green)"; error_symbol = "[λ](red)"; vimcmd_symbol = "[λ](green)"; vimcmd_replace_one_symbol = "[λ](purple)"; vimcmd_replace_symbol = "[λ](purple)"; vimcmd_visual_symbol = "[λ](purple)"; }; }; };}