#nixos is too complex for me, so I decided to write a 110 lines Python script to help manage a fixed list of packages on #archlinux

It reports inconsistencies between your requested packages list and what's actually on the system.

The list can contain inline comments and group packages.

Basically, a declarative Archlinux packages helper. Anyone interested?

PS : I have a bug to report in pacman and I'm unable to get an account on the gitlab (they didn't reply to my mail).

#sysadmin

@bug wait until you discover #ansible

@monotux it's funny you say that, because I gave yet another chance to Ansible yesterday, and I'm never going to use it ever again.

Gather facts disabled, explicit python interpreter path, control master for persistent ssh connection, disabled the package cache update: it still takes 22 seconds to execute zero change for syncing one file and checking the presence of a package. A simple equivalent ssh command, 490 ms.

@bug yes, it is slow, and a script like yours is faster.

but that is not the point. the point is that you can use the same interface (yaml lol) to interface with APIs, machines, orchestrate changes on clusters et c all without reinventing the wheel. a terrifying amount of manufacturers and projects have ansible collections available.

its like the old saying regarding perl and c, "with c you can write a fast program, but with perl you can write a program fast". scripts will be faster but at some point you will end up reinventing the wheel again and again, where you might save time just using ansible.

@monotux it's not just slow, it's unusable at this point.

Anyway, the script goes a little further than just a list of packages. It makes sure you have your dependency tree sane.

@bug *raises hand* I'd be interested! (I'd also love to just switch to Nix, but that sounds like a 2-weekend-and-it-keeps-going project, so maybe not right away 😂)
Curious if your script supports pinning versions already (similar to the result of running `downgrade`).

@bojidar_bg for now it lives here: https://github.com/ubitux/scripts/blob/detpkg/bin/detpkg (I will merge it into main or make a dedicated repo if it raises more interest).

I added the ability to run it remotely and various other improvements.

scripts/bin/detpkg at detpkg · ubitux/scripts

Miscellaneous scripts. Contribute to ubitux/scripts development by creating an account on GitHub.

GitHub
@bug Are you aware that there are other declarative style solutions out there for Arch? https://github.com/CyberShadow/aconfmgr for one.
GitHub - CyberShadow/aconfmgr: A configuration manager for Arch Linux

A configuration manager for Arch Linux. Contribute to CyberShadow/aconfmgr development by creating an account on GitHub.

GitHub