mylinuxforwork / dotfiles

The ML4W Dotfiles for Hyprland - An advanced and full-featured configuration for the dynamic tiling window manager Hyprland including an easy to use installation script for Arch based Linux distributions.
GNU General Public License v3.0
436 stars 46 forks source link

[FEATURE] Automatic ML4W Dotfiles installation script #8

Closed mylinuxforwork closed 1 month ago

mylinuxforwork commented 1 month ago

Would be great if the ML4W Dotfiles could be installed completely (with only few manual confirmation) through the installation script.

99linesofcode commented 1 month ago

Perhaps slightly off topic but on Gitlab I mentioned potentially moving to a Nix home-manager backed solution to make things cross platform among other benefits (declarative syntax, rollbacks, nix shell for easy development/testing etc.). What are your thoughts on that?

mylinuxforwork commented 1 month ago

Thanks for your feedback. But I am not sure if I understand your request. Can you share more details how it should work from a user perspective? Thank you.

99linesofcode commented 1 month ago

So, NixOS is a Linux distro with its own package manager Nix. It's different from other package managers in that it is a functional programming language and framework for declaratively describing and configuring your whole OS. Then there is the concept of nix shell and nix develop to quickly spin up a virtual environment in which to test packages or temporarily load a development environment which I won't go into right now.

In addition to the package manager itself there is home-manager. This is specifically intended for managing user configuration (dotfiles) separately.

Key reasons why I would recommend building ML4W on top or around of it are:

  1. It already has a framework in place for many things you are doing here and will require much less setup/maintenance when adding or removing packages;
  2. Loading new changes is a matter of running home-manager switch and you can always go back to a previous generation if something broke;
  3. It's declarative so very easy to read once you got the syntax down and 100% reproducible;
  4. It allows for easy customization without a hand rolled solution like the one we discussed/explored earlier on Gitlab.

Updating the system themes and such on the fly might require a different approach and naturally you will be using a separate package manager for everything added by ML4W so there are definitely some trade offs to be considered.

I'm still getting my feet wet myself but am working on a MVP based on some examples I've found online. Will gladly share that with you and walk you through it if you are interested.

Edit: spelling

mylinuxforwork commented 1 month ago

Thanks for your detailed explanations. I know the fundamentals of Nix but not all the details. The home manager concept sounds interesting.

I will add a installation config file to the installer to automate the complete installation/update process.

Looking forward to the results of your experiments. Please share it then.

mylinuxforwork commented 1 month ago

@99linesofcode The automation of the installation/update is now available on the rolling release. Feel free to test it: https://github.com/mylinuxforwork/dotfiles/wiki/Automation-of-the-installation-and-update