This commit is contained in:
2024-10-19 04:05:19 +02:00
parent f2452c241d
commit 4cc421ec43
11 changed files with 67 additions and 10 deletions

View File

@@ -142,11 +142,6 @@
manix-fzf = ''manix "" 2>/dev/null | grep '^# ' | sed 's/^# \(.*\) (.*/\1/;s/ (.*//;s/^# //' | fzf --preview="manix '{}'" | xargs manix'';
# TODO: move to /run/user/...
/* nixpkgs-review = ''mkdir -p /dev/shm/nixpkgs-review && ln -sfn /dev/shm/nixpkgs-review $HOME/.cache/nixpkgs-review && nixpkgs-review''; */
/* nixpkgs-review = ''cd ~/repos/nixpkgs/master/; nixpkgs-review --systems "$(gum choose --no-limit --ordered x86_64-linux aarch64-linux aarch64-darwin x86_64-darwin i686-linux riscv64-linux x86_64-freebsd aarch64-freebsd i686-freebsd riscv64-freebsd | xargs)"''; */
mnixpkgs-review = ''nixpkgs-review --systems "$(gum choose --no-limit --ordered {linux,darwin,freebsd}-{x86_64,aarch64,i686,riscv64} | sed -E 's/^([^-]*)-([^-]*)$/\2-\1/' | xargs)"'';
killall = "killall -v";
bin = "python -c 'import sys; sys.stdout.write(sys.stdin.read().strip())' | curl -is -X POST https://i.kuklef.se/upload -F content=@- -F expiration=10d | grep '^location:' | cut -d' ' -f2-";

View File

@@ -38,6 +38,7 @@
emote
normcap # doesn't work on wayland
gcolor3
icon-library
gitg

View File

@@ -41,8 +41,9 @@
".remote.toml"
".remoteenv"
"result"
"results"
"result-*"
"results"
"results-*"
"__pycache__"
"*.pyc"
];

View File

@@ -48,6 +48,28 @@
fi
done
}
_choose_nix_systems() {
# x86_64-linux aarch64-linux aarch64-darwin x86_64-darwin i686-linux riscv64-linux x86_64-freebsd aarch64-freebsd i686-freebsd riscv64-freebsd
gum choose --no-limit --ordered --height 15 {linux,darwin,freebsd}-{x86_64,aarch64,i686,riscv64} \
| sed -E 's/^([^-]*)-([^-]*)$/\2-\1/'
}
mnix-build() {
# TODO: somehow store the out-links
_choose_nix_systems | xe -j0 -s 'nix-instantiate --system "$1" . '"$(printf " %q" "$@")" | xargs nix-build --keep-going --no-out-link
}
mnom-build() {
# TODO: somehow store the out-links
_choose_nix_systems | xe -j0 -s 'nix-instantiate --system "$1" . '"$(printf " %q" "$@")" | xargs nom-build --keep-going --no-out-link
}
mnixpkgs-review() {
# TODO: use /run/user/...
# mkdir -p /dev/shm/nixpkgs-review
# ln -sfn /dev/shm/nixpkgs-review $HOME/.cache/nixpkgs-review
nixpkgs-review --systems "$(_choose_nix_systems | xargs)" "$@"
}
'';
imports = [ ../modules/jump.nix ];
@@ -103,6 +125,14 @@
#home.shellAliases.mv = "mv -i";
#home.shellAliases.cp = "cp -i";
home.shellAliases.inom-build = "nom-build --system i686-linux -j0";
home.shellAliases.inix-build = "nix-build --system i686-linux -j0";
home.shellAliases.rnom-build = "nom-build --system riscv64-linux -j0";
home.shellAliases.rnix-build = "nix-build --system riscv64-linux -j0";
home.shellAliases.fnom-build = "nom-build --system x86_64-freebsd -j0";
home.shellAliases.fnix-build = "nix-build --system x86_64-freebsd -j0";
home.shellAliases.anom-build = "nom-build --system aarch64-linux -j0";
home.shellAliases.anix-build = "nix-build --system aarch64-linux -j0";
home.shellAliases.dnom-build = "nom-build --system x86_64-darwin -j0";
home.shellAliases.dnix-build = "nix-build --system x86_64-darwin -j0";
home.shellAliases.danom-build = "nom-build --system aarch64-darwin -j0";