Skip to content

Commit

Permalink
Merge pull request #1 from RealOrangeOne/puppet
Browse files Browse the repository at this point in the history
Puppet
  • Loading branch information
RealOrangeOne committed Aug 12, 2017
2 parents c286c4c + ca41962 commit 153a7cc
Show file tree
Hide file tree
Showing 42 changed files with 219 additions and 99 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
.csync_*
.owncloudsync.log
config/jetbrains-settings.jar
config/assh.*
bash/private.sh
12 changes: 12 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
[submodule "atom"]
path = atom
url = git@gist.github.com:9f9a4dd799ad01aa0502a09f06cbf454.git
[submodule "modules/vcsrepo"]
path = modules/vcsrepo
url = https://github.com/puppetlabs/puppetlabs-vcsrepo
[submodule "modules/concat"]
path = modules/concat
url = https://github.com/puppetlabs/puppetlabs-concat
[submodule "modules/stdlib"]
path = modules/stdlib
url = https://github.com/puppetlabs/puppetlabs-stdlib
[submodule "modules/git"]
path = modules/git
url = https://github.com/puppetlabs/puppetlabs-git
48 changes: 0 additions & 48 deletions Makefile

This file was deleted.

3 changes: 3 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

sudo puppet apply manifests/main.pp --modulepath=modules/
Binary file removed gnome/activities.png
Binary file not shown.
18 changes: 0 additions & 18 deletions gnome/appearance.yml

This file was deleted.

8 changes: 0 additions & 8 deletions gnome/extensions.md

This file was deleted.

4 changes: 0 additions & 4 deletions gnome/favourites.md

This file was deleted.

9 changes: 0 additions & 9 deletions gnome/sound-fix.sh

This file was deleted.

12 changes: 12 additions & 0 deletions manifests/main.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
node default {
Exec {
path => ['/usr/bin', '/usr/sbin', '/usr/local/bin', '/usr/local/sbin']
}

include stdlib

include yaourt
include gnome
include config
include shell
}
1 change: 1 addition & 0 deletions modules/concat
Submodule concat added at b783e1
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
21 changes: 21 additions & 0 deletions modules/config/manifests/fonts.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
class config::fonts {
$fonts = [
"11-lcdfilter-default.conf",
"10-sub-pixel-rgb.conf",
"30-infinality-aliases.conf"
];

$fonts.each |String $font| {
file { "font config $font":
path => "/etc/fonts/conf.d/$font",
ensure => link,
mode => "0644",
source => "/etc/fonts/conf.avail/$font"

}
}

exec { 'update font cache':
command => "gdk-pixbuf-query-loaders --update-cache"
}
}
13 changes: 13 additions & 0 deletions modules/config/manifests/git.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
class config::git {
file { '/home/jake/.gitignore_global':
ensure => file,
mode => "0644",
source => 'puppet:///modules/config/gitignore_global'
}

git::config { "global ignore" :
key => 'core.excludesfile',
value => '/home/jake/.gitignore_global',
user => "jake"
}
}
25 changes: 25 additions & 0 deletions modules/config/manifests/init.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
class config {
include 'config::vim'
include 'config::git'
include 'config::fonts'

file { '/etc/libinput-gestures.conf':
ensure => file,
mode => "0644",
source => 'puppet:///modules/config/libinput-gestures.conf'
}

file { '/home/jake/.config/terminator/config':
ensure => file,
mode => "0644",
source => 'puppet:///modules/config/terminator.conf'
}

file { '/home/jake/.config/uniemoji/custom.json':
ensure => file,
mode => "0644",
source => 'puppet:///modules/config/uniemoji.json'
}


}
22 changes: 22 additions & 0 deletions modules/config/manifests/vim.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
class config::vim {
file { '/home/jake/.vimrc':
ensure => file,
mode => "0644",
owner => "jake",
group => "users",
source => 'puppet:///modules/config/vimrc'
} ->

vcsrepo { '/home/jake/.vim_runtime':
ensure => latest,
provider => git,
user => 'jake',
source => "https://github.com/amix/vimrc.git",
} ->

exec { 'install vim plugins':
command => "vim +PluginInstall +qall",
user => "jake",
environment => "HOME=/home/jake"
}
}
1 change: 1 addition & 0 deletions modules/git
Submodule git added at 4e4498
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
20 changes: 20 additions & 0 deletions modules/gnome/manifests/init.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
class gnome {
file { '/home/jake/Templates':
ensure => directory,
source => 'puppet:///modules/gnome/Templates',
owner => "jake",
group => "users",
mode => "0755",
recurse => remote
}

exec { 'show battery percentage':
user => "jake",
command => 'gsettings set org.gnome.desktop.interface show-battery-percentage true'
}

exec { 'Remove volume change sound':
user => "jake",
command => 'gsettings set org.gnome.desktop.sound event-sounds false'
}
}
3 changes: 0 additions & 3 deletions bash/.zshrc → modules/shell/files/.zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,3 @@ COMPLETION_WAITING_DOTS="true"

