Compare commits

...

6 Commits

Author SHA1 Message Date
Buddy Sandidge dbabc8b550 Add nushell config 2 weeks ago
Buddy Sandidge 75ca9068b6 Simplify lsp config 2 weeks ago
Buddy Sandidge 3888baed8c Convert templates to files that wasn't needed 2 weeks ago
Buddy Sandidge 262bf210a5 Update lazy nvim plugin 2 weeks ago
Buddy Sandidge 6507310b6f Use encrypted files instead of bws 2 weeks ago
Buddy Sandidge 20c392b30d Add install nu script 2 weeks ago

@ -3,6 +3,11 @@
{{- $include_legacy := promptBoolOnce . "include_legacy" "include old scripts [false]" -}}
{{- $bws_token := promptStringOnce . "bws_token" "BitWarden Secrets Manager Access Token" -}}
encryption = "age"
[age]
identity = "{{ .chezmoi.homeDir }}/.config/chezmoi/key.txt"
recipient = "age166qk8xkvd5cx2mqfxenw0mvmg4ghv7jzg8ffr0f0dave5lwzm38qswha8c"
[data]
bws_token = {{ $bws_token | quote }}
development = {{ $development }}

@ -2,7 +2,7 @@
#{{- /* vim: set filetype=toml: */ -}}
[".local/share/nvim/lazy/lazy.nvim"]
type = "archive"
url = "https://github.com/folke/lazy.nvim/archive/refs/tags/v11.14.1.tar.gz"
url = "https://github.com/folke/lazy.nvim/archive/refs/tags/v11.16.0.tar.gz"
exact = true
stripComponents = 1
refreshPeriod = "2196h"

@ -1,6 +1,12 @@
/.idea
/README.md
/scripts/
/key.txt.age
{{- if not .include_legacy }}
/.local/share/duck-encoder
{{- end }}
{{- if not .hellotech }}
/.config/profile/env.d/hellotech.env
/.config/profile/profile.d/trubka.sh
/.config/profile/profile.d/hellotech.sh
{{- end }}

File diff suppressed because it is too large Load Diff

@ -0,0 +1,63 @@
# Nushell Environment Config File
#
# version = "0.100.0"
$env.STARSHIP_SHELL = "nu"
def create_left_prompt [] {
starship prompt --cmd-duration $env.CMD_DURATION_MS $'--status=($env.LAST_EXIT_CODE)'
}
# Use nushell functions to define your right and left prompt
$env.PROMPT_COMMAND = { || create_left_prompt }
$env.PROMPT_COMMAND_RIGHT = ""
$env.PROMPT_INDICATOR = ""
$env.PROMPT_INDICATOR_VI_INSERT = ": "
$env.PROMPT_INDICATOR_VI_NORMAL = "〉"
$env.PROMPT_MULTILINE_INDICATOR = "::: "
# Specifies how environment variables are:
# - converted from a string to a value on Nushell startup (from_string)
# - converted from a value back to a string when running external commands (to_string)
# Note: The conversions happen *after* config.nu is loaded
$env.ENV_CONVERSIONS = {
"PATH": {
from_string: { |s| $s | split row (char esep) | path expand --no-symlink }
to_string: { |v| $v | path expand --no-symlink | str join (char esep) }
}
"XDG_DATA_DIRS": {
from_string: { |s| $s | split row (char esep) | path expand --no-symlink }
to_string: { |v| $v | path expand --no-symlink | str join (char esep) }
}
"Path": {
from_string: { |s| $s | split row (char esep) | path expand --no-symlink }
to_string: { |v| $v | path expand --no-symlink | str join (char esep) }
}
}
# Directories to search for scripts when calling source or use
# The default for this is $nu.default-config-dir/scripts
$env.NU_LIB_DIRS = [
($nu.default-config-dir | path join 'scripts') # add <nushell-config-dir>/scripts
($nu.data-dir | path join 'completions') # default home for nushell completions
]
# Directories to search for plugin binaries when calling register
# The default for this is $nu.default-config-dir/plugins
$env.NU_PLUGIN_DIRS = [
# add <nushell-config-dir>/plugins
($nu.default-config-dir | path join 'plugins')
]
$env.PATH = [
($'($env.HOME)/.local/bin')
($'($env.CARGO_HOME?)' | path join "bin")
($'($env.HOME)/go/bin')
($'($env.HOME)/.rbenv/shims')
($'($env.HOME)/.local/share/JetBrains/Toolbox/scripts')
...($env.PATH | split row (char esep))
'/snap/bin'
] | each {|p| if ($p | path exists) { $p } else { null }} | uniq
source ($nu.default-config-dir | path join 'xdg.nu')

