kladslkjdljkasd
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
./profiles/ssh.nix
|
||||
/* ./profiles/tmate.nix */
|
||||
./profiles/update-diff.nix
|
||||
./profiles/desktop/zed/remote.nix
|
||||
./profiles/desktop/zed/remote.nix # lsps for remote zed development
|
||||
];
|
||||
|
||||
# TODO: add remote-exec once packaged
|
||||
|
||||
@@ -12,14 +12,14 @@ in
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
bat
|
||||
#bat-extras.batman
|
||||
bat-extras.batman
|
||||
];
|
||||
|
||||
# bat - TODO: condition these on programs.bat.enable ?
|
||||
home.shellAliases.cat = "bat --style=plain --paging=never";
|
||||
home.shellAliases.cata = mkArgsAlias ''printf "echo + "$@"; bat --style plain --paging never %q\n" "$@" | xargs -d'\n' ${lib.getExe pkgs.mprocs}'';
|
||||
home.shellAliases.bata = mkArgsAlias ''printf "echo + "$@"; bat --style plain %q\n" "$@" | xargs -d'\n' ${lib.getExe pkgs.mprocs}'';
|
||||
#home.shellAliases.man = "batman";
|
||||
home.shellAliases.man = "batman";
|
||||
#home.shellAliases.man = "PAGER=${pkgs.most}/bin/most man";
|
||||
home.shellAliases.zbat = mkArgsAliasX ''atool "$1" --cat | bat --file-name "$1"'';
|
||||
|
||||
|
||||
@@ -6,16 +6,35 @@ in
|
||||
{
|
||||
programs = let
|
||||
# TODO: a notification based variant
|
||||
opts = lib.escapeShellArgs [
|
||||
# no gui
|
||||
"--no-video"
|
||||
# no stdout
|
||||
"--really-quiet"
|
||||
# prime tv audio
|
||||
"--audio-wait-open=1" # TODO: no work? ""
|
||||
"--audio-stream-silence=yes" # "Not all AOs support this"
|
||||
];
|
||||
rcScript = ''
|
||||
salert() {
|
||||
local retval=$?
|
||||
local -a opts=(${opts})
|
||||
if test $retval -eq 0; then
|
||||
#${getExe mpv} ${../../files/sounds/TFH_MadameC_Sing.wav} --no-video --really-quiet || true
|
||||
#${getExe mpv} ${../../files/sounds/NTR-BKIE-USA-0065.wav} --no-video --really-quiet || true
|
||||
${getExe mpv} ${../../files/sounds/NTR-BKIE-USA-0134.wav} --no-video --really-quiet || true
|
||||
case $(( $RANDOM % 10 )) in
|
||||
0 | 1 | 2 | 3 | 4)
|
||||
${getExe mpv} "''${opts[@]}" --volume-gain=10 ${../../files/sounds/NTR-BKIE-USA-0134.wav} ||:
|
||||
;;
|
||||
5 | 6 | 7 | 8)
|
||||
${getExe mpv} "''${opts[@]}" --volume-gain=12 ${../../files/sounds/NTR-BKIE-USA-0065.wav} ||:
|
||||
;;
|
||||
9)
|
||||
${getExe mpv} "''${opts[@]}" --volume-gain=3 ${../../files/sounds/TFH_MadameC_Sing.wav} ||:
|
||||
;;
|
||||
esac
|
||||
else
|
||||
${getExe mpv} ${../../files/sounds/NTR-BKIE-USA-0137.wav} --no-video --really-quiet || true
|
||||
${getExe mpv} "''${opts[@]}" --volume-gain=8 ${../../files/sounds/NTR-BKIE-USA-0137.wav} ||:
|
||||
fi
|
||||
|
||||
return $retval
|
||||
}
|
||||
'';
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
pkgs.unstable.zed-editor
|
||||
];
|
||||
|
||||
# setup lsp dependencies, useful for headless hosts to import too
|
||||
imports = [ ./remote.nix ];
|
||||
|
||||
systemd.user.services."update-zed-config" = {
|
||||
@@ -17,15 +18,19 @@
|
||||
Service.ExecStart = toString (
|
||||
# TODO: do I want to clone it if missing? Requires git keys, I should clone on OnActiveSec
|
||||
pkgs.writers.writeBash "update-zed-config" { } ''
|
||||
PATH="${lib.makeBinPath [ pkgs.git ]}''${PATH:-":$PATH"}"
|
||||
if [[ -e "$HOME".config/zed/.git ]]; then
|
||||
cd "$HOME".config/zed/
|
||||
PATH="${lib.makeBinPath [ pkgs.git ]}''${PATH:+":$PATH"}"
|
||||
if [[ -e "$HOME"/.config/zed/.git ]]; then
|
||||
cd "$HOME"/.config/zed/
|
||||
git add .
|
||||
set -x
|
||||
if ! git diff --staged --exit-code --quiet; then
|
||||
git status ||:
|
||||
git commit -m "Daily auto-commit $(date -u +%Y-%m-%dT%H:%M:%S%Z) @ $(hostname)"
|
||||
git pull --rebase --autostash
|
||||
git push
|
||||
else
|
||||
git pull --rebase --autostash
|
||||
fi
|
||||
git pull --rebase --autostash
|
||||
git push
|
||||
fi
|
||||
''
|
||||
);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ pkgs, lib, ... }:
|
||||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
#git
|
||||
@@ -34,8 +34,12 @@
|
||||
programs.git.enable = true;
|
||||
programs.git.lfs.enable = true;
|
||||
programs.git.delta.enable = true;
|
||||
programs.git.delta.options.tabs = 4;
|
||||
programs.git.delta.options.max-line-length = 0;
|
||||
programs.git.delta.options = {
|
||||
# Delta uses ~/.gitconfig even when not invoked by git
|
||||
tabs = 4;
|
||||
max-line-length = 0;
|
||||
features.syntax-theme = lib.mkIf config.programs.bat.enable config.programs.bat.config.theme;
|
||||
};
|
||||
#programs.git.lfs.enable = true;
|
||||
#programs.git.signing
|
||||
#programs.git.userName = "pbsds"
|
||||
|
||||
@@ -79,6 +79,7 @@ in
|
||||
"--bind 'end:last'"
|
||||
"--cycle"
|
||||
|
||||
# bat is installed in bat.nix
|
||||
#"--preview 'head {}'"
|
||||
# "--preview 'bat {}'"
|
||||
# "--preview 'tail -n$LINES {} | bat --file-name {} --paging never --style plain'"
|
||||
@@ -160,12 +161,17 @@ in
|
||||
home.shellAliases.fda = "fd --no-ignore --hidden";
|
||||
home.shellAliases.afd = "fd --no-ignore --hidden";
|
||||
|
||||
home.shellAliases.drg = lib.mkIf (config.programs.git.enable && config.programs.git.delta.enable) (
|
||||
mkArgsAlias ''rg "$@" --json | delta''
|
||||
);
|
||||
|
||||
# via nix-index-with-full-db
|
||||
home.shellAliases.nlocate = "nix-locate --top-level --regex";
|
||||
home.shellAliases.nlocateo = mkArgsAlias ''nix-locate --top-level --regex "$@" | tr -s ' ' | cut -d' ' -f4'';
|
||||
|
||||
home.shellAliases.kaomoji = "curl -s 'https://kaomoji.ru/en/' | htmlq tr td span --text | grep . | shuf | head -n1";
|
||||
|
||||
|
||||
home.packages = lib.filter (x: x != null) (with pkgs; [
|
||||
rsync
|
||||
bind.dnsutils # dig
|
||||
|
||||
Reference in New Issue
Block a user