alias src="source $HOME/.zshrc"

export DOTFILES="$HOME/.dotfiles"

source $DOTFILES/bash/base.sh
2 changes: 0 additions & 2 deletions bash/applications.sh → modules/shell/files/applications.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ alias ym="yoga mode"

# miscellaneous software aliases
alias serve="python2 -m SimpleHTTPServer"
alias make-dotfiles="cd ~/.dotfiles/ && make && cd - > /dev/null"
alias edit-dotfiles="atom ~/.dotfiles/"
alias vi="vim"
alias regen-ssh-conf="assh config build > ~/.ssh/config"
alias yolo="yaourt -Syyau --noconfirm"
Expand Down
6 changes: 1 addition & 5 deletions bash/base.sh → modules/shell/files/base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ case $- in
*) return;;
esac

source $DOTFILES/bash/catfish.sh
source $DOTFILES/bash/javascript.sh
source $DOTFILES/bash/applications.sh
[ -s "$DOTFILES/bash/private.sh" ] && source "$DOTFILES/bash/private.sh" # load private stuff

# Export some variables
export ANDROID_HOME=/opt/android-sdk
Expand All @@ -19,7 +15,7 @@ export TIMEFMT=$'\nreal\t%E\nuser\t%U\nsys\t%S'
export PATH=${PATH}:${ANDROID_HOME}/tools
export PATH=${PATH}:${ANDROID_HOME}/platform-tools
export PATH=${PATH}:/opt/genymobile/genymotion
export PATH=${HOME}/.dotfiles/bin:${PATH}
export PATH=${PATH}:${HOME}/.bin

# bash aliases
alias refresh="cd $PWD > /dev/null"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
43 changes: 43 additions & 0 deletions modules/shell/manifests/init.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
class shell {
$zshrc = "/home/jake/.zshrc"

$files = [
"puppet:///modules/shell/.zshrc",
"puppet:///modules/shell/base.sh",
"puppet:///modules/shell/applications.sh",
"puppet:///modules/shell/catfish.sh",
"puppet:///modules/shell/javascript.sh"
];

concat {"zshrc":
path => $zshrc,
owner => "jake",
group => "users",
mode => "0644",
ensure_newline => true
}

$files.each |String $file| {
concat::fragment {"zshrc concat $file":
target => $zshrc,
source => $file
}
}

file {'nvm':
path => "/home/jake/.nvm/nvm.sh",
owner => "jake",
group => "users",
mode => "0755",
source => "/usr/share/nvm/init-nvm.sh"
}

file { '/home/jake/.bin':
ensure => directory,
source => 'puppet:///modules/shell/bin',
owner => "jake",
group => "users",
mode => "0755",
recurse => remote
}
}
1 change: 1 addition & 0 deletions modules/stdlib
Submodule stdlib added at 0bb25f
1 change: 1 addition & 0 deletions modules/vcsrepo
Submodule vcsrepo added at e3d28c
File renamed without changes.
File renamed without changes.
14 changes: 14 additions & 0 deletions modules/yaourt/manifests/files.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
class yaourt::files () {
file { '/etc/pacman.conf':
ensure => file,
source => 'puppet:///modules/yaourt/pacman.conf'
}

file { '/home/jake/.yaourtrc':
ensure => file,
mode => "0644",
owner => "jake",
group => "users",
source => 'puppet:///modules/yaourt/.yaourtrc'
}
}
7 changes: 7 additions & 0 deletions modules/yaourt/manifests/init.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class yaourt {
include 'yaourt::packages'

include 'yaourt::keys'

include 'yaourt::files'
}
15 changes: 15 additions & 0 deletions modules/yaourt/manifests/keys.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
class yaourt::keys () {
exec { 'gpg --recv-keys F7E48EDB':
user => 'jake'
}

exec { 'pacman-key -r 962DDE58':
}

exec { 'pacman-key --lsign-key 962DDE58':
}

exec { 'gpg --keyserver pool.sks-keyservers.net --recv-keys 2E1AC68ED40814E0':
user => 'jake'
}
}
7 changes: 7 additions & 0 deletions modules/yaourt/manifests/packages.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class yaourt::packages () {
package {[
'firefox'
]:
ensure => latest
}
}

0 comments on commit 153a7cc

Please sign in to comment.