# | nix-amer | ```yaml name: nix-amer version: 0.1.0 description: Configuration automation tool author: xdrm-brackets ``` >Need to automate the setup of your linux server or desktop ? This tool is made for you. [TOC] ---- ### I. Build Format Your whole setup remains in 1 only build file. Each line contains one instruction, the list of instructions is listed below. #### 1) package management These instructions allow you to interact with the package system available on your system. ``` ins ``` Install the listed packages. If more than one, use spaces to separate package names. ``` upd ``` Update/upgrade your system. ``` del ``` Remove the listed packages. If more than one, use spaces to separate package names. #### 3) update configuration files This instruction allow you to update configuration files without the need of an editor and in a developer-readable manner. ``` cnf ``` Update a configuration file where \ is a dot-separated human-readable [path expression](#ii-path-expressions) and \ is a string or a file. If a string is given, it will override/add the field ; if a file is given the configuration file will be replaced by it. ``` cnf ``` Remove a configuration field matching the \ path. #### 4) service management These instructions allow you to interact with the service system (_cf. systemd_). ``` ser [enable|start|stop|restart|reload] ``` Perform the action on services. If more than one, use spaces to separate service names. ---- ### II. Path Expressions The syntax is pretty fast-forward, it uses 3 levels to find your configuration line : `subject@alt.field`. | Field | Description | Example | | --------- | ------------------------------------ | -------------------------- | | `subject` | The name of the program to configure | `sshd`, `httpd`, `nginx` | | `alt` | Alternative file if there is more than one for a package. If **omitted** it will default to the _main_ configuration file. | `httpd@main`, `http@ports` | | `field` | Field is a dot-separated chain of strings that match with a configuration field. If **ommited**, the \ will just be added at the end of the configuration file. In the same way if the field does not point to a raw field but a parent or group containing fields, the \ will be added at the end. | `sshd.AllowGroups`, `nginx.http.gzip` |