From ad07cf3ea61b9b669a8da51ca73d00efcbda3570 Mon Sep 17 00:00:00 2001 From: Dmitry Voronin Date: Fri, 1 Mar 2024 19:16:00 +0300 Subject: [PATCH] Nix : Add nixdroid_switch. --- .../system/module/common/bash/module/Ask.sh | 10 --------- .../system/module/common/bash/module/Nix.sh | 5 +++++ .doc/Bash.md | 21 ++++++++++++++++++- 3 files changed, 25 insertions(+), 11 deletions(-) diff --git a/.config/linux/system/module/common/bash/module/Ask.sh b/.config/linux/system/module/common/bash/module/Ask.sh index 2eaeb92..0d69473 100644 --- a/.config/linux/system/module/common/bash/module/Ask.sh +++ b/.config/linux/system/module/common/bash/module/Ask.sh @@ -7,13 +7,3 @@ function ask() { }" 2> /dev/null | parallel -j1 -- "echo {} | jq -r .response | tr -d '\n'" echo } - -# Ask code AI. -# Usage: ask_code -function ask_code() { - curl http://localhost:11434/api/generate -d "{ - \"model\": \"mistral\", - \"prompt\":\"${*}\" - }" 2> /dev/null | parallel -j1 -- "echo {} | jq -r .response | tr -d '\n'" - echo -} diff --git a/.config/linux/system/module/common/bash/module/Nix.sh b/.config/linux/system/module/common/bash/module/Nix.sh index 7616fdd..816ceb3 100644 --- a/.config/linux/system/module/common/bash/module/Nix.sh +++ b/.config/linux/system/module/common/bash/module/Nix.sh @@ -69,6 +69,11 @@ function nix_live() { nix build "${_nix_system_config}#nixosConfigurations.live.config.system.build.isoImage" } +# Switch nix-on-droid. +function nixdroid_switch() { + nix-on-droid switch --flake .config/linux/system +} + # Autocomplete with available hosts. function _comp_hosts() { local IFS=$'\n' diff --git a/.doc/Bash.md b/.doc/Bash.md index 56709df..da84a19 100644 --- a/.doc/Bash.md +++ b/.doc/Bash.md @@ -31,6 +31,13 @@ Command|Description `unarchive [FILES]`|Extract previously created archive with checksum validation. `archive_touch [FILES]`|Change archive's filesystem time to match creation date. +## Ask. + +Command|Description +---|--- +`ask `|Ask general AI. +`ask_code `|Ask code AI. + ## Battery. Command|Description @@ -219,7 +226,7 @@ Command|Description `gr [COMMIT COUNT]`|Rebase by X commits or from root. When COUNT is 0 - rebase from root. Default is 2. `gu [EMAIL]`|Specify git user as Dmitry Voronin with provided email. `gg `|Get my git repo. -`gdc `|See diff for a specific commit. +`gdc [COMMITHASH]`|See diff for a specific commit. Last commit by default. `gv`| Get version number based on commit count. ## Group. @@ -355,6 +362,18 @@ Command|Description `recursive `|Run something recursively over all directories. `recursive1 `|Run something recursively over directories of 1 depth (excluding current dir). +## Save. + +Command|Description +---|--- +`save [TARGETS]`|Backup a game save. + +## Ssh. + +Command|Description +---|--- +`sshmount `|Mount FS over ssh. Just extra config for sshfs. + ## Su. Command|Description