@ -0,0 +1,28 @@
$env.XDG_BIN_HOME = $'($env.HOME)/.local/bin'
$env.XDG_CACHE_HOME = $'($env.HOME)/.cache'
$env.XDG_CONFIG_HOME = $'($env.HOME)/.config'
$env.XDG_DATA_HOME = $'($env.HOME)/.local/share'
$env.XDG_INCLUDE_HOME = $'($env.HOME)/.local/include'
$env.XDG_STATE_HOME = $'($env.HOME)/.local/state'
$env.XDG_DESKTOP_DIR = $'($env.HOME)/desktop'
$env.XDG_DOCUMENTS_DIR = $'($env.HOME)/documents'
$env.XDG_DOWNLOAD_DIR = $'($env.HOME)/downloads'
$env.XDG_MUSIC_DIR = $'($env.HOME)/music'
$env.XDG_PICTURES_DIR = $'($env.HOME)/pictures'
$env.XDG_PODCAST_DIR = $'($env.HOME)/podcasts'
$env.XDG_PUBLICSHARE_DIR = $'($env.HOME)/public'
$env.XDG_TEMPLATES_DIR = $'($env.HOME)/templates'
$env.XDG_VIDEOS_DIR = $'($env.HOME)/videos'
let xdg = $env
| transpose name value
| each {|e| if $e.name =~ 'XDG_' { $e } else { null }}
| each {|e| {
name: ($e.name | str replace 'XDG_' '' | str downcase),
value: $e.value
}}
| reduce --fold {} {|e, memo| {
...$memo,
$e.name: ($e.value | if $in =~ ':' { split row ':' } else { $e.value })
}}

