Simple bidirectional config tool https://doc.getconfigured.org
  • Lua 90%
  • Nix 4%
  • Just 3.3%
  • Shell 2.7%
Find a file
2025-06-25 17:25:58 +03:00
.forgejo implement apply and recalibrate as sketches 2025-02-20 08:56:29 +03:00
.github/ISSUE_TEMPLATE Update issue templates 2025-04-08 15:12:22 +03:00
.vscode general changes to various pieces of documentation 2025-04-08 18:59:15 +03:00
docs regret myself more 2025-06-10 19:33:29 +03:00
spec add linting and tests 2025-05-07 13:54:36 +03:00
src add key set and key get actions 2025-06-25 17:22:26 +03:00
utils regret myself more 2025-06-10 19:33:29 +03:00
.editorconfig Add editorconfig 2024-09-16 21:38:00 -07:00
.envrc set compiler dependency to clang 2024-10-28 22:31:52 +03:00
.gitattributes make latex linguist-detectable 2025-04-08 15:22:29 +03:00
.gitignore add proper ignore 2025-04-08 15:00:19 +03:00
.luarc.json Add vscode extension recommendation 2024-09-16 21:41:28 -07:00
.tool-versions implement a new build system 2025-05-07 11:29:24 +03:00
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md 2024-10-29 12:29:53 +03:00
CONTRIBUTING.md scream into the contributing guidelines because you MUST NOT commit to main 2025-06-10 20:31:53 +03:00
flake.lock Switched to unstable to make nixfmt-tree work. 2025-05-07 15:30:33 +02:00
flake.nix Added a environment variable. 2025-05-07 15:58:26 +02:00
Justfile - add copyright banner to README.tex 2025-05-27 13:13:11 +03:00
lament-dev-1.rockspec add more command line syntax 2025-06-05 22:52:02 +03:00
LICENSE add license 2024-10-26 21:16:07 +03:00
README.md Reorganise code to follow https://github.com/luarocks/lua-style-guide 2024-10-28 20:47:16 +03:00

LAMENT

Lefty Application, Modification, Editing and Notification Tool

LAMENT is a simple command line utility that edits system configuration files in a declarative manner. While providing declarativity, it also respects external changes made to the config files and integrates them to the declarative config.

Why?

NixOS, Ansible, and a number of other programs provide various ways to configure a system declaratively. However, these programs either break or override when a config file under their responsibility is edited manually. This causes a lot of issues while troubleshooting because a huge amount of tutorials, forum posts, manual pages, GitHub issue comments, and even LLM generated answers involve direct editing of config files:

  • open /etc/default/grub and append ...
  • change the line that starts with ::1 in /etc/hosts to ...
  • uncomment the line ... in /etc/chrony.conf

When the user edits these lines, the declarative config overrides the edits, or the system breaks due to the conflict between the two files, leading to frustration.

However, a LAMENT config can align itself to the changes in these files.

But why don't we let them simply edit the pre-existing config files?

The reason why LAMENT was created was to provide a command line utility to edit config files. The original problem that led to its creation was appending modprobe.blacklist=nouveau to the kernel command line parameters in /etc/default/grub in a post install script. Instead of simply using awk to append a command line parameter, we decided that we would have many similar issues in the near future, so we wanted to create a simple tool that can be used in scripts.

LAMENT provides a very simple way to configure a system in a CLI, while also respecting direct changes in the config files:

# makes a change in a line of system configuration.
lament kernel cmdline.modprobe.blacklist --append "nouveau"
# applies the changes in the configuration to the files.
lament --apply kernel
# re-calibrates LAMENT configuration, so the changes in other config files are kept under track
# except the newly configured `kernel` config module
lament --recalibrate --except kernel