diff --git a/.gitignore b/.gitignore index 9ab6d4e..c1b0a7e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,3 @@ .csync_* .owncloudsync.log config/jetbrains-settings.jar -config/assh.* -bash/private.sh diff --git a/.gitmodules b/.gitmodules index dff67a0..a262bb9 100644 --- a/.gitmodules +++ b/.gitmodules @@ -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 diff --git a/Makefile b/Makefile deleted file mode 100644 index ad43936..0000000 --- a/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -DOTFILES=$(PWD) - -install: apt bash bin config gnome fonts yaourt - -bin: - chmod +x $(DOTFILES)/bin/* - -bash: yaourt - ln -sfP $(DOTFILES)/bash/.zshrc ~/.zshrc - mkdir -p ~/.nvm/ - ln -sfP /usr/share/nvm/init-nvm.sh ~/.nvm/nvm.sh - -config: yaourt - mkdir -p ~/.config/terminator - mkdir -p ~/.config/uniemoji/ - ln -sfP $(DOTFILES)/config/terminator.conf ~/.config/terminator/config - sudo ln -sfP $(DOTFILES)/config/libinput-gestures.conf /etc/libinput-gestures.conf - git config --global core.excludesfile ~/.dotfiles/config/gitignore_global - git clone https://github.com/amix/vimrc.git ~/.vim_runtime || cd ~/.vim_runtime && git pull - vim +PluginInstall +qall - ln -sfP $(DOTFILES)/config/vimrc ~/.vimrc - ln -sfP $(DOTFILES)/config/uniemoji.json ~/.config/uniemoji/custom.json - ln -sfP $(DOTFILES)/config/assh.yml ~/.ssh/assh.yml - -gnome: yaourt - rm -rf ~/Templates/* - ln -sfP $(DOTFILES)/gnome/Templates/* ~/Templates/ - gsettings set org.gnome.desktop.interface show-battery-percentage true - -yaourt: pacman - yaourt -Syau # Install any updates before extra packages - yaourt -S `cat $(DOTFILES)/yaourt/packages.conf` --needed - ln -sfP $(DOTFILES)/yaourt/.yaourtrc ~/.yaourtrc - -pacman: - gpg --recv-keys F7E48EDB # Add custom key for ncurses - sudo ln -sfP $(DOTFILES)/yaourt/pacman.conf /etc/pacman.conf - sudo pacman-key -r 962DDE58 - sudo pacman-key --lsign-key 962DDE58 - gpg --keyserver pool.sks-keyservers.net --recv-keys 2E1AC68ED40814E0 # gotta be a way to add to pacman, not my GPG - -fonts: yaourt - ln -s /etc/fonts/conf.avail/11-lcdfilter-default.conf /etc/fonts/conf.d - ln -s /etc/fonts/conf.avail/10-sub-pixel-rgb.conf /etc/fonts/conf.d - ln -s /etc/fonts/conf.avail/30-infinality-aliases.conf /etc/fonts/conf.d - gdk-pixbuf-query-loaders --update-cache - -.PHONY: apt bash bin config gnome yaourt pacman fonts diff --git a/deploy.sh b/deploy.sh new file mode 100755 index 0000000..cb3563c --- /dev/null +++ b/deploy.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +sudo puppet apply manifests/main.pp --modulepath=modules/ diff --git a/gnome/activities.png b/gnome/activities.png deleted file mode 100644 index bdf0a78..0000000 Binary files a/gnome/activities.png and /dev/null differ diff --git a/gnome/appearance.yml b/gnome/appearance.yml deleted file mode 100644 index 9720225..0000000 --- a/gnome/appearance.yml +++ /dev/null @@ -1,18 +0,0 @@ -GTK+ Theme: Numix -Icons: Ultra-Flat-Orange -Cursor: Adwaita (default) -Shell Theme: unity-gnome -Desktop Icons: - - Home - - Network Servers - - Trash -Power button action: Interactive -Close lid: - Battery: Nothing - Plugged in: Nothing -Clock: - - Date - - Seconds -Titlebar buttons: - - Maximize - - Minimize diff --git a/gnome/extensions.md b/gnome/extensions.md deleted file mode 100644 index 316612e..0000000 --- a/gnome/extensions.md +++ /dev/null @@ -1,8 +0,0 @@ -- Coverflow alt-tab -- Dash to Dock -- Drop down terminal -- Laine -- Lock Keys -- Removable Drive Menu -- Sound output device chooser -- TopIcons Plus diff --git a/gnome/favourites.md b/gnome/favourites.md deleted file mode 100644 index b0593b8..0000000 --- a/gnome/favourites.md +++ /dev/null @@ -1,4 +0,0 @@ -- Firefox -- Atom -- Files -- spotify diff --git a/gnome/sound-fix.sh b/gnome/sound-fix.sh deleted file mode 100644 index 57390bf..0000000 --- a/gnome/sound-fix.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash - -set -e - -echo "Removing volume change sound..." -gsettings set org.gnome.desktop.sound event-sounds false - -echo "Decreasing volume increment..." -gsettings set org.gnome.settings-daemon.plugins.sound volume-step 1 diff --git a/manifests/main.pp b/manifests/main.pp new file mode 100644 index 0000000..6e0e1c6 --- /dev/null +++ b/manifests/main.pp @@ -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 +} diff --git a/modules/concat b/modules/concat new file mode 160000 index 0000000..b783e1e --- /dev/null +++ b/modules/concat @@ -0,0 +1 @@ +Subproject commit b783e1e99def0bf45a391a2ebce5a39bd4174e11 diff --git a/config/gitignore_global b/modules/config/files/gitignore_global similarity index 100% rename from config/gitignore_global rename to modules/config/files/gitignore_global diff --git a/config/libinput-gestures.conf b/modules/config/files/libinput-gestures.conf similarity index 100% rename from config/libinput-gestures.conf rename to modules/config/files/libinput-gestures.conf diff --git a/config/terminator.conf b/modules/config/files/terminator.conf similarity index 100% rename from config/terminator.conf rename to modules/config/files/terminator.conf diff --git a/config/uniemoji.json b/modules/config/files/uniemoji.json similarity index 100% rename from config/uniemoji.json rename to modules/config/files/uniemoji.json diff --git a/config/vimrc b/modules/config/files/vimrc similarity index 100% rename from config/vimrc rename to modules/config/files/vimrc diff --git a/modules/config/manifests/fonts.pp b/modules/config/manifests/fonts.pp new file mode 100644 index 0000000..ec711fb --- /dev/null +++ b/modules/config/manifests/fonts.pp @@ -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" + } +} diff --git a/modules/config/manifests/git.pp b/modules/config/manifests/git.pp new file mode 100644 index 0000000..913a03e --- /dev/null +++ b/modules/config/manifests/git.pp @@ -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" + } +} diff --git a/modules/config/manifests/init.pp b/modules/config/manifests/init.pp new file mode 100644 index 0000000..5dda184 --- /dev/null +++ b/modules/config/manifests/init.pp @@ -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' + } + + +} diff --git a/modules/config/manifests/vim.pp b/modules/config/manifests/vim.pp new file mode 100644 index 0000000..74763f0 --- /dev/null +++ b/modules/config/manifests/vim.pp @@ -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" + } +} diff --git a/modules/git b/modules/git new file mode 160000 index 0000000..4e4498e --- /dev/null +++ b/modules/git @@ -0,0 +1 @@ +Subproject commit 4e4498e3db218cefc27e40b7eb4e442177ccab28 diff --git a/gnome/Templates/Empty HTML File b/modules/gnome/files/Templates/Empty HTML File similarity index 100% rename from gnome/Templates/Empty HTML File rename to modules/gnome/files/Templates/Empty HTML File diff --git a/gnome/Templates/Empty Node Script b/modules/gnome/files/Templates/Empty Node Script similarity index 100% rename from gnome/Templates/Empty Node Script rename to modules/gnome/files/Templates/Empty Node Script diff --git a/gnome/Templates/Empty Python File b/modules/gnome/files/Templates/Empty Python File similarity index 100% rename from gnome/Templates/Empty Python File rename to modules/gnome/files/Templates/Empty Python File diff --git a/gnome/Templates/Empty Shell Script b/modules/gnome/files/Templates/Empty Shell Script similarity index 100% rename from gnome/Templates/Empty Shell Script rename to modules/gnome/files/Templates/Empty Shell Script diff --git a/gnome/Templates/Empty Text File b/modules/gnome/files/Templates/Empty Text File similarity index 100% rename from gnome/Templates/Empty Text File rename to modules/gnome/files/Templates/Empty Text File diff --git a/modules/gnome/manifests/init.pp b/modules/gnome/manifests/init.pp new file mode 100644 index 0000000..a589453 --- /dev/null +++ b/modules/gnome/manifests/init.pp @@ -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' + } +} diff --git a/bash/.zshrc b/modules/shell/files/.zshrc similarity index 90% rename from bash/.zshrc rename to modules/shell/files/.zshrc index 47cd248..5fff79d 100644 --- a/bash/.zshrc +++ b/modules/shell/files/.zshrc @@ -28,6 +28,3 @@ COMPLETION_WAITING_DOTS="true" alias src="source $HOME/.zshrc" -export DOTFILES="$HOME/.dotfiles" - -source $DOTFILES/bash/base.sh diff --git a/bash/applications.sh b/modules/shell/files/applications.sh similarity index 92% rename from bash/applications.sh rename to modules/shell/files/applications.sh index e57082b..afc50e1 100644 --- a/bash/applications.sh +++ b/modules/shell/files/applications.sh @@ -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" diff --git a/bash/base.sh b/modules/shell/files/base.sh similarity index 82% rename from bash/base.sh rename to modules/shell/files/base.sh index 1357e2d..6893f22 100644 --- a/bash/base.sh +++ b/modules/shell/files/base.sh @@ -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 @@ -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" diff --git a/bin/json_format b/modules/shell/files/bin/json_format similarity index 100% rename from bin/json_format rename to modules/shell/files/bin/json_format diff --git a/bash/catfish.sh b/modules/shell/files/catfish.sh similarity index 100% rename from bash/catfish.sh rename to modules/shell/files/catfish.sh diff --git a/bash/javascript.sh b/modules/shell/files/javascript.sh similarity index 100% rename from bash/javascript.sh rename to modules/shell/files/javascript.sh diff --git a/modules/shell/manifests/init.pp b/modules/shell/manifests/init.pp new file mode 100644 index 0000000..6982b68 --- /dev/null +++ b/modules/shell/manifests/init.pp @@ -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 + } +} diff --git a/modules/stdlib b/modules/stdlib new file mode 160000 index 0000000..0bb25fb --- /dev/null +++ b/modules/stdlib @@ -0,0 +1 @@ +Subproject commit 0bb25fb19904e8b346a25204f787b8bdc5140bae diff --git a/modules/vcsrepo b/modules/vcsrepo new file mode 160000 index 0000000..e3d28c6 --- /dev/null +++ b/modules/vcsrepo @@ -0,0 +1 @@ +Subproject commit e3d28c6f7aa3b1daf7e9d30b55494592a65a2264 diff --git a/yaourt/.yaourtrc b/modules/yaourt/files/.yaourtrc similarity index 100% rename from yaourt/.yaourtrc rename to modules/yaourt/files/.yaourtrc diff --git a/yaourt/pacman.conf b/modules/yaourt/files/pacman.conf similarity index 100% rename from yaourt/pacman.conf rename to modules/yaourt/files/pacman.conf diff --git a/modules/yaourt/manifests/files.pp b/modules/yaourt/manifests/files.pp new file mode 100644 index 0000000..97700d6 --- /dev/null +++ b/modules/yaourt/manifests/files.pp @@ -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' + } +} diff --git a/modules/yaourt/manifests/init.pp b/modules/yaourt/manifests/init.pp new file mode 100644 index 0000000..ca158a4 --- /dev/null +++ b/modules/yaourt/manifests/init.pp @@ -0,0 +1,7 @@ +class yaourt { + include 'yaourt::packages' + + include 'yaourt::keys' + + include 'yaourt::files' +} diff --git a/modules/yaourt/manifests/keys.pp b/modules/yaourt/manifests/keys.pp new file mode 100644 index 0000000..18fdab4 --- /dev/null +++ b/modules/yaourt/manifests/keys.pp @@ -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' + } +} diff --git a/modules/yaourt/manifests/packages.pp b/modules/yaourt/manifests/packages.pp new file mode 100644 index 0000000..741a9c1 --- /dev/null +++ b/modules/yaourt/manifests/packages.pp @@ -0,0 +1,7 @@ +class yaourt::packages () { + package {[ + 'firefox' + ]: + ensure => latest + } +}