@ -1,11 +1,10 @@
# chezmoi:template:left-delimiter=--{{
--{{- /* vim: set filetype=lua: */ -}}
local function format_buffer(_)
vim.lsp.buf.format()
end
local function on_attach(_, buffer)
local function format_buffer(_)
vim.lsp.buf.format()
end
-- Create a command `:Format` local to the LSP buffer
vim.api.nvim_buf_create_user_command(buffer, 'Format', format_buffer, {
desc = 'Format current buffer with LSP',
@ -13,110 +12,83 @@ local function on_attach(_, buffer)
end
local function config()
local cmp_nvim_lsp = require 'cmp_nvim_lsp'
local lspconfig = require 'lspconfig'
local mason_lspconfig = require 'mason-lspconfig'
local builtin = require 'telescope.builtin'
vim.api.nvim_create_autocmd('LspAttach', {
group = vim.api.nvim_create_augroup('kickstart-lsp-attach', { clear = true }),
callback = function (event)
local function map(keys, func, desc)
vim.keymap.set('n', keys, func, { buffer = event.buf, desc = 'LSP: ' .. desc})
end
local lspconfig = require('lspconfig')
map('<leader>rn', vim.lsp.buf.rename, '[R]e[n]ame')
map('<leader>ca', vim.lsp.buf.code_action, '[C]ode [A]ction')
local capabilities = require('cmp_nvim_lsp').default_capabilities(
vim.lsp.protocol.make_client_capabilities())
map('gd', builtin.lsp_definitions, '[G]oto [D]efinition')
map('gr', builtin.lsp_references, '[G]oto [R]eferences')
map('gI', builtin.lsp_implementations, '[G]oto [I]mplementation')
map('<leader>D', builtin.lsp_type_definitions, 'Type [D]efinition')
map('<leader>ds', builtin.lsp_document_symbols, '[D]ocument [S]ymbols')
map('<leader>ws', builtin.lsp_dynamic_workspace_symbols, '[W]orkspace [S]ymbols')
--{{ if lookPath "bash-language-server" -}}
-- npm install --global bash-language-server
lspconfig.bashls.setup {
capabilities = capabilities,
on_attach = on_attach,
settings = {},
}
--{{- end }}
-- See `:help K` for why this keymap
map('K', vim.lsp.buf.hover, 'Hover Documentation')
map('<C-k>', vim.lsp.buf.signature_help, 'Signature Documentation')
--{{ if lookPath "go" -}}
lspconfig.gopls.setup {
capabilities = capabilities,
on_attach = on_attach,
settings = {},
}
--{{- end }}
local function inspect_workspace_folders()
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
end
--{{ if lookPath "nu" -}}
lspconfig.nushell.setup {
capabilities = capabilities,
on_attach = on_attach,
settings = {},
}
--{{- end }}
-- Lesser used LSP functionality
map('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration')
map('<leader>wa', vim.lsp.buf.add_workspace_folder, '[W]orkspace [A]dd Folder')
map('<leader>wr', vim.lsp.buf.remove_workspace_folder, '[W]orkspace [R]emove Folder')
map('<leader>wl', inspect_workspace_folders, '[W]orkspace [L]ist Folders')
--{{ if lookPath "templ" -}}
lspconfig.templ.setup {
capabilities = capabilities,
on_attach = on_attach,
settings = {},
}
--{{- end }}
--{{ if lookPath "vscode-eslint-language-server" -}}
-- # npm i -g vscode-langservers-extracted
lspconfig.eslint.setup {
capabilities = capabilities,
on_attach = on_attach,
settings = {},
}
-- The following two autocommands are used to highlight references of the
-- word under your cursor when your cursor rests there for a little while.
-- See `:help CursorHold` for information about when this is executed
--
-- When you move your cursor, the highlights will be cleared (the second autocommand).
local client = vim.lsp.get_client_by_id(event.data.client_id)
if client and client.server_capabilities.documentHighlightProvider then
vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, {
buffer = event.buf,
callback = vim.lsp.buf.document_highlight,
})
lspconfig.html.setup {
capabilities = capabilities,
on_attach = on_attach,
settings = {},
}
vim.api.nvim_create_autocmd({ 'CursorMoved', 'CursorMovedI' }, {
buffer = event.buf,
callback = vim.lsp.buf.clear_references,
})
end
lspconfig.cssls.setup {
capabilities = capabilities,
on_attach = on_attach,
settings = {},
}
end
})
lspconfig.jsonls.setup {
capabilities = capabilities,
on_attach = on_attach,
settings = {},
}
--{{- end }}
local servers = {
bashls = {},
bufls = {},
taplo = {},
dockerls = {},
jsonls = {},
jqls = {},
marksman = {},
sqlls = {},
vimls = {},
yamlls = {},
cmake = {},
cssls = {},
--{{ if lookPath "node" -}}
eslint = {},
ts_ls = {},
--{{- end }}
--{{ if lookPath "go" -}}
gopls = {},
templ = {},
-- golangci_lint_ls = {},
--{{- end }}
lua_ls = {
--{{ if lookPath "lua-language-server" -}}
lspconfig.lua_ls.setup {
capabilities = capabilities,
on_attach = on_attach,
settings = {
Lua = {
workspace = { checkThirdParty = false },
telemetry = { enable = false },
},
},
}
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = cmp_nvim_lsp.default_capabilities(capabilities)
mason_lspconfig.setup {
ensure_installed = vim.tbl_keys(servers),
}
mason_lspconfig.setup_handlers {
function(server_name)
lspconfig[server_name].setup {
capabilities = capabilities,
on_attach = on_attach,
settings = servers[server_name],
filetypes = (servers[server_name] or {}).filetypes,
}
end,
}
--{{- end }}
end
return {
@ -125,15 +97,8 @@ return {
tag = 'v1.0.0',
config = config,
dependencies = {
{ 'williamboman/mason.nvim', tag = 'v1.10.0', opts = {} },
{ 'williamboman/mason-lspconfig.nvim', tag = 'v1.31.0' },
{ 'j-hui/fidget.nvim', tag = 'legacy', opts = {} },
{ 'folke/trouble.nvim', tag = 'v3.6.0' },
-- { 'folke/lazydev.nvim',
-- tag = 'v1.8.0',
-- ft = "lua",
-- opts = {
-- }
-- },
{ 'folke/lazydev.nvim', tag = 'v1.9.0', ft = "lua", opts = {} },
},
}

@ -1,5 +0,0 @@
# chezmoi:template:left-delimiter=#{{
#{{- /* vim: set filetype=sh: */ -}}
#{{- if and .hellotech .bws_token -}}
ATLASSIAN_TOKEN=#{{ (bitwardenSecrets "70fbcffa-2cb1-4ddf-9b1f-b18c015c9ba9" .bws_token).value }}
#{{- end }}

@ -1,6 +0,0 @@
# chezmoi:template:left-delimiter=#{{
#{{- /* vim: set filetype=sh: */ -}}
#{{- if and .hellotech .bws_token -}}
CLOUDFLARE_EMAIL=#{{ (bitwardenSecrets "fbc453ba-4c18-4471-82a3-b18c015e40c5" .bws_token).value }}
CLOUDFLARE_KEY=#{{ (bitwardenSecrets "c8aff966-4232-4629-8a08-b18c015e5da8" .bws_token).value }}
#{{- end }}

@ -0,0 +1,16 @@
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSAxZ3V6RUc4c1hFV1dITjdB
elljUSt0ZUxVT0FLeWZuc05RT25DUUtvcFRZClZRVFh4bGp1eWhCYWJ0cG5MMWpB
dUlLdzZTZHBxSXVzL1IxczI5SFdOQ2MKLS0tIHZ4N3NpS1dWZElla1ZmejNKeGxF
dHorbHV6d1kwZ1pwRlB2ZDVCNnBxWGcK1IAjC/PhDxzizYfd2uvkmhgALMUpxdAd
5QZke6zi6cDhHzHpg68I4p+afdKCGgtSMZ1dGrCqVlKIBkqzcjET9SJLHbmbncU+
qXC+sjWQUXqUGS8ZOYsRiLEtYQgpqSA672lYYud/8YSJlDJfc9wekcfgZX7MQWJz
mgcXl+WA1aqf4FVVtXp06o93hKtqIjO84oV6bEOLL0P2mLc5+GEwuvuDMQLsYlL2
oKZamHTNRNjq2cFVZ6hqZlU7yXBk+mUKATS7SI14dQzFRi/rqSi+/t2TJ2eNU+B5
cTBs9spaXoKUhEctMG5Riz6wM1/kYWRNlB7s3DauHV31p6pUf3rwUjT185wfdKKP
DHIKLGx2zisXpmp2bLRnYSjHEoKYfAIZkTUZnQ0zzZJ2juJzj8cc8X3j6WlHzj7f
KVgWZPqbDD6FsI7WNzYSop8B35zY+V0kO037Gaq5q0NUtKwkwffpOQ05tBkF1PVK
Pwl4ZBCtsZcw+KZ243gWTgDBsqHrbDq0KuTM1e1h8t4i5KcOqv5NU4pTZrgdgvl3
IxdwAzOKxyuQsgp46vcgF+4YC88fukjzfNpkSncARFvn1/fSIt1y8UEOyYte1TUw
uFEDifSZwHmD
-----END AGE ENCRYPTED FILE-----

@ -0,0 +1,8 @@
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBTMlUzMEdOK0h2SlB0eG1G
N2E2N2ZVNWN1ZVJFbGNLRm05NWtINjY0VmxnCkp6Q3NMSURsOWNlZmZKUjFJZDNX
Zk5EU1dVa0JNNDQ0TVBYSDM0QmJFdHcKLS0tIEFxVTlyd21zQmdnbGpLeE4vOWJ4
elVualRPSGgrb1Fub3FMRmRlaFVSYWcKWEE8MKGcsEhZshxM17468m5xlDaGH66f
J2cbjyBRIG1wcVgpCSAPRw8Vd1wUIWJFnyFzyiwnrHcPBM+M/JNZDmadNOAyADhc
MgqPsEeD2k1Kcro3zthL0kl4+TNEremTZ9Zx
-----END AGE ENCRYPTED FILE-----

@ -1,5 +0,0 @@
# chezmoi:template:left-delimiter=#{{
#{{- /* vim: set filetype=sh: */ -}}
#{{- if and .hellotech .bws_token -}}
LINEAR_APP_TOKEN=#{{ (bitwardenSecrets "76693d18-eeb1-4019-976d-b18c015f7048" .bws_token).value }}
#{{- end }}

@ -1,5 +0,0 @@
# chezmoi:template:left-delimiter=#{{
#{{- /* vim: set filetype=sh: */ -}}
#{{- if .bws_token -}}
OPENAI_API_KEY=#{{ (bitwardenSecrets "579bd247-2357-4817-a033-b18c0161b7f1" .bws_token).value }}
#{{- end }}

@ -1,5 +0,0 @@
# chezmoi:template:left-delimiter=#{{
#{{- /* vim: set filetype=sh: */ -}}
#{{- if and .hellotech .bws_token -}}
PULUMI_ACCESS_TOKEN=#{{ (bitwardenSecrets "4688eb1b-e889-468f-ba40-b18c01607ae8" .bws_token).value }}
#{{- end }}

@ -0,0 +1,29 @@
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSByVFlFRHRvWStKMTZyOEpo
RGIzanlLNjVpbCtYUStVUFdVbWlRYndVdEVjCk8xbGZGWUZkQmRxaW9mcWx4clk4
VlUrRERybGViNENQOHVHcTdCckwxNW8KLS0tIDBvbUNnc3pPUjh6aVQ3R2hYS09I
aEJWV2J5TzZDcmt3NktmY0ZiT2Z5MWsKG8kpxjFDk8/3vFyMytpxXVHZaansazav
yJ7fAgTWFW/uCf1ktzLtaQLHMl7Jd1BuVildgTIIX7dcDNEFcLF9p4+lputdO9E1
NjjxXv8l/srRK1KjGf5tDrtPzD0QMgm4FMtO3c8on83S2T0J79VR8SdexCUKPNbd
/QUjm8PwMd6sv+4pEU+awEPgEagh0u4gZ858jF8Z+lwm83ZZflxEbxwyjWA70Ll8
2XN5BwL5xKxGZ1ydAjlGL+FKhBUvQBesi4+PnXSChhkUSIHVp5ad3mk1FWMAXUAs
moM8kxoko4R9MhXkrzh3xXcqAwvWhruW1kVz7pi9sYusTvY9r1xKZUdGybTPDNe/
duwtxurYZecgKlFa2iUGVrzEflUNiySDWcpwnAYQ77Bm4r89SjsXrPi8QJZe0fL0
rpl7FuqLv9+eA2S4E4ojSg7u4imy2i+gEoN+BRH1nGeWSWSIs3iwI02KsB0Q3MAo
N4dOMlQC80FOyY/pp75JVaIdekJf+kmXBXGphCo21glHYpeUuQ4UTt8YNNUBQQVe
IF8XvXdaqpmrXMo8DRYMEe/vthT7zKGdfhyDuKrHVcO3mz7ZSTi3oxOe3fRvrtNA
LcmnuCnLqUEGH6YKWHtbD5bud1juyb1yg4OPQioKd/z7rSaxCxynza50CdFxUJcs
EoD2t9wBV2qWTUtXFZen4XL7PsG2P3NxGVh3uqXemgs0MFJ7huuro/mNb9WhhgPm
KfqbkpuOLrQWLpSuimwYi/3hksAV/Ca64Igp8ApkZjSV9GwHzmXnI6bfOWLDCeuL
qUTulOwiN6AVsBGUH3Mek913tYa2TsWhpt/ukOOZeO5tGPBxI/v6DfU6636k/ojE
Dd2QxfDfTWuR//sf+Aj5++SIPAzAXxk3qAA3kmhad1knBcnVUkT6yiUuFmoxy7Vi
K72lvcCP7yiSpC87vTVeyc8pvEOJX4ruaE/1YNYpRWnGGpe8kI7yWXRSCvWMXCOK
1C1lUXOs3Xyl+r1gQKgT/FTdYtJmXKDiqRRcDJlr1fM8GDUJ3xTMTQovYdv4B/En
SljbSuyLL7xtB/tbQfcwH9j9loMOidrfDARlYlSxRIiMz1WIPDACTbwa55jk4s2o
tsVj6kNsZyj41PBPayND+hbKqGlCORecRv769C+ZoEUAyc4l9HZIHMbzzsbYDV1t
3MpIpFJtAwBCT9FFFzHDB0JDwByt1J0VWsNoBIj2gdkXIRZhjEibgIGDL9a0xA7N
dKShV5kShaFlApu/4TfXRZQw7RMMPC7tVtrlZRJaKdymPjnR3KZ61HbC/raGlAhS
gEwhD7HTbCQ5utxXMXVn7KcQ3AGcHzF8i0fU9dF/dLFsiN3mQD5FWdiKXdx7ItNU
Wa+RPHMBrkJkjRkANk9I2XJjD7iwKnjccXGrP5DIz+4/oEpvLfqW0oDq2n0uWr+l
rkCpI8bhAJxj+PuYLOaNvDHGyqfgp46XsjVFoLR5Yae51f3iwazaqQ==
-----END AGE ENCRYPTED FILE-----

@ -1,5 +1,3 @@
# chezmoi:template:left-delimiter=#{{
#{{- /* vim: set filetype=sh: */ -}}
#shellcheck shell=sh
source_env_file() {

@ -1,7 +1,3 @@
# chezmoi:template:left-delimiter=#{{
#{{- /* vim: set filetype=sh: */ -}}
#{{- if .hellotech -}}
k8s_last_config () (
dasel --read yaml --write json \
| jq --raw-output '.metadata.annotations["kubectl.kubernetes.io/last-applied-configuration"]' \
@ -24,4 +20,3 @@ _append_path /usr/local/opt/mysql-client/bin
_append_path "${HOME}/google-cloud-sdk/bin"
unset _append_path
#{{- end }}

@ -1,32 +0,0 @@
# chezmoi:template:left-delimiter=#{{
#{{- /* vim: set filetype=sh: */ -}}
#{{- if and .hellotech .bws_token -}}
config_trubka_buddy () {
export TRUBKA_BROKERS=#{{ (bitwardenSecrets "9598a627-0d32-4398-98fb-b18c014b9d7d" .bws_token).value }}
export TRUBKA_TLS=true
export TRUBKA_PROTO_ROOT=#{{ .chezmoi.homeDir }}/hellotech/entities
export TRUBKA_SASL_USERNAME=#{{ (bitwardenSecrets "6fc85366-d6bc-438f-a75b-b18c014c7d77" .bws_token).value }}
export TRUBKA_SASL_PASSWORD=#{{ (bitwardenSecrets "d8153476-d170-4d86-9804-b18c014c9a7b" .bws_token).value }}
export TRUBKA_SASL_MECHANISM=plain
}
config_trubka_dev () {
export TRUBKA_BROKERS=#{{ (bitwardenSecrets "59d193cb-1b62-42cf-a753-b18c014cd5f6" .bws_token).value }}
export TRUBKA_TLS=true
export TRUBKA_PROTO_ROOT=#{{ .chezmoi.homeDir }}/hellotech/entities
export TRUBKA_SASL_USERNAME=#{{ (bitwardenSecrets "123253f2-f720-4a56-af15-b18c014cf26b" .bws_token).value }}
export TRUBKA_SASL_PASSWORD=#{{ (bitwardenSecrets "4cb2b59b-11ca-4cc2-a9e5-b18c014d11fd" .bws_token).value }}
export TRUBKA_SASL_MECHANISM=plain
}
config_trubka_prod () {
export TRUBKA_BROKERS=#{{ (bitwardenSecrets "1e295c46-34b6-4ee9-b801-b18c014d3102" .bws_token).value }}
export TRUBKA_TLS=true
export TRUBKA_PROTO_ROOT=#{{ .chezmoi.homeDir }}/hellotech/entities
export TRUBKA_SASL_USERNAME=#{{ (bitwardenSecrets "9d5de1a1-796d-4208-a5a7-b18c014d4e8e" .bws_token).value }}
export TRUBKA_SASL_PASSWORD=#{{ (bitwardenSecrets "a7c38ba6-95be-42c0-8ed8-b18c014d6acf" .bws_token).value }}
export TRUBKA_SASL_MECHANISM=plain
}
#{{- end }}

@ -0,0 +1,29 @@
#!/usr/bin/env bash
set -euo pipefail
# shellcheck disable=SC1091
source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh"
main() (
APP=lua-language-server
VERSION=${VERSION:-3.13.3}
DEST=${XDG_DATA_HOME}/apps/releases/${APP}
URL=https://github.com/LuaLS/lua-language-server/releases/download/${VERSION}/lua-language-server-${VERSION}-$(get_os)-$(get_arch).tar.gz
extract_tarball "${URL}" "${DEST}/${VERSION}"
set_current_link "${DEST}" "${VERSION}"
set_link "${XDG_BIN_HOME}/lua-language-server" "${DEST}" bin/lua-language-server
)
get_arch() (
case $(uname -m) in
x86_64*) echo x64 ;;
*)
echo >&2 "unsupported architecture: $(uname -m)"
exit 1
;;
esac
)
main "$@"

@ -0,0 +1,32 @@
#!/usr/bin/env bash
set -euo pipefail
source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh"
main () (
APP=nushell
VERSION=${VERSION:-0.100.0}
DEST=${XDG_DATA_HOME}/apps/releases/${APP}
URL=https://github.com/nushell/nushell/releases/download/${VERSION}/nu-${VERSION}-$(uname -m)-$(get_os).tar.gz
PLUGIN_DIR=${XDG_CONFIG_HOME}/nushell/plugins
extract_tarball "${URL}" "${DEST}/${VERSION}" "--strip-component 1"
set_current_link "${DEST}" "${VERSION}"
set_link "${XDG_BIN_HOME}/nu" "${DEST}" nu
mkdir_if_missing "${PLUGIN_DIR}"
find "${DEST}" -type f -executable -exec basename {} \; | grep plugin | while read -r plugin ; do
set_link "${PLUGIN_DIR}/${plugin}" "${DEST}" "${plugin}"
done
)
get_os () (
case $(uname -s) in
Linux*) echo unknown-linux-gnu;;
Darwin*) echo apple-darwin;;
*) >&2 echo "unsupported os: $(uname -s)"; exit 1;;
esac
)
main "$@"

@ -11,7 +11,7 @@ function get_os () {
}
APP=starship
VERSION=${VERSION:-1.19.0}
VERSION=${VERSION:-1.21.1}
DEST="${XDG_DATA_HOME}/apps/releases/${APP}"
URL=https://github.com/starship/starship/releases/download/v${VERSION}/starship-$(uname -m)-$(get_os).tar.gz

@ -0,0 +1,10 @@
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNjcnlwdCBFVFQ2SE1pUWErTFdnQXJX
UndQMjFRIDE4ClFOcDFwWDUyekRBRi8vZmxzTTRFa0wxZmNjRmhnL3BlTzFqN1p5
VFZsdFUKLS0tIExrdG5ZUFAraUlnSEpCTnVEL3FZcGc3MzBBbXF2aFhodklOVlk5
Zno5QnMKfWGrVFWWJvWPxoeP/tUF3ZM6sG1eFPWf97e+K9iopntaGcrvY83H+mrc
lSdTVNplSm/Erq6u+UuAi8OeKE8G/Uf4vDXfuoww0dfbTpRDQPx+rAf3/kMVlgPt
qvyhZzjaNeHV3+LKOlH9DnOGxr9an+zbndfOOid3f0YWSyVk41B04RGOdZe2w+3D
ZUxon0+4lYzBv5snj6QVmdLqZPUiTWFpenXSwafr6LoYG51D8HEYsm53eJ7ZPq12
oBIa+inji8v+B6zqIkKklF9qYGbub9SrwSyN9FKzrRmmbR0=
-----END AGE ENCRYPTED FILE-----

@ -0,0 +1,9 @@
#!/usr/bin/env bash
if [ ! -f "{{ .chezmoi.homeDir }}/.config/chezmoi/key.txt" ]; then
mkdir -p "{{ .chezmoi.homeDir }}/.config/chezmoi"
chezmoi age decrypt \
--output "{{ .chezmoi.homeDir }}/.config/chezmoi/key.txt" \
--passphrase "{{ .chezmoi.sourceDir }}/key.txt.age"
chmod 600 "{{ .chezmoi.homeDir }}/.config/chezmoi/key.txt"
fi
Loading…
Cancel
Save