Module: OmaGem::DSL::Service

Included in:
Config
Defined in:
lib/omagem/dsl/service.rb

Overview

Install/manage optional software, services, apps, browsers, editors, terminals, development environments, and gaming.

Constant Summary collapse

SERVICES =

-- Services ---------------------------------------------------------

%w[1password dropbox nordvpn once signal spotify sunshine tailscale].freeze

Instance Method Summary collapse

Instance Method Details

#install_app(display_name, packages) ⇒ Object

Install a supported standalone app, e.g. install_app("ChatGPT") wraps omarchy install <display-name> <packages>.



12
13
14
# File 'lib/omagem/dsl/service.rb', line 12

def install_app(display_name, packages)
  run('install', 'app', display_name, packages)
end

#install_browser(name) ⇒ Object

-- Optional software installers ------------------------------------



18
19
20
21
# File 'lib/omagem/dsl/service.rb', line 18

def install_browser(name)
  validate_in!(name, %w[chrome brave brave-origin edge firefox zen], 'browser')
  run('install', 'browser', name)
end

#install_dev_env(env) ⇒ Object

-- Development environments (install dev-env <ruby|node|...>) ------



50
51
52
53
54
55
# File 'lib/omagem/dsl/service.rb', line 50

def install_dev_env(env)
  allowed = %w[ruby node bun deno go laravel symfony php python elixir phoenix rust java zig ocaml dotnet clojure
               scala]
  validate_in!(env, allowed, 'dev env')
  run('install', 'dev-env', env)
end

#install_editor(name) ⇒ Object



23
24
25
26
# File 'lib/omagem/dsl/service.rb', line 23

def install_editor(name)
  validate_in!(name, %w[emacs helix vscode zed], 'editor')
  run('install', 'editor', name)
end

#install_game(platform) ⇒ Object

-- Gaming -----------------------------------------------------------



59
60
61
62
63
# File 'lib/omagem/dsl/service.rb', line 59

def install_game(platform)
  allowed = %w[steam heroic lutris retroarch battlenet geforce-now xbox-cloud xbox-controllers gpu-lib32]
  validate_in!(platform, allowed, 'gaming platform')
  run('install', 'gaming', platform)
end

#install_service(name) ⇒ Object

Install and start a supported service (or bundle downloads a full version).



38
39
40
41
# File 'lib/omagem/dsl/service.rb', line 38

def install_service(name)
  validate_in!(name, SERVICES, 'service')
  run('install', 'service', name)
end

#install_terminal(name) ⇒ Object



28
29
30
31
# File 'lib/omagem/dsl/service.rb', line 28

def install_terminal(name)
  validate_in!(name, %w[alacritty foot ghostty kitty], 'terminal')
  run('install', 'terminal', name)
end

#remove_service(name) ⇒ Object



43
44
45
46
# File 'lib/omagem/dsl/service.rb', line 43

def remove_service(name)
  validate_in!(name, SERVICES, 'service')
  run('remove', 'service', name)
end