2023-06-22 17:00:39 +02:00
|
|
|
{ pkgs, ... }:
|
2023-06-11 15:51:26 +02:00
|
|
|
|
2023-06-22 16:42:23 +02:00
|
|
|
{
|
2023-05-18 15:49:56 +02:00
|
|
|
users.defaultUserShell = pkgs.fish;
|
2023-06-11 15:33:54 +02:00
|
|
|
environment.shells = [ pkgs.fish ];
|
2023-05-18 15:49:56 +02:00
|
|
|
|
2023-06-21 09:32:35 +02:00
|
|
|
environment.sessionVariables = {
|
|
|
|
GIT_DISCOVERY_ACROSS_FILESYSTEM = "1";
|
|
|
|
FZF_DEFAULT_OPTS = "--height 40% --reverse --border --color=16";
|
|
|
|
NODE_OPTIONS = "--max_old_space_size=16384";
|
2023-06-26 03:40:49 +02:00
|
|
|
BAT_THEME = "base16";
|
2023-08-16 19:55:59 +02:00
|
|
|
GATSBY_TELEMETRY_DISABLED = "1";
|
2023-06-21 09:32:35 +02:00
|
|
|
};
|
|
|
|
|
2023-06-12 22:59:59 +02:00
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
wget
|
|
|
|
jq
|
2023-08-11 04:22:47 +02:00
|
|
|
eza
|
2023-06-12 22:59:59 +02:00
|
|
|
fd
|
|
|
|
fzf
|
|
|
|
ripgrep
|
|
|
|
];
|
|
|
|
|
2023-05-18 15:49:56 +02:00
|
|
|
programs.fish = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
shellAliases = {
|
2023-08-11 21:27:58 +02:00
|
|
|
ls = "${pkgs.eza}/bin/eza --icons --group-directories-first -I 'lost+found'";
|
2023-09-12 21:28:14 +02:00
|
|
|
tree = "${pkgs.eza}/bin/eza --icons --group-directories-first --all --long --tree -I 'node_modules|.git|public|lost+found|target|.next|.cache|.nuxt|themes'";
|
2023-05-18 15:49:56 +02:00
|
|
|
mv = "mv -i";
|
2023-05-31 16:33:03 +02:00
|
|
|
cp = "cp -ia";
|
2023-06-12 22:59:59 +02:00
|
|
|
rg = "${pkgs.ripgrep}/bin/rg --max-columns=2000 --smart-case";
|
|
|
|
yarn = "${pkgs.yarn}/bin/yarn --emoji true";
|
2023-05-18 15:49:56 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
shellAbbrs = {
|
|
|
|
g = "git";
|
|
|
|
ga = "git add";
|
|
|
|
gaa = "git add --all";
|
|
|
|
gap = "git add --patch";
|
2023-07-26 18:55:42 +02:00
|
|
|
gapp = "git apply";
|
2023-07-18 15:07:59 +02:00
|
|
|
gb = "git branch --verbose";
|
|
|
|
gbr = "git branch --verbose --remotes";
|
2023-06-20 18:04:28 +02:00
|
|
|
gbd = "git branch --delete";
|
2023-07-18 16:29:30 +02:00
|
|
|
gbD = "git branch --delete --force";
|
2023-05-18 15:49:56 +02:00
|
|
|
gc = "git commit -m";
|
|
|
|
gca = "git commit --amend";
|
|
|
|
gcl = "git clone";
|
|
|
|
gco = "git checkout";
|
2023-07-11 14:02:02 +02:00
|
|
|
gcot = "git checkout --theirs";
|
2023-07-18 18:22:00 +02:00
|
|
|
gcp = "git cherry-pick --strategy-option theirs";
|
2023-07-22 19:23:24 +02:00
|
|
|
gcpx = "git cherry-pick --strategy-option theirs -x";
|
2023-07-18 13:19:49 +02:00
|
|
|
gd = "git diff";
|
|
|
|
gds = "git diff --staged";
|
2023-07-18 16:12:10 +02:00
|
|
|
gf = "git fetch";
|
2023-05-18 15:49:56 +02:00
|
|
|
gi = "git init";
|
2023-07-18 15:06:41 +02:00
|
|
|
gl = "git log --oneline --decorate --graph -n 10";
|
2023-05-18 15:49:56 +02:00
|
|
|
gm = "git merge";
|
2023-07-18 13:19:49 +02:00
|
|
|
gp = "git push";
|
2023-08-06 22:49:41 +02:00
|
|
|
gpu = "git pull";
|
2023-07-18 13:19:49 +02:00
|
|
|
gr = "git reset HEAD~";
|
2023-06-06 16:03:09 +02:00
|
|
|
gR = "git restore";
|
|
|
|
gRs = "git restore --staged";
|
2023-05-18 15:49:56 +02:00
|
|
|
gra = "git remote add";
|
2023-07-18 13:19:49 +02:00
|
|
|
gre = "git remote --verbose";
|
2023-05-18 15:49:56 +02:00
|
|
|
grh = "git reset HEAD";
|
2023-07-18 13:19:49 +02:00
|
|
|
grr = "git reset --hard HEAD~";
|
2023-08-05 03:38:38 +02:00
|
|
|
grb = "git rebase --interactive";
|
|
|
|
grbc = "git rebase --continue";
|
2023-05-18 15:49:56 +02:00
|
|
|
gs = "git status";
|
2023-09-12 21:28:43 +02:00
|
|
|
gsma = "git submodule add";
|
|
|
|
gsmu = "git submodule update --init --remote --recursive";
|
2023-05-18 15:49:56 +02:00
|
|
|
gst = "git stash";
|
|
|
|
gstp = "git stash pop";
|
2023-07-26 18:55:55 +02:00
|
|
|
gsw = "git switch";
|
2023-05-18 15:49:56 +02:00
|
|
|
gt = "git tag";
|
|
|
|
gts = "git tag -s";
|
|
|
|
|
|
|
|
y = "yarn";
|
|
|
|
ya = "yarn add";
|
2023-08-11 01:24:39 +02:00
|
|
|
yb = "yarn build";
|
2023-05-18 15:49:56 +02:00
|
|
|
yar = "yarn remove";
|
2023-08-11 01:24:39 +02:00
|
|
|
yd = "yarn dev";
|
2023-05-18 15:49:56 +02:00
|
|
|
yi = "yarn init";
|
|
|
|
yin = "yarn install";
|
|
|
|
yu = "yarn upgrade-interactive";
|
|
|
|
|
2023-07-15 18:42:11 +02:00
|
|
|
tp = "trash put";
|
|
|
|
tl = "trash list";
|
|
|
|
tr = "trash restore";
|
|
|
|
te = "trash empty";
|
|
|
|
|
2023-08-02 04:23:06 +02:00
|
|
|
nf = "nix flake";
|
|
|
|
nfu = "nix flake update";
|
|
|
|
nd = "nix develop --command fish";
|
|
|
|
nb = "nix build";
|
|
|
|
ns = "nix shell";
|
|
|
|
nr = "nix run";
|
|
|
|
ncg = "sudo nix-collect-garbage d";
|
|
|
|
|
2023-08-03 18:34:48 +02:00
|
|
|
ci = "cargo init";
|
|
|
|
cin = "cargo info";
|
|
|
|
cu = "cargo update";
|
|
|
|
ca = "cargo add";
|
2023-08-05 03:39:04 +02:00
|
|
|
cab = "cargo add --build";
|
2023-08-06 22:50:05 +02:00
|
|
|
cad = "cargo add --dev";
|
2023-08-03 18:34:48 +02:00
|
|
|
cb = "cargo build";
|
|
|
|
cr = "cargo run";
|
|
|
|
cs = "cargo search";
|
2023-08-08 02:22:56 +02:00
|
|
|
ct = "cargo tree --depth 1";
|
2023-08-03 18:34:48 +02:00
|
|
|
cn = "cargo new";
|
|
|
|
crm = "cargo remove";
|
2023-08-05 03:39:04 +02:00
|
|
|
crmb = "cargo remove --build";
|
2023-08-06 22:50:05 +02:00
|
|
|
crmd = "cargo remove --dev";
|
2023-08-03 18:34:48 +02:00
|
|
|
cc = "cargo clippy";
|
|
|
|
cf = "cargo fmt";
|
|
|
|
|
2023-08-31 22:17:35 +02:00
|
|
|
dc = "deno compile";
|
|
|
|
dr = "deno run";
|
|
|
|
di = "deno install";
|
|
|
|
dt = "deno task";
|
|
|
|
dT = "deno test --watch";
|
|
|
|
|
2023-05-18 15:49:56 +02:00
|
|
|
dl = "yt-dlp";
|
2023-06-06 02:37:52 +02:00
|
|
|
vol = "wpctl set-volume '@DEFAULT_AUDIO_SINK@'"; # Change the volume, e.g. vol 10%+, vol 10%-, vol 100%
|
2023-05-18 15:49:56 +02:00
|
|
|
df = "df --human-readable --type=ext4 --total";
|
|
|
|
du = "du --human-readable --summarize";
|
2023-06-06 02:37:52 +02:00
|
|
|
jis = "recode shift_jis..utf8"; # Easily convert shift_jis-encoded files to utf8
|
|
|
|
utf16 = "recode utf16..utf8"; # Rarely, some files from Japan are utf16 instead
|
2023-05-18 15:49:56 +02:00
|
|
|
jp = "LANG=ja_JP.UTF-8 LC_ALL=ja_JP.UTF-8";
|
2023-08-03 18:35:54 +02:00
|
|
|
vm = "nixos-rebuild build-vm --flake . && ./result/bin/run-nixos-vm && trash put result nixos.qcow2";
|
|
|
|
sw = "sudo nixos-rebuild switch --flake .";
|
2023-06-12 09:48:15 +02:00
|
|
|
tf = "treefmt";
|
2023-05-18 15:49:56 +02:00
|
|
|
|
2023-07-18 13:19:49 +02:00
|
|
|
c = "clear";
|
2023-05-18 15:49:56 +02:00
|
|
|
e = "exit";
|
2023-08-03 18:35:27 +02:00
|
|
|
k = "kitty @ set-background-opacity";
|
2023-05-18 15:49:56 +02:00
|
|
|
l = "ls -l";
|
2023-06-06 16:37:06 +02:00
|
|
|
n = "nvim";
|
2023-05-27 21:37:07 +02:00
|
|
|
j = "joshuto";
|
2023-06-06 16:17:06 +02:00
|
|
|
t = "tree";
|
2023-05-18 15:49:56 +02:00
|
|
|
};
|
|
|
|
};
|
2023-05-17 01:10:15 +02:00
|
|
|
}
|