diff --git a/Puppetfile b/Puppetfile index a1fad57..e39ba65 100644 --- a/Puppetfile +++ b/Puppetfile @@ -13,3 +13,8 @@ mod 'puppetlabs-docker', '3.10.0' # VSC Repo to install all the git repos # mod 'puppetlabs-vcsrepo', '3.1.1' + +# +# Archive module for downloading and unpacking archives +# +mod 'puppet-archive', '4.6.0' diff --git a/manifests/root.pp b/manifests/root.pp index 6c659cb..61d18ef 100644 --- a/manifests/root.pp +++ b/manifests/root.pp @@ -12,14 +12,35 @@ node default { $user = lookup('user', String, 'first', $id) notify { "Running as ${id} for ${user} with home of ${user_home}": } - # - # Install all the packages that the workstation needs to run - # - include core::packages - # # Install docker and docker-compose # class { 'docker': version => 'latest' } - class {'docker::compose': ensure => present } + class { 'docker::compose': ensure => present } + + # + # Install vscode + # + class { 'vscode': } + + # + # Install emacs + # + apt::ppa { 'ppa:kelleyk/emacs': } + package { 'emacs27': + ensure => installed, + require => [ + Apt::Ppa['ppa:kelleyk/emacs'], + ], + } + + # + # Neovim PPA to get a better version + # + apt::ppa { 'ppa:neovim-ppa/stable': } + + # + # Install all the packages that the workstation needs to run + # + include core::packages } diff --git a/manifests/workstation.pp b/manifests/workstation.pp index c5bb163..3c7e4b1 100644 --- a/manifests/workstation.pp +++ b/manifests/workstation.pp @@ -23,4 +23,5 @@ node default { include core::tmux include core::fonts include core::vscode + include core::emacs } diff --git a/scripts/apply b/scripts/apply index 3ab5e96..a1be603 100755 --- a/scripts/apply +++ b/scripts/apply @@ -1,4 +1,4 @@ #!/bin/sh -bolt apply manifests/root.pp -vv --targets localhost --run-as root --sudo-password-prompt -bolt apply manifests/workstation.pp -vv --targets localhost +bolt apply manifests/root.pp --targets localhost --run-as root --sudo-password-prompt +bolt apply manifests/workstation.pp --targets localhost diff --git a/site-modules/core/manifests/emacs.pp b/site-modules/core/manifests/emacs.pp new file mode 100644 index 0000000..da6e13a --- /dev/null +++ b/site-modules/core/manifests/emacs.pp @@ -0,0 +1,13 @@ +class core::emacs { + vcsrepo { "${user_home}/.emacs.d": + source => 'https://github.com/syl20bnr/spacemacs.git', + provider => 'git', + user => $user, + revision => 'develop', + } + + file { "${user_home}/.spacemacs": + ensure => 'link', + target => find_file('core/spacemacs'), + } +}