diff --git a/.dotter/almighty.toml b/.dotter/almighty.toml deleted file mode 100644 index 5d48e73..0000000 --- a/.dotter/almighty.toml +++ /dev/null @@ -1,8 +0,0 @@ -packages = ["cli", "dev", "mise", "hyprland"] - -[files] - -[variables] -nvim-core = true -nvim-base = true -nvim-ide = true diff --git a/.dotter/devbox.toml b/.dotter/devbox.toml deleted file mode 100644 index 7709e32..0000000 --- a/.dotter/devbox.toml +++ /dev/null @@ -1,6 +0,0 @@ -includes = [] -packages = ["default", "cli", "dev"] - -[files] - -[variables] diff --git a/.dotter/global.toml b/.dotter/global.toml deleted file mode 100644 index eeb6499..0000000 --- a/.dotter/global.toml +++ /dev/null @@ -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" diff --git a/.dotter/handlebars_helpers/flatten_table.rhai b/.dotter/handlebars_helpers/flatten_table.rhai deleted file mode 100644 index 30ee4f9..0000000 --- a/.dotter/handlebars_helpers/flatten_table.rhai +++ /dev/null @@ -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 diff --git a/.dotter/handlebars_helpers/header.rhai b/.dotter/handlebars_helpers/header.rhai deleted file mode 100644 index 1a35fc7..0000000 --- a/.dotter/handlebars_helpers/header.rhai +++ /dev/null @@ -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(); - diff --git a/.dotter/machines/fedora.toml b/.dotter/machines/fedora.toml deleted file mode 100644 index ee05f71..0000000 --- a/.dotter/machines/fedora.toml +++ /dev/null @@ -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", -] diff --git a/.dotter/post_deploy.sh b/.dotter/post_deploy.sh deleted file mode 100644 index db1b97d..0000000 --- a/.dotter/post_deploy.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -sha256sum .dotter/cache/.dotter/pre_deploy.sh >.dotter/cache/pre_deploy.checksum diff --git a/.dotter/pre_deploy.sh b/.dotter/pre_deploy.sh deleted file mode 100755 index ed5fcf7..0000000 --- a/.dotter/pre_deploy.sh +++ /dev/null @@ -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}" <