Skip to content

Commit 81f6df9

Browse files
committed
feat: support bluefin-cli/wolfi
1 parent 47e0353 commit 81f6df9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+596
-624
lines changed

.chezmoi.toml.tmpl

+16-5
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,26 @@
1212
#
1313
# This file supports Go's text/template language. */}}
1414

15+
{{ $codespaces := env "DEVPOD" | not | not -}}
16+
sourceDir = {{ .chezmoi.sourceDir | quote }}
17+
1518
{{ $name := "" -}}
1619
{{ $email := "" -}}
1720
{{ $signingkey := "" -}}
1821
{{ $colortheme := "" -}}
19-
{{ $disable_bash_history := false }}
20-
{{- if stdinIsATTY -}}
22+
{{ $disable_bash_history := false -}}
23+
24+
{{- if $codespaces -}}
25+
{{ $name = "Torgny Bjers" -}}
26+
{{ $email = "[email protected]" -}}
27+
{{ $signingkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDEVS22aLustrLsDLdrOUJwdOB4UAz9VfmvsWCr9FZYF" -}}
28+
{{ $colortheme = "dracula" -}}
29+
{{- else if stdinIsATTY -}}
2130
{{ $name = promptStringOnce . "name" "Name" -}}
2231
{{ $email = promptStringOnce . "email" "Email address" -}}
2332
{{ $signingkey = promptStringOnce . "signingkey" "Signing key" -}}
2433
{{ $colortheme = promptStringOnce . "colortheme" "Color theme (nord/dracula/dracula-pro/gruvbox-dark)" -}}
25-
{{ $disable_bash_history = promptBoolOnce . "disable_bash_history" "Disable bash history" }}
34+
{{ $disable_bash_history = promptBoolOnce . "disable_bash_history" "Disable bash history" -}}
2635
{{- end -}}
2736

2837
{{- $osid := .chezmoi.os -}}
@@ -36,16 +45,18 @@
3645
format = "json"
3746
color = "on"
3847
umask = 0o022
48+
{{- if $codespaces }}{{- else }}
3949
progress = true
50+
{{- end }}
4051

4152
[data]
53+
codespaces = {{ $codespaces }}
4254
email = {{ $email | quote }}
4355
name = {{ $name | quote }}
4456
signingkey = {{ $signingkey | quote }}
4557
osid = {{ $osid | lower | quote }}
4658
colortheme = {{ $colortheme | quote }}
4759
disable_bash_history = {{ $disable_bash_history }}
48-
lazygit = '{{ (gitHubLatestRelease "jesseduffield/lazygit").TagName | replace "v" "" }}'
4960

5061
[diff]
5162
exclude = ["scripts"]
@@ -61,4 +72,4 @@ progress = true
6172
options = ["missingkey=error"]
6273

6374
[hooks.read-source-state.pre]
64-
command = ".local/share/chezmoi/.hook-scripts/pre-source-state.sh"
75+
command = "{{ .chezmoi.sourceDir }}/.hook-scripts/pre-source-state.sh"

.chezmoidata/packages.yaml

+31
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,37 @@ packages:
3737
- google-chrome
3838
- slack
3939

40+
wolfi:
41+
brews:
42+
- atuin
43+
- babel
44+
- bat
45+
- bottom
46+
- cheat
47+
- direnv
48+
- eza
49+
- fzf
50+
- ggshield
51+
- gh
52+
- git
53+
- gnupg
54+
- golang
55+
- golangci-lint
56+
- jq
57+
- lazygit
58+
- lm-sensors
59+
- neovim
60+
- pnpm
61+
- pre-commit
62+
- ripgrep
63+
- starship
64+
- tree-sitter
65+
- yamlfmt
66+
- yamllint
67+
- yq
68+
- zellij
69+
- zoxide
70+
4071
fedora_workstation:
4172
copr:
4273
- atim/bottom

.chezmoiexternal.toml.tmpl

+5
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
url = "https://github.com/dj95/zjstatus/releases/latest/download/zjstatus.wasm"
1414
refreshPeriod = "24h"
1515

16+
{{ if or .codespaces (eq .osid "linux-wolfi") -}}
17+
{{ else -}}
18+
1619
{{ $bat_version := (gitHubLatestRelease "sharkdp/bat").TagName -}}
1720
[".local/bin/bat"]
1821
type = "archive-file"
@@ -55,3 +58,5 @@
5558
refreshPeriod = "168h"
5659
stripComponents = 1
5760
path = "bin/gh"
61+
62+
{{ end -}}

.chezmoiignore

+1
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ README.md
66
script_utils.sh
77
.hook-scripts
88
install.sh
9+
.config/nvim/lazy-lock.json

.hook-scripts/pre-source-state/10-password-manager.sh

+9-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# exit if 1Password is already installed
44
command -v op &>/dev/null && exit
55

6-
BASE_DIR=".local/share/chezmoi"
6+
BASE_DIR="${CHEZMOI_SOURCE_DIR}"
77

88
# shellcheck disable=SC1091
99
source "${BASE_DIR}/script_utils.sh"
@@ -15,7 +15,7 @@ case "$(osid)" in
1515
echo "${green}Installing 1Password on Silverblue${reset}"
1616
sudo wget https://downloads.1password.com/linux/keys/1password.asc \
1717
-O /etc/pki/rpm-gpg/1password.asc &&
18-
sudo sh -c 'echo -e "[1password]\nname=1Password Stable Channel\nbaseurl=https://downloads.1password.com/linux/rpm/stable/\$basearch\nenabled=1\ngpgcheck=1\nrepo_gpgcheck=1\ngpgkey=\"file:///etc/pki/rpm-gpg/1password.asc\"" > /etc/yum.repos.d/1password.repo' &&
18+
sudo sh -c 'echo -e "[1password]\nname=1Password Stable Channel\nbaseurl=https://downloads.1password.com/linux/rpm/stable/\$basearch\nenabled=1\ngpgcheck=1\nrepo_gpgcheck=1\ngpgkey=file:///etc/pki/rpm-gpg/1password.asc" > /etc/yum.repos.d/1password.repo' &&
1919
sudo rpm-ostree -q install 1password 1password-cli
2020
;;
2121
"fedora-workstation")
@@ -25,6 +25,13 @@ case "$(osid)" in
2525
sudo sh -c 'echo -e "[1password]\nname=1Password Stable Channel\nbaseurl=https://downloads.1password.com/linux/rpm/stable/\$basearch\nenabled=1\ngpgcheck=1\nrepo_gpgcheck=1\ngpgkey=\"https://downloads.1password.com/linux/keys/1password.asc\"" > /etc/yum.repos.d/1password.repo'
2626
sudo dnf install -y -q 1password 1password-cli
2727
;;
28+
"wolfi")
29+
if command -v distrobox-host-exec &>/dev/null; then
30+
if [ ! -f "/usr/local/bin/op" ]; then
31+
sudo ln -s "$(which distrobox-host-exec)" "/usr/local/bin/op"
32+
fi
33+
fi
34+
;;
2835
*)
2936
# shellcheck disable=SC2154
3037
echo "${red}Unsupported OS${reset}"

