Repository navigation
Declarative Syntax
The declarative system that Sinix Linux is a powerful and efficient system coded in Lua and will be configured by you in Lua.
How it works is that it was coded to reserve local functions and "APIs" that run commands and structure calculations to get to the desired result.
In the source code of the declarative system, there are 3 files, absolute.lua, main.lua and add-pkg.lua.
absolute.lua has these functions: run_cmd (runs a command), is_package_installed (checks if the queried package(s) is(are) installed),
is_service_enabled (checks if the queried service(s) is(are) enabled) and sys_engine.apply_packages (probably self-explainatory.)
For further investigation or whatever, the source code is here.
In your Sinix system, you should have a directory called /etc/sinix.
It's where the source code and the configuration is; To start configuring, create or edit a file called config.lua with your favorite
text editor.
Important
If you misspell the name of the config file, it will break everything!
For this example, we will use Neovim.
nvim config.luaPress i in your keyboard to enter Insert Mode so you can code.
To not overwhelm you, i will be simple.
config.lua uses tables, similar to JSON or TOML.
A normal structure will look like this:
return {
hostname = "something",
packages = {
"hyprland",
"hyprlock"
},
dotfiles = {
}
}return is used because it returns the values to main.lua and(or) absolute.lua.
See the structure? You will use this, use your own desired packages and dotfiles (will be covered later) and rebuild.
You may use the sinix-rebuild script that enforces the changes and reconfigures your system.
sinix-rebuildIf bash can't find it:
./usr/bin/sinix-rebuildIt will spit out verbose and information, and enforces the changes you wish.
(W.I.P)