Module: OmaGem
- Defined in:
- lib/omagem.rb,
lib/omagem/client.rb,
lib/omagem/config.rb,
lib/omagem/errors.rb,
lib/omagem/dsl/bar.rb,
lib/omagem/version.rb,
lib/omagem/dsl/misc.rb,
lib/omagem/dsl/theme.rb,
lib/omagem/dsl/plugin.rb,
lib/omagem/dsl/system.rb,
lib/omagem/dsl/toggle.rb,
lib/omagem/dsl/package.rb,
lib/omagem/dsl/service.rb,
lib/omagem/dsl/snapshot.rb
Overview
OmaGem is a Ruby DSL for configuring and managing Omarchy Linux systems.
require "omagem"
OmaGem.run do
theme "catppuccin"
add_packages "docker", "git"
install_service "tailscale"
nightlight :on
end
The block is evaluated against an OmaGem::Config, which exposes every DSL method. See OmaGem::Config for the full list.
Defined Under Namespace
Modules: DSL Classes: ArgumentError, Client, CommandFailed, CommandNotFound, Config, Error
Constant Summary collapse
- VERSION =
'0.1.1'
Class Method Summary collapse
-
.run(client: OmaGem::Client.new, ignore_errors: false, &block) ⇒ Object
Execute a DSL block against a fresh OmaGem::Config.
Class Method Details
.run(client: OmaGem::Client.new, ignore_errors: false, &block) ⇒ Object
Execute a DSL block against a fresh OmaGem::Config. Returns the config so the caller can inspect what ran via config.executed / config.client.
config = OmaGem.run { theme "catppuccin" }
27 28 29 30 31 |
# File 'lib/omagem.rb', line 27 def run(client: OmaGem::Client.new, ignore_errors: false, &block) config = Config.new(client: client, ignore_errors: ignore_errors) config.instance_eval(&block) if block config end |