change dotfile manager to tuckr
This commit is contained in:
parent
5efa1c4ce5
commit
f181cd388a
206 changed files with 18 additions and 1329 deletions
|
|
@ -1,8 +0,0 @@
|
||||||
packages = ["cli", "dev", "mise", "hyprland"]
|
|
||||||
|
|
||||||
[files]
|
|
||||||
|
|
||||||
[variables]
|
|
||||||
nvim-core = true
|
|
||||||
nvim-base = true
|
|
||||||
nvim-ide = true
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
includes = []
|
|
||||||
packages = ["default", "cli", "dev"]
|
|
||||||
|
|
||||||
[files]
|
|
||||||
|
|
||||||
[variables]
|
|
||||||
|
|
@ -1,91 +0,0 @@
|
||||||
[settings]
|
|
||||||
default_target_type = "automatic"
|
|
||||||
|
|
||||||
[helpers]
|
|
||||||
flatten_table = ".dotter/handlebars_helpers/flatten_table.rhai"
|
|
||||||
header = ".dotter/handlebars_helpers/header.rhai"
|
|
||||||
|
|
||||||
# CLI package
|
|
||||||
[cli]
|
|
||||||
depends = ["helix", "nvim", "zsh", "fzf", "starship"]
|
|
||||||
|
|
||||||
[cli.variables]
|
|
||||||
nerd_font = "JetBrainsMono"
|
|
||||||
|
|
||||||
[cli.files]
|
|
||||||
"config/bat" = "~/.config/bat"
|
|
||||||
"config/ghostty" = "~/.config/ghostty"
|
|
||||||
"config/kitty" = { target = "~/.config/kitty", type = "symbolic" }
|
|
||||||
"config/sesh" = "~/.config/sesh"
|
|
||||||
"config/tmux" = "~/.config/tmux"
|
|
||||||
"config/yazi" = "~/.config/yazi"
|
|
||||||
"config/zellij" = "~/.config/zellij"
|
|
||||||
|
|
||||||
[dev]
|
|
||||||
depends = ["rust"]
|
|
||||||
|
|
||||||
[dev.files]
|
|
||||||
"config/git" = "~/.config/git"
|
|
||||||
"config/lazygit" = { target = "~/.config/lazygit", type = "symbolic" }
|
|
||||||
"config/zed" = "~/.config/zed"
|
|
||||||
|
|
||||||
[zsh.files]
|
|
||||||
"config/zsh/zshrc" = "~/.zshrc"
|
|
||||||
"config/zsh/zprofile" = "~/.zprofile"
|
|
||||||
"config/zsh/aliases" = { target = "~/.config/zsh/aliases", type = "symbolic" }
|
|
||||||
"config/zsh/completions" = { target = "~/.config/zsh/completions", type = "symbolic" }
|
|
||||||
"config/zsh/functions" = "~/.config/zsh/functions"
|
|
||||||
|
|
||||||
[fzf.files]
|
|
||||||
"config/fzf" = "~/.config/fzf"
|
|
||||||
|
|
||||||
[starship.files]
|
|
||||||
"config/starship.toml" = "~/.config/starship.toml"
|
|
||||||
|
|
||||||
[nushell.files]
|
|
||||||
"config/nushell" = "~/.config/nushell"
|
|
||||||
|
|
||||||
[helix.files]
|
|
||||||
"config/helix" = "~/.config/helix"
|
|
||||||
|
|
||||||
[nvim.files]
|
|
||||||
"config/nvim" = "~/.config/nvim"
|
|
||||||
"config/nvim_unstable" = "~/.config/nvim-unstable"
|
|
||||||
[nvim.files."config/nvim/lua/aleidk/lazy.lua"]
|
|
||||||
target = "~/.config/nvim/lua/aleidk/lazy.lua"
|
|
||||||
type = "template"
|
|
||||||
prepend = """
|
|
||||||
local enabled_plugins = {
|
|
||||||
nvim_core = {{ nvim-core }},
|
|
||||||
nvim_base = {{ nvim-base }},
|
|
||||||
nvim_ide = {{ nvim-ide }},
|
|
||||||
}
|
|
||||||
|
|
||||||
"""
|
|
||||||
|
|
||||||
# Handle package activation from Lazy instead of dotter
|
|
||||||
# This will prevent conflics in lazy-lock.json for having different plugins
|
|
||||||
[nvim.variables]
|
|
||||||
nvim-core = true
|
|
||||||
nvim-base = false
|
|
||||||
nvim-ide = false
|
|
||||||
|
|
||||||
[rust.variables]
|
|
||||||
cargo.packages = []
|
|
||||||
|
|
||||||
[mise.files]
|
|
||||||
"config/mise" = "~/.config/mise"
|
|
||||||
|
|
||||||
[wm.files]
|
|
||||||
"config/mako" = "~/.config/mako"
|
|
||||||
"config/swappy" = "~/.config/swappy"
|
|
||||||
"config/waybar" = "~/.config/waybar/"
|
|
||||||
"config/rofi" = "~/.config/rofi"
|
|
||||||
"config/wpaperd" = "~/.config/wpaperd"
|
|
||||||
"config/wlogout" = "~/.config/wlogout"
|
|
||||||
|
|
||||||
[hyprland]
|
|
||||||
depends = ["wm"]
|
|
||||||
|
|
||||||
[hyprland.files]
|
|
||||||
"config/hypr" = "~/.config/hypr"
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
||||||
/*
|
|
||||||
* Flatten a table into a list of values.
|
|
||||||
* The table has to be in the form of
|
|
||||||
* ```toml
|
|
||||||
* [table.subtable]
|
|
||||||
* variable1 = ["value1", "value2"]
|
|
||||||
*
|
|
||||||
* [table.subtable]
|
|
||||||
* variable2 = ["value3", "value4"]
|
|
||||||
*
|
|
||||||
* then we use it in handlerbars like this:
|
|
||||||
*
|
|
||||||
* {{ flatten_table table.subtable }}
|
|
||||||
*
|
|
||||||
* and it will return an array with all the arrays of subtable
|
|
||||||
*/
|
|
||||||
|
|
||||||
if type_of(params[0]) != "map" {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
let table = params[0];
|
|
||||||
|
|
||||||
let result = [];
|
|
||||||
|
|
||||||
for value in table.values() {
|
|
||||||
result.append(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
result
|
|
||||||
|
|
@ -1,48 +0,0 @@
|
||||||
let x_padding = hash["padding"] ?? 50;
|
|
||||||
|
|
||||||
let header = #{
|
|
||||||
x_padding: x_padding,
|
|
||||||
out: "",
|
|
||||||
append: |suffix| {
|
|
||||||
this.out += suffix + "\n";
|
|
||||||
},
|
|
||||||
append_center: |suffix| {
|
|
||||||
|
|
||||||
let suffix_len = suffix.len();
|
|
||||||
let padding = this.x_padding - suffix_len / 2;
|
|
||||||
let fill = "";
|
|
||||||
fill.pad(padding, " ");
|
|
||||||
|
|
||||||
this.out += fill + suffix.to_upper() + fill + "\n";
|
|
||||||
},
|
|
||||||
append_divider: || {
|
|
||||||
let divider = "";
|
|
||||||
divider.pad(this.x_padding * 2, "─");
|
|
||||||
|
|
||||||
this.append(divider);
|
|
||||||
},
|
|
||||||
open_echo: || {
|
|
||||||
this.out += "echo -e '\n";
|
|
||||||
},
|
|
||||||
close_echo: || {
|
|
||||||
this.out += "'";
|
|
||||||
},
|
|
||||||
to_string: || {
|
|
||||||
return this.out;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
header.open_echo();
|
|
||||||
|
|
||||||
header.append_divider();
|
|
||||||
|
|
||||||
|
|
||||||
params.for_each(|idx| {
|
|
||||||
header.append_center(this);
|
|
||||||
});
|
|
||||||
|
|
||||||
header.append_divider();
|
|
||||||
header.close_echo();
|
|
||||||
|
|
||||||
return header.to_string();
|
|
||||||
|
|
||||||
|
|
@ -1,66 +0,0 @@
|
||||||
# Dotter only support merging tables, and put the key-values into the global scope of the tables
|
|
||||||
# If we try to use the same variable name in a package, it will throw an error
|
|
||||||
# if we try to use the same key in a nested table, it will be overriden with the last value
|
|
||||||
#
|
|
||||||
# the fix to this is to have a table with unique keys, this is supported by handlerbars {{#each}} directive
|
|
||||||
# but will give us an array as value, so we need to flatten it
|
|
||||||
|
|
||||||
[utils.variables]
|
|
||||||
pkg-install = "sudo dnf install -y"
|
|
||||||
|
|
||||||
[cli.variables.copr]
|
|
||||||
cli = [
|
|
||||||
"atim/lazygit",
|
|
||||||
"atim/starship"
|
|
||||||
]
|
|
||||||
|
|
||||||
[cli.variables.packages]
|
|
||||||
cli = [
|
|
||||||
"bat",
|
|
||||||
"dnf-plugin-system-upgrade",
|
|
||||||
"duf",
|
|
||||||
"eza",
|
|
||||||
"fd-find",
|
|
||||||
# "firefox-dev",
|
|
||||||
"flatpak",
|
|
||||||
"fzf",
|
|
||||||
"git",
|
|
||||||
"kitty",
|
|
||||||
"lazygit",
|
|
||||||
"neovim",
|
|
||||||
"remove-retired-packages",
|
|
||||||
"ripgrep",
|
|
||||||
"sd",
|
|
||||||
"starship",
|
|
||||||
"tealdeer",
|
|
||||||
"zoxide",
|
|
||||||
"zsh",
|
|
||||||
]
|
|
||||||
|
|
||||||
[dev.variables.packages]
|
|
||||||
dev = [
|
|
||||||
"gcc",
|
|
||||||
"gcc-c++",
|
|
||||||
"just",
|
|
||||||
"nodejs",
|
|
||||||
"openssl",
|
|
||||||
"openssl-devel",
|
|
||||||
"tmux",
|
|
||||||
"tree-sitter-cli",
|
|
||||||
]
|
|
||||||
[dev.variables.cargo.packages]
|
|
||||||
dev = [
|
|
||||||
"cocogitto"
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
[zsh.variables.packages]
|
|
||||||
zsh = [
|
|
||||||
"zsh"
|
|
||||||
]
|
|
||||||
|
|
||||||
[rust.variables.cargo.packages]
|
|
||||||
rust = [
|
|
||||||
"yazi-fm",
|
|
||||||
"yazi-cli",
|
|
||||||
]
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
sha256sum .dotter/cache/.dotter/pre_deploy.sh >.dotter/cache/pre_deploy.checksum
|
|
||||||
|
|
@ -1,98 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
# shellcheck disable=all
|
|
||||||
# This is a handlerbars template, so ignore issues
|
|
||||||
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
checksum_file=".dotter/cache/pre_deploy.checksum"
|
|
||||||
|
|
||||||
if [[ -e "$checksum_file" ]] && sha256sum --check "$checksum_file" >/dev/null 2>&1; then
|
|
||||||
echo "Pre deploy script has not changed, skiping script execution"
|
|
||||||
echo "To override this, remove the checksum file: $checksum_file"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
{{!~ Detect the distribution ~}}
|
|
||||||
{{~ assign "distro" (trim (command_output "awk -F= '/^ID=/ {print $2}' /etc/os-release | tr -d '\"'")) ~}}
|
|
||||||
|
|
||||||
{{ header "Running pre deploy script for distro" (to_title_case distro) }}
|
|
||||||
|
|
||||||
{{ #if (is_executable "sudo") }}
|
|
||||||
{{ header "Configuring sudo" }}
|
|
||||||
|
|
||||||
SUDOERS_FILE="/etc/sudoers.d/01-user"
|
|
||||||
|
|
||||||
if [[ -e "${SUDOERS_FILE}" ]]; then
|
|
||||||
echo "Sudo configuration already exists, to override it remove the file: ${SUDOERS_FILE}"
|
|
||||||
exit 0
|
|
||||||
else
|
|
||||||
sudo -B tee "${SUDOERS_FILE}" <<EOF
|
|
||||||
Defaults pwfeedback
|
|
||||||
Defaults timestamp_timeout=10
|
|
||||||
Defaults timestamp_type=global
|
|
||||||
EOF
|
|
||||||
|
|
||||||
sudo chmod 0440 "${SUDOERS_FILE}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
{{ /if }}
|
|
||||||
|
|
||||||
{{#if (eq distro "fedora") ~}}
|
|
||||||
|
|
||||||
{{! extract the copr repositories variable }}
|
|
||||||
{{~ assign "copr" (flatten_table copr) ~}}
|
|
||||||
|
|
||||||
{{#if (ne (len copr) 0) ~}}
|
|
||||||
{{ header "Enabling copr repositories" }}
|
|
||||||
|
|
||||||
{{# each copr }}
|
|
||||||
sudo -B dnf copr enable -y '{{ this }}'
|
|
||||||
{{ /each }}
|
|
||||||
|
|
||||||
{{~ /if }}
|
|
||||||
|
|
||||||
{{ header "Installing dnf packages" }}
|
|
||||||
sudo -B dnf install -y {{~# each (flatten_table packages) }} '{{ this }}' {{~ /each }}
|
|
||||||
|
|
||||||
{{~ /if }}
|
|
||||||
|
|
||||||
{{ #if dotter.packages.zsh }}
|
|
||||||
|
|
||||||
[ "$SHELL" != "$(which zsh)" ] && chsh -s "$(which zsh)"
|
|
||||||
|
|
||||||
{{ /if }}
|
|
||||||
|
|
||||||
{{#if (and dotter.packages.rust (not (is_executable "cargo"))) }}
|
|
||||||
|
|
||||||
{{ header "Installing rust" }}
|
|
||||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path --default-toolchain stable
|
|
||||||
|
|
||||||
{{ /if }}
|
|
||||||
|
|
||||||
{{#if (and dotter.packages.rust (ne (len cargo.packages) 0)) }}
|
|
||||||
|
|
||||||
{{ header "Installing crates" }}
|
|
||||||
|
|
||||||
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
|
|
||||||
|
|
||||||
cargo binstall --locked {{# each (flatten_table cargo.packages) }} "{{ this }}" {{ /each }}
|
|
||||||
|
|
||||||
{{ /if }}
|
|
||||||
|
|
||||||
{{ #if dotter.packages.cli }}
|
|
||||||
|
|
||||||
{{ #if not( command_success "fc-list | grep JetBrains")}}
|
|
||||||
|
|
||||||
{{ header "Configuring Nerd Fonts" }}
|
|
||||||
|
|
||||||
FONT_DIR="$HOME/.local/share/fonts"
|
|
||||||
mkdir -p "$FONT_DIR"
|
|
||||||
tmp_dir=$(mktemp -d)
|
|
||||||
|
|
||||||
curl -L https://github.com/ryanoasis/nerd-fonts/releases/latest/download/{{ nerd_font }}.zip -o "$tmp_dir/{{ nerd_font}}.zip"
|
|
||||||
unzip -o "$tmp_dir/{{nerd_font}}.zip" -d ${FONT_DIR}/{{ nerd_font }}
|
|
||||||
{{ /if }}
|
|
||||||
|
|
||||||
{{ /if }}
|
|
||||||
|
|
||||||
{{ header "Done :3" }}
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
includes = [".dotter/machines/fedora.toml"]
|
|
||||||
packages = ["cli", "dev"]
|
|
||||||
|
|
||||||
[files]
|
|
||||||
|
|
||||||
[variables]
|
|
||||||
nvim-core = true
|
|
||||||
nvim-base = true
|
|
||||||
nvim-ide = true
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
includes = [".dotter/machines/fedora.toml"]
|
|
||||||
packages = ["cli", "dev", "mise", "hyprland"]
|
|
||||||
|
|
||||||
[files]
|
|
||||||
|
|
||||||
[variables]
|
|
||||||
nvim-core = true
|
|
||||||
nvim-base = true
|
|
||||||
nvim-ide = true
|
|
||||||
|
Before Width: | Height: | Size: 313 KiB After Width: | Height: | Size: 313 KiB |
|
|
@ -1,7 +1,5 @@
|
||||||
{
|
{
|
||||||
"CopilotChat.nvim": { "branch": "canary", "commit": "3968c25e9418a544d5faa3c242d577526b0710e7" },
|
|
||||||
"LuaSnip": { "branch": "master", "commit": "0f7bbce41ea152a94d12aea286f2ce98e63c0f58" },
|
"LuaSnip": { "branch": "master", "commit": "0f7bbce41ea152a94d12aea286f2ce98e63c0f58" },
|
||||||
"blink-cmp-copilot": { "branch": "main", "commit": "e3eedf36ceda1932e296ec894de4ceea8ddeacb6" },
|
|
||||||
"blink.cmp": { "branch": "main", "commit": "81069e3955a8b4d5063287a2a6a47a844e9ca2cb" },
|
"blink.cmp": { "branch": "main", "commit": "81069e3955a8b4d5063287a2a6a47a844e9ca2cb" },
|
||||||
"blink.compat": { "branch": "main", "commit": "08943fdf2eb00432d6205db6d0239434135416bd" },
|
"blink.compat": { "branch": "main", "commit": "08943fdf2eb00432d6205db6d0239434135416bd" },
|
||||||
"catppuccin": { "branch": "main", "commit": "faf15ab0201b564b6368ffa47b56feefc92ce3f4" },
|
"catppuccin": { "branch": "main", "commit": "faf15ab0201b564b6368ffa47b56feefc92ce3f4" },
|
||||||
|
|
@ -9,13 +7,12 @@
|
||||||
"comment-box.nvim": { "branch": "main", "commit": "06bb771690bc9df0763d14769b779062d8f12bc5" },
|
"comment-box.nvim": { "branch": "main", "commit": "06bb771690bc9df0763d14769b779062d8f12bc5" },
|
||||||
"conform.nvim": { "branch": "master", "commit": "a203480a350b03092e473bf3001733d547160a73" },
|
"conform.nvim": { "branch": "master", "commit": "a203480a350b03092e473bf3001733d547160a73" },
|
||||||
"copilot-lualine": { "branch": "main", "commit": "f40450c3e138766026327e7807877ea860618258" },
|
"copilot-lualine": { "branch": "main", "commit": "f40450c3e138766026327e7807877ea860618258" },
|
||||||
"copilot.lua": { "branch": "master", "commit": "f8d8d872bb319f640d5177dad5fbf01f7a16d7d0" },
|
|
||||||
"dressing.nvim": { "branch": "master", "commit": "fc78a3ca96f4db9f8893bb7e2fd9823e0780451b" },
|
"dressing.nvim": { "branch": "master", "commit": "fc78a3ca96f4db9f8893bb7e2fd9823e0780451b" },
|
||||||
"friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" },
|
"friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" },
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "5f808b5e4fef30bd8aca1b803b4e555da07fc412" },
|
"gitsigns.nvim": { "branch": "main", "commit": "5f808b5e4fef30bd8aca1b803b4e555da07fc412" },
|
||||||
"grapple.nvim": { "branch": "main", "commit": "b41ddfc1c39f87f3d1799b99c2f0f1daa524c5f7" },
|
"grapple.nvim": { "branch": "main", "commit": "b41ddfc1c39f87f3d1799b99c2f0f1daa524c5f7" },
|
||||||
"indent-blankline.nvim": { "branch": "master", "commit": "7871a88056f7144defca9c931e311a3134c5d509" },
|
"indent-blankline.nvim": { "branch": "master", "commit": "7871a88056f7144defca9c931e311a3134c5d509" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "7e6c863bc7563efbdd757a310d17ebc95166cef3" },
|
"lazy.nvim": { "branch": "main", "commit": "56ead98e05bb37a4ec28930a54d836d033cf00f2" },
|
||||||
"lazydev.nvim": { "branch": "main", "commit": "f59bd14a852ca43db38e3662395354cb2a9b13e0" },
|
"lazydev.nvim": { "branch": "main", "commit": "f59bd14a852ca43db38e3662395354cb2a9b13e0" },
|
||||||
"lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" },
|
"lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" },
|
||||||
"luvit-meta": { "branch": "main", "commit": "57d464c4acb5c2e66bd4145060f5dc9e96a7bbb7" },
|
"luvit-meta": { "branch": "main", "commit": "57d464c4acb5c2e66bd4145060f5dc9e96a7bbb7" },
|
||||||
|
|
@ -21,9 +21,9 @@ vim.opt.rtp:prepend(lazypath)
|
||||||
-- See: .dotter/global.toml inside [nvim.files] & [nvim.variables] table
|
-- See: .dotter/global.toml inside [nvim.files] & [nvim.variables] table
|
||||||
require("lazy").setup({
|
require("lazy").setup({
|
||||||
spec = {
|
spec = {
|
||||||
{ import = "aleidk.plugins-core", enabled = enabled_plugins.nvim_core },
|
{ import = "aleidk.plugins-core" },
|
||||||
{ import = "aleidk.plugins-base", enabled = enabled_plugins.nvim_base },
|
{ import = "aleidk.plugins-base" },
|
||||||
{ import = "aleidk.plugins-ide", enabled = enabled_plugins.nvim_ide },
|
{ import = "aleidk.plugins-ide" },
|
||||||
},
|
},
|
||||||
|
|
||||||
install = { colorscheme = { "catppuccin" } },
|
install = { colorscheme = { "catppuccin" } },
|
||||||
|
|
@ -40,6 +40,11 @@ return {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
pickers = {
|
||||||
|
find_files = {
|
||||||
|
hidden = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
telescope.setup(opts)
|
telescope.setup(opts)
|
||||||
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue