I got tired of setting up Arch the same way every time, so I wrote a script
Posted by Alarming-Function120@reddit | linux | View on Reddit | 35 comments
Every time I set up archlinux, I found myself repeating the same steps, like making a rice, installing stuff, and forgetting to install that one app (looking at you wine)
So I wrote a small script (zenmaster) to automate parts of that process.
It currently handles things like:
- focus mode for blocking distracting sites
- auto rices for you
- cleans bad packages
- gens health report
- performance mode
- saving power
It’s pretty minimal and built around my own workflow, not meant to replace dotfiles or more advanced setups.
Sharing it here in case it’s useful to someone else.
mr_dudo@reddit
Linus Torvalds is jealous of your improvement to Linux
Alarming-Function120@reddit (OP)
Lol
ZunoJ@reddit
Where do you setup arch often enough for this to make sense?
Alarming-Function120@reddit (OP)
I mean tbh it's great for beginners too
But I do setup once a week (not scheduled) to test random things out
ChrisRR@reddit
Why don't you just clone the drive rather than installing from scratch every time?
Alarming-Function120@reddit (OP)
I have to test apps on PURE TTY.
which means an installation from scratch so that I can see deps
ZunoJ@reddit
Crazy, I have a six year old arch install and a decade old gentoo install I cloned to several devices which survived multiple hardware updates. Very cool that linux truly is for everybody and supports whatever workflow you want to have
daemonpenguin@reddit
My mind boggles a bit at someone going out of their way to run Arch, a distro which requires doing the initial setup manually, and then automating the process. You've basically created an automated setup for a distro's whose main focus is not automating the setup. Which, cool, it's your time. Just seems odd to do this with Arch when most distros/desktops do most of the automation for you.
nazgand@reddit
Try [/etc/nixos/configuration.nix].
Alarming-Function120@reddit (OP)
Ooh this is meant for arch
Extension_Cup_3368@reddit
I mean, it's great, it's useful for you, you have automated something. Why would it be useful for someone else with completely different preferences/use cases/applications?
Alarming-Function120@reddit (OP)
yeh i install it once a week
also its not made to replace your setup, you can always click 'n', its just made to function as a base setup, for beginners.
PM_ME_ROMAN_NUDES@reddit
Why?
pppjurac@reddit
Too much free time on hands. Wait until he gets first girlfriend ;)
Alarming-Function120@reddit (OP)
That ain't gonna happen bruv
pppjurac@reddit
Ok, then boyfriend.
Alarming-Function120@reddit (OP)
Naww
Alarming-Function120@reddit (OP)
Stuff I have to test.
pppjurac@reddit
Use virtualisation, then you will have endless option for testing.
Alarming-Function120@reddit (OP)
What's that
SeantheWilson@reddit
Why bruh?
agentXchain_dev@reddit
Arch setup scripts usually get brittle once they mix package installs, desktop config, and one off machine tweaks. Keeping the package list declarative and the steps idempotent, then splitting dotfiles from system config, makes reruns and fresh installs a lot safer. How are you handling AUR packages and host specific stuff right now.
Alarming-Function120@reddit (OP)
It's just one script which calls out buncha scripts dedicated to package managers and extras.
clhodapp@reddit
Congratulations on taking your first step into configuration management.
Perhaps look at NixOS so you can have this declarative config without reinstalling for OS every week.
Alarming-Function120@reddit (OP)
No I like installing again it doesn't let me rust and enjoy the ui
ankhseraph@reddit
They should make an operating system where everything is done this way
crashorbit@reddit
A script is a perfectly fine way to do this. Put it in a gitlab repo so that you can track changes as you enhance it.
Tools like Ansible and terraform exist to provide just this service. Often they are overkill at smaller scale. But I've found Ansible quite useful in my home lab.
Alarming-Function120@reddit (OP)
im broke man i have 1 pc. in my entire house.
crashorbit@reddit
My home lab is mostly old throwaway hardware friends and family have cast off.
Alarming-Function120@reddit (OP)
i dont have friends and my family have windows so ew
Donteezlee@reddit
Dude offered you solid advice and you immediately cast it aside because of people using windows. You sound insufferable. Ansible is made for literally this purpose...
aloobhujiyaay@reddit
respect at some point reinstalling stops being “fun” and starts being repetitive
Upstairs_Bowl5813@reddit
Been there with the wine forgetting thing lol. Always end up realizing I need it when I'm already deep in some project and have to stop everything to install it
Your script looks pretty clean from what I can see in repository. The focus mode blocking sites is actually clever idea - might steal that concept for my own setup
Alarming-Function120@reddit (OP)
Thankyou. Yeah i do forget to install wine and im in a very important discord meeting and someone suddenly needs photoshop.
it looks clean but i bet you it isnt. its jsut a side project but im gonna polish it sooner or later (hopefully.)
thanks for the review tho
TwiKing@reddit
Cool! I made a script too that backs up all my configs and packages and I can restore them with 1 script. Interesting to see how everyone does their own personal way. :) I'm too stubborn steal someone else's scripts myself haha.