.hook-scripts/pre-source-state/15-flox.disabled

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
# exit if Flox is already installed
44
command -v flox &>/dev/null && exit
55

6-
BASE_DIR=".local/share/chezmoi"
6+
BASE_DIR="${CHEZMOI_SOURCE_DIR}"
77

88
# shellcheck disable=SC1091
99
source "${BASE_DIR}/script_utils.sh"
1010

11-
case "$(uname -s)" in
11+
case "$(osid)" in
1212
Darwin) ;;
13-
Linux)
13+
"fedora-workstation")
1414
# shellcheck disable=SC2154
1515
echo "${green}Installing Flox${reset}"
1616
sudo rpm --import https://flox-installers.s3.amazonaws.com/by-channel/nightly/deb/flox-archive-keyring.asc
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env bash
2+
3+
BASE_DIR="${CHEZMOI_SOURCE_DIR}"
4+
5+
# shellcheck disable=SC1091
6+
source "${BASE_DIR}/script_utils.sh"
7+
8+
case "$(osid)" in
9+
"fedora-silverblue")
10+
if [ ! -f ~/.cargo/bin/rustup ]; then
11+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s - --no-modify-path --profile default -q -y
12+
fi
13+
;;
14+
esac

.hook-scripts/pre-source-state/60-pnpm.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# exit if pnpm is already installed
44
command -v pnpm &>/dev/null && exit
55

6-
BASE_DIR=".local/share/chezmoi"
6+
BASE_DIR="${CHEZMOI_SOURCE_DIR}"
77

88
# shellcheck disable=SC1091
99
source "${BASE_DIR}/script_utils.sh"
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
BASE_DIR=".local/share/chezmoi"
3+
BASE_DIR="${CHEZMOI_SOURCE_DIR}"
44

