Skip to content

Instantly share code, notes, and snippets.

@jtimberman
Last active January 11, 2020 22:54
Show Gist options
  • Save jtimberman/5782516 to your computer and use it in GitHub Desktop.
Save jtimberman/5782516 to your computer and use it in GitHub Desktop.
This is the role I use on my "Linux Workstation" systems. I don't have a desktop Linux system, but I do have a couple that I ssh to for work/development purposes especially when traveling.

Most of the recipes are just from the Opscode cookbooks. Exceptions or differences:

  • ruby19 is a recipe that just installs ruby1.9.1-full, nothing fancy. Use Fletcher Nichol's rbenv or rvm cookbooks for those if you prefer.
  • emacs24 recipe is one that I used to install Emacs 24 from a PPA before it was officially released. The actual recipe is attached to this gist, just put it in a cookbook named emacs24 as the default recipe.
  • users recipe is one that just manages the dotfiles for my user, it's based on a really old version of Opscode's users cookbook.
if platform?('ubuntu') && node['platform_version'].to_f < 12.10
apt_repository "emacs24-ppa" do
uri "http://ppa.launchpad.net/cassou/emacs/ubuntu"
distribution node['lsb']['codename']
components ['main']
keyserver "keyserver.ubuntu.com"
key "CEC45805"
end
elsif platform?("debian")
apt_repository "emacs24-snapshot" do
uri "http://emacs.naquadah.org"
distribution "unstable/"
components []
key "http://emacs.naquadah.org/key.gpg"
end
end
package "emacs24-nox" do
package_name "emacs-snapshot-nox" if platform?('debian')
end
package "emacs24-el" do
package_name "emacs-snapshot-el" if platform?('debian')
end
{
"name": "linux_workstation",
"description": "Linux Development workstation",
"json_class": "Chef::Role",
"default_attributes": {
},
"override_attributes": {
"virtualbox": {
"urlbase": "http://download.virtualbox.org/virtualbox/4.2.8",
"url": "http://download.virtualbox.org/virtualbox/4.2.8/virtualbox-4.2_4.2.8-83876~Debian~wheezy_amd64.deb"
}
},
"chef_type": "role",
"run_list": [
"recipe[build-essential]",
"recipe[ruby19]",
"recipe[zsh]",
"recipe[git]",
"recipe[vim]",
"recipe[users]",
"recipe[tmux]",
"recipe[emacs24]",
"recipe[workstation]",
"recipe[mosh]",
"recipe[virtualbox]",
"recipe[vagrant]"
],
"env_run_lists": {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment