# ### #######
/ /### / ###
# / / ### / ##
## / ## ### ## #
## / ### ### ###
/### /### /### ######## ## ## ## ## ###
/ ### / / ### / / ### / ######## ## ## ## ### ###
/ ###/ / ###/ / ###/ ## ## ## ## ### ###
## ## ## ## ## ## ## ## ## ## ### /##
## ## ## ## ## ## ## ## ## ## #/ /##
## ## ## ## ## ## ## ## ## ## #/ ##
## ## ## ## ## ## ## ## # / # /
## ## ## ## ## /# ## ### / /## /
######## ###### ####/ ## ## ######/ / ########/
### ### #### ### ## ## ### / #####
### |
#### ### \)
/###### /#
/ ###/
by Lucas MartaA meta-distribution with a declarative system configuration.
Caution
This project is a work in progress.
goat is a declarative system configuration manager, similar to NixOS.
However goat is a sort of "meta-distribution". This means you can combine
it with your current operating system!
Q: "What distributions are supported?"
A: EVERY Linux based operating system should be supported*
Q: "Do I need to have a fresh distro install?"
A: Nope. During goat's installation it will compile your current
distro settings like your manually installed packages, running services, users, and more.
Q: "Why lua?" A: Lua has proven to be an excellent configuration file language. Several other languages have been tested such as python, starlark, json, and even toml. The ability to use the lua standard library within your config is awesome as well.
* non-supported distros need a package manager configuration interface created, along with one for your service manager. This is a very simple process.
goat and its tooling is what I originally wanted to see from NixOS. The
declarative configuration file was the best idea I've seen from any Linux
distro yet. At this point 99% of distros are the same thing with a different
package manager (pacman, portage, apt, dnf, etc.) or preinstalled DE's. The
only difference is preference, unlike NixOS which had a genuinely creative
difference from everything else.
However, when my configuration reached a certain point it was just tiring to deal with. I don't want to figure out how to use the experimental flakes, or wait upwards of 5 minutes to rebuild my system! Or look through several websites to find out a specific config option or use the nix repl...
The point of this "essay" isn't to de-value NixOS but to highlight the fantastic
idea of a declarative system configuration. That is exactly what goat attempts
to replicate without the extra complexity/overhead of NixOS. (sorry NixOS lovers)
(from my personal experience! NixOS might be perfect for you and goat might be
terrible for your usecase!)
~ Lucas Marta
The goat ecosystem is similar to that of NixOS with several important differences.
The following is lua.
-- This is the default hostname
-- if no hostname global is set.
hostname = "goatOS"
packages = {
"fastfetch",
"git"
}goat even provides a custom lua runtime library! Similar to neovim.
hostname = "goatOS"
-- This is one of the functions provided.
-- Under the hood these functions run rust
-- code so theoretically it should be
-- blazing fast.
if goat.program_exists("bash") then
print("Bash is on your computer!")
endCaution
Copying other user configurations will put you at risk of
arbitrary code running on your computer! More safeguards will
be put in place to prevent things like os.execute & more.
PLEASE read through other user's configurations before using them.
We are not liable for any damage someone's configuration does
to your system.
Here are the features currently supported and features planned.
- Health check
- Fix
goatdirectories (/etc/goat,/var/goat/, etc.) - Generates config based on current running system if accidentally deleted or one doesn't exist
- Fix
- Declarative configuration file
- Hostname
- Package management
- Service management
- User management
- Dotfile management
- Arbitrary file management
- Cache
- Modular internal system configurations (see
package_managersorservice_managers)
Much more is planned but this is what I am focused on for now.
We are very strict (not really) on our Rust code:
- NO
.unwrap()'s on any pull requests. The only time you should be using unwrap is for testing code. - Use
anyhow::Resultfor result types. use.map_err(...)for conflicting types. - Please for the love of god don't rely on ChatGPT or Copilot generated code
That's pretty much it. Just keep your code clean and try to leave docstrings as much as possible.
Note that this is replicatable on ANY distro not specific to goatOS.
- fastfetch-goat: fastfetch with the goat logo built in (hopefully merged into fastfetch soon):
- NixOS: Huge inspiration
This project is created and maintained by Lucas Marta