Nix : Add nixdroid_switch.
This commit is contained in:
parent
5c0678c739
commit
ad07cf3ea6
|
@ -7,13 +7,3 @@ function ask() {
|
||||||
}" 2> /dev/null | parallel -j1 -- "echo {} | jq -r .response | tr -d '\n'"
|
}" 2> /dev/null | parallel -j1 -- "echo {} | jq -r .response | tr -d '\n'"
|
||||||
echo
|
echo
|
||||||
}
|
}
|
||||||
|
|
||||||
# Ask code AI.
|
|
||||||
# Usage: ask_code <QUERY>
|
|
||||||
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
|
|
||||||
}
|
|
||||||
|
|
|
@ -69,6 +69,11 @@ function nix_live() {
|
||||||
nix build "${_nix_system_config}#nixosConfigurations.live.config.system.build.isoImage"
|
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.
|
# Autocomplete with available hosts.
|
||||||
function _comp_hosts() {
|
function _comp_hosts() {
|
||||||
local IFS=$'\n'
|
local IFS=$'\n'
|
||||||
|
|
21
.doc/Bash.md
21
.doc/Bash.md
|
@ -31,6 +31,13 @@ Command|Description
|
||||||
`unarchive [FILES]`|Extract previously created archive with checksum validation.
|
`unarchive [FILES]`|Extract previously created archive with checksum validation.
|
||||||
`archive_touch [FILES]`|Change archive's filesystem time to match creation date.
|
`archive_touch [FILES]`|Change archive's filesystem time to match creation date.
|
||||||
|
|
||||||
|
## Ask.
|
||||||
|
|
||||||
|
Command|Description
|
||||||
|
---|---
|
||||||
|
`ask <QUERY>`|Ask general AI.
|
||||||
|
`ask_code <QUERY>`|Ask code AI.
|
||||||
|
|
||||||
## Battery.
|
## Battery.
|
||||||
|
|
||||||
Command|Description
|
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.
|
`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.
|
`gu [EMAIL]`|Specify git user as Dmitry Voronin with provided email.
|
||||||
`gg <REPO>`|Get my git repo.
|
`gg <REPO>`|Get my git repo.
|
||||||
`gdc <COMMITHASH>`|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.
|
`gv`| Get version number based on commit count.
|
||||||
|
|
||||||
## Group.
|
## Group.
|
||||||
|
@ -355,6 +362,18 @@ Command|Description
|
||||||
`recursive <COMMAND>`|Run something recursively over all directories.
|
`recursive <COMMAND>`|Run something recursively over all directories.
|
||||||
`recursive1 <COMMAND>`|Run something recursively over directories of 1 depth (excluding current dir).
|
`recursive1 <COMMAND>`|Run something recursively over directories of 1 depth (excluding current dir).
|
||||||
|
|
||||||
|
## Save.
|
||||||
|
|
||||||
|
Command|Description
|
||||||
|
---|---
|
||||||
|
`save [TARGETS]`|Backup a game save.
|
||||||
|
|
||||||
|
## Ssh.
|
||||||
|
|
||||||
|
Command|Description
|
||||||
|
---|---
|
||||||
|
`sshmount <REMOTE> <LOCAL>`|Mount FS over ssh. Just extra config for sshfs.
|
||||||
|
|
||||||
## Su.
|
## Su.
|
||||||
|
|
||||||
Command|Description
|
Command|Description
|
||||||
|
|
Reference in a new issue