55
# shellcheck disable=SC1091
66
source "${BASE_DIR}/script_utils.sh"
@@ -12,22 +12,5 @@ case "$(osid)" in
1212
chmod u+x ~/.local/bin/nvim
1313
fi
1414
;;
15+
*) ;;
1516
esac
16-
17-
if [ -f "${HOME}/.config/nvim/config.ld" ]; then
18-
# shellcheck disable=SC2154
19-
echo "${green}Updating AstroNvim${reset}"
20-
git -C "${HOME}/.config/nvim" pull --rebase --update-shallow -q
21-
elif [ ! -d "${HOME}/.config/nvim" ]; then
22-
# shellcheck disable=SC2154
23-
echo "${green}Cloning AstroNvim${reset}"
24-
git clone --depth 1 -q https://github.com/AstroNvim/AstroNvim "${HOME}/.config/nvim"
25-
else
26-
# shellcheck disable=SC2154
27-
echo "${green}Backing up existing nvim config${reset}"
28-
rm -Rf "${HOME}/.config/nvim.backup"
29-
mv "${HOME}/.config/nvim" "${HOME}/.config/nvim.backup"
30-
# shellcheck disable=SC2154
31-
echo "${green}Cloning AstroNvim${reset}"
32-
git clone --depth 1 -q https://github.com/AstroNvim/AstroNvim "${HOME}/.config/nvim"
33-
fi

.luacheckrc

-1
This file was deleted.

.stylua.toml

-1
This file was deleted.
+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env bash
22

3-
if [ -d "${HOME}/.cargo/bin" ]; then
4-
PATH="${HOME}/.cargo/bin:${PATH}"
3+
if [ -f "${HOME}/.cargo/env" ]; then
4+
# shellcheck disable=SC1091
5+
source "${HOME}/.cargo/env"
56
fi
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"neodev": {
3+
"library": {
4+
"enabled": true,
5+
"plugins": true
6+
}
7+
},
8+
"neoconf": {
9+
"plugins": {
10+
"lua_ls": {
11+
"enabled": true
12+
}
13+
}
14+
},
15+
"lspconfig": {
16+
"lua_ls": {
17+
"Lua.format.enable": false
18+
}
19+
}
20+
}
+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
-- This file simply bootstraps the installation of Lazy.nvim and then calls other files for execution
2+
-- This file doesn't necessarily need to be touched, BE CAUTIOUS editing this file and proceed at your own risk.
3+
local lazypath = vim.env.LAZY or vim.fn.stdpath "data" .. "/lazy/lazy.nvim"
4+
if not (vim.env.LAZY or (vim.uv or vim.loop).fs_stat(lazypath)) then
5+
-- stylua: ignore
6+
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable",
7+
lazypath })
8+
end
9+
vim.opt.rtp:prepend(lazypath)
10+
11+
-- validate that lazy is available
12+
if not pcall(require, "lazy") then
13+
-- stylua: ignore
14+
vim.api.nvim_echo(
15+
{ { ("Unable to load lazy from: %s\n"):format(lazypath), "ErrorMsg" }, { "Press any key to exit...", "MoreMsg" } },
16+
true, {})
17+
vim.fn.getchar()
18+
vim.cmd.quit()
19+
end
20+
21+
require "lazy_setup"
22+
require "polish"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
-- AstroCommunity: import any community modules here
2+
-- We import this file in `lazy_setup.lua` before the `plugins/` folder.
3+
-- This guarantees that the specs are processed before any user plugins.
4+
5+
---@type LazySpec
6+
return {
7+
"AstroNvim/astrocommunity",
8+
{ import = "astrocommunity.pack.lua" },
9+
{ import = "astrocommunity.colorscheme.dracula-nvim" },
10+
{ import = "astrocommunity.colorscheme.gruvbox-nvim" },
11+
-- import/override with your plugins folder
12+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
require("lazy").setup({
2+
{
3+
"AstroNvim/AstroNvim",
4+
version = "^4",
5+
import = "astronvim.plugins",
6+
opts = { -- AstroNvim options must be set here with the `import` key
7+
mapleader = " ", -- This ensures the leader key must be configured before Lazy is set up
8+
maplocalleader = ",", -- This ensures the localleader key must be configured before Lazy is set up
9+
icons_enabled = true, -- Set to false to disable icons (if no Nerd Font is available)
10+
pin_plugins = nil, -- Default will pin plugins when tracking `version` of AstroNvim, set to true/false to override
11+
},
12+
},
13+
{ import = "community" },
14+
{ import = "plugins" },
15+
} --[[@as LazySpec]], {
16+
-- Configure any other `lazy.nvim` configuration options here
17+
install = { colorscheme = { "astrodark", "habamax" } },
18+
ui = { backdrop = 100 },
19+
performance = {
20+
rtp = {
21+
-- disable some rtp plugins, add more to your liking
22+
disabled_plugins = {
23+
"gzip",
24+
"netrwPlugin",
25+
"tarPlugin",
26+
"tohtml",
27+
"zipPlugin",
28+
},
29+
},
30+
},
31+
} --[[@as LazyConfig]])

0 commit comments

Comments
 (0)