Skip to content

feat: modular installer architecture#63

Open
Ast1gmatism wants to merge 5 commits into
ilyamiro:masterfrom
Ast1gmatism:pr/modular-installer-clean
Open

feat: modular installer architecture#63
Ast1gmatism wants to merge 5 commits into
ilyamiro:masterfrom
Ast1gmatism:pr/modular-installer-clean

Conversation

@Ast1gmatism

Copy link
Copy Markdown

splits that gigantic install.sh into separate files under lib/ – one for packages, one for themes, one for the TUI, and so on. the main script now just calls a few clear functions: detect the OS, ask the user what they want, install packages, copy dotfiles, apply settings, and that's it. no behavior is changed – all old features (keyboard setup, driver detection, etc.) work exactly like before

the original script was very hard to do something in it without breaking something. now each module is self-contained, and the main() function shows the whole installation pipeline

@ilyamiro

ilyamiro commented May 2, 2026

Copy link
Copy Markdown
Owner

Yeah man, wanted to do this for a while. Ima merge this real quick.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors the installer into a modular lib/ architecture and turns install.sh into a small entrypoint that initializes state, runs the TUI, and executes the install pipeline via module functions.

Changes:

  • Split prior monolithic installer logic into dedicated modules (lib/*) for TUI, detection, packages, dotfiles, services, theming, settings, and telemetry.
  • Replaced the previous inlined flow with a main() pipeline that calls clear, single-purpose functions in order.
  • Centralized constants (version, URLs, package lists) into lib/constants.sh.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
install.sh New entrypoint that sources modules, initializes state, runs TUI, and executes install pipeline.
lib/constants.sh Centralizes versioning, URLs, paths, colors, and base package list.
lib/detect.sh OS/hardware/user-dir/DM detection helpers.
lib/tui.sh fzf-based interactive menus for packages, drivers, keyboard, weather, telemetry, and options.
lib/packages.sh Dependency bootstrap, conflict resolution, package install loop, NVIDIA initramfs handling.
lib/dotfiles.sh Repo setup/pull/clone logic, wallpaper fetching, dotfile copy/update, weather env persistence.
lib/settings.sh Syncs installer-owned settings into settings.json and merges keybinds/startups.
lib/services.sh Display manager + SDDM theme setup, audio, easyeffects, network, zsh, version state saving.
lib/theming.sh Fonts install, system adaptations, env injection, gtk/qt setup, completion output.
lib/telemetry.sh Telemetry ID generation and event POSTing.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/tui.sh
Comment on lines +454 to +456
echo -e "anonymous hardware statistics when you start the installation.\n"
echo -e "${BOLD}What is sent if enabled:${RESET}"
echo -e " - Script Version, OS Name, Kernel, RAM, DE, CPU, GPU\n"
Comment thread lib/services.sh
readonly property color green: "#a6e3a1"
}
EOF
sudo chown "$USER:$USER" /usr/share/sddm/themes/matugen-minimal/Colors.qml
Comment thread lib/detect.sh Outdated
Comment on lines +1 to +3

#!/usr/bin/env bash

Comment thread lib/dotfiles.sh Outdated
Comment on lines +17 to +19
echo " -> [--local] Используется локальная версия: $REPO_DIR, git pull пропущен"
else
echo -e "${C_RED}[--local] .git не найден рядом со скриптом ($SCRIPT_OWN_DIR).${RESET}"
Comment thread install.sh Outdated
Comment on lines +120 to +121
setup_display_manager
setup_repo
Comment thread install.sh Outdated
HAS_NVIDIA_PROPRIETARY=false
LAST_COMMIT=""
KEEP_OLD_ENV=true
ENABLE_TELEMETRY=false
Comment thread lib/telemetry.sh
Comment on lines +15 to +37
case "$mode" in
init)
payload=$(cat <<EOF
{
"type": "init",
"version": "${DOTS_VERSION}",
"id": "${TELEMETRY_ID}",
"os": "${OS_NAME//\"/\\\"}"
}
EOF
)
;;
full)
payload=$(cat <<EOF
{
"type": "full",
"version": "${DOTS_VERSION}",
"id": "${TELEMETRY_ID}",
"os": "${OS_NAME//\"/\\\"}"
}
EOF
)
;;
@ilyamiro

ilyamiro commented May 2, 2026

Copy link
Copy Markdown
Owner

Okay, so 1. Why did you change the telemetry to off by default? You said no behavior was changed. 2. The setup display manager has to come after setting up the repo since, well, if the user setups sddm, the script wouldn't have the needed files for it. 3. Why are there russian logs? where does that even come from? seems like you got confused. @Ast1gmatism fix those, and I can merge.

@ilyamiro

ilyamiro commented May 2, 2026

Copy link
Copy Markdown
Owner

Its there going to be any response on this? Cause if not, ill do it myself

@Ast1gmatism

Copy link
Copy Markdown
Author

sorry about the telemetry, will fix that and other things now

@ilyamiro

ilyamiro commented May 3, 2026

Copy link
Copy Markdown
Owner

Oh yeah, and the whole "apply once" pr that you made is probably good, but I wouldn't wanna merge it. Are you sure there is nothing in this PR that relates to that?

@ilyamiro

ilyamiro commented May 3, 2026

Copy link
Copy Markdown
Owner

hey @Ast1gmatism so I am grateful for your PR and i think this is good, but the issue is that I have just reviewed another PR that adds some GUI functionality and it is good, but it relies on the old install.sh. Resolving conflicts would be too long and unproductive, so I think what I am going to do is to merge the PR #57 and then if you can resolve all the branch conflicts i could merge this too.

@Ast1gmatism

Copy link
Copy Markdown
Author

ok, no problem, thanks for the review. will wait to #57 and fix things up after that

@Ast1gmatism

Copy link
Copy Markdown
Author

@ilyamiro saw your reply on that PR, what did you end up deciding to do?

@ilyamiro

ilyamiro commented May 3, 2026

Copy link
Copy Markdown
Owner

Hey so the problem with the whole setup was that using sed or grep or whatever for inline changing of the config is very fragile. I have decided to move to just generating .conf files from templates to eliminate any problems. That virtually makes all of the "adaptability" phase in the installer useless. Im not sure where im gonna go with splitting the files but i will let you know. Okay?

@Ast1gmatism

Copy link
Copy Markdown
Author

thinking about it - would it be easier to merge this modular split now and then rework the adaptability phase on top of it? the new structure keeps things isolated, so swapping the sed stuff for templates wouldn't touch the rest. but I'm fine waiting too, just an idea. let me know

@ilyamiro

ilyamiro commented May 3, 2026

Copy link
Copy Markdown
Owner

I just wanna keep everything sorted in my mind before i merge this and i agree that this is good but give me a day or two and i will come back to you.

@Ast1gmatism
Ast1gmatism force-pushed the pr/modular-installer-clean branch from 99ad5f2 to 5a42883 Compare May 5, 2026 21:24
@Ast1gmatism

Copy link
Copy Markdown
Author

@ilyamiro just rebased on latest upstream and resolved all conflicts, ready for review when you have time

@ilyamiro

ilyamiro commented May 6, 2026

Copy link
Copy Markdown
Owner

@Ast1gmatism new install.sh needs to have DOTS version, the way my updates work is that the server checks this version file. Could you add that?

@ilyamiro

ilyamiro commented May 6, 2026

Copy link
Copy Markdown
Owner

also, can you make sure there are not trailing whitespaces in any of the files?

@Ast1gmatism

Copy link
Copy Markdown
Author

sure

@Ast1gmatism

Copy link
Copy Markdown
Author

dont merge this branch yet, just found a bug in settings apply logic

@ilyamiro

ilyamiro commented May 6, 2026

Copy link
Copy Markdown
Owner

Wait wait, is this the same logic I have in my original install.sh, or are you fixing my logic?

@Ast1gmatism

Copy link
Copy Markdown
Author

done, now everything should work

@Ast1gmatism

Copy link
Copy Markdown
Author

about backup, i tried to fix it because splitting into full and partial install broke the local paths. i fixed that part, but the underlying logic stayed the same, and the new installer now behaves like the original

@Ast1gmatism

Copy link
Copy Markdown
Author

@ilyamiro what do you think?

@ilyamiro
ilyamiro force-pushed the master branch 4 times, most recently from cbab0e0 to 03cc319 Compare May 12, 2026 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants