Shmua manages dot files across machines with diffs, templates and age-encrypted secrets, so a public repo stays usable.
GNU Stow simply symlinks all files from a folder into your home directory. The presenter chose Shmua for its cross-platform flexibility and because it does not rely on symlinks: it lets you check diffs between current and edited files, then copies the changes into your real config files when you apply.
Run Shmua init to create the repo, then Shmua add to track a file without changing it. Shmua edit opens it in your default editor, set via the EDITOR and VISUAL variables. Shmua diff shows the differences, and only Shmua apply copies the change over to your actual configs.
Shmua init initializes a git repo with a .git directory but no remote. Run Shmua cd to enter the source directory and use regular git: add the remote, rename the branch to main and push to origin main. Git operations are separate from Shmua diff, which compares against your home files.
Generate a key with age-keygen, either from the age binaries or built into Shmua, and store it, for example in .config shimwa-key.txt. Keep the private key safe. Move the plaintext secret to tmp, encrypt it into a secrets directory under templates with a .age extension, and set age identity and recipient in the config file.
Shmua integrates with 1Password, Bitwarden, ProtonPass, the system keyring, the pass command line utility, HashiCorp Vault, AWS Secrets Management and many more. It also supports encryption via age, which replaced GPG; the built-in version only supports asymmetric encryption, without post-quantum encryption or passphrases.
The config template checks whether the age private key file exists and sets a global data variable, has age private key, to true or false. Templates, such as the fish config, render secrets like the DeLorean home lab MAC address only when it is true, so others can apply the repo without crashing.
Run Shmua init with --apply and the repo, such as DataLab Tech TV slash .files; add --ssh if it is your own repo so the remote uses git instead of https, and --source to put files elsewhere. In a Fedora toolbox the presenter installed it with dnf, pressed enter at the key prompt, and got a minimal config.
Within a template, such blocks would be interpreted, though regular files need no worry. The workaround is to define a variable holding what you need as a string in double quotes, since it is not escaped when assigned that way, then render that variable directly where you need the value.
He considered GNU Stow, which suits people who just want symlinks, and yadm, which is very similar to Shmua. He chose Shmua because it has a lot more GitHub stars, is more widely used, does everything he wanted, and can be as simple or as complex as you desire.
“because Shmua doesn't rely on sim links but instead it's lets you check the diffs between your current files and your edited files”
“I'm not going to show it to you because it's a private key, right? It will decrypt all my secrets. So keep it safe and”
“the easiest way to you know keep your own dot files public so everybody can use them but keep”
“And so you can share your .files without that additional hassle.”
“This is very similar to Shmua, but Shmua has a lot more GitHub stars.”
“the way i see it our governments are failing us everywhere. I mean, it's from autocracies to democracies,”
“YotLD #6: Managing Linux Configs Like a Pro.” https://www.youtube.com/watch?v=_m7sJrsZfUs. Transcript summary by WhipScribe, https://whipscribe.com/transcript-pages/yotld-6-managing-linux-configs-like-a-pro.html.