diff --git a/.git-crypt/.gitattributes b/.git-crypt/.gitattributes new file mode 100644 index 0000000..17ef601 --- /dev/null +++ b/.git-crypt/.gitattributes @@ -0,0 +1,3 @@ +# Do not edit this file. To specify the files to encrypt, create your own +# .gitattributes file in the directory where your files are. +* !filter !diff diff --git a/.git-crypt/keys/default/0/7FD58D9A196DCEEEAD671F94F4D7A7915DEA789B.gpg b/.git-crypt/keys/default/0/7FD58D9A196DCEEEAD671F94F4D7A7915DEA789B.gpg new file mode 100644 index 0000000..59251f9 Binary files /dev/null and b/.git-crypt/keys/default/0/7FD58D9A196DCEEEAD671F94F4D7A7915DEA789B.gpg differ diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..c309941 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +private_dotfiles/** filter=git-crypt diff=git-crypt diff --git a/.gitignore b/.gitignore index cc35c0f..494f98c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,3 @@ -private_dotfiles -private_dotfiles/** installed-prefs *.swp *~ diff --git a/README.md b/README.md index ef66b51..d119f5a 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,10 @@ packages I like installed, and an ever-growing setup script. There are various options to install just parts of it, such as on a machine where I only have a user account but no root. +This now uses [git-crypt](https://github.com/AGWA/git-crypt) to protect +`private_dotfiles` for things I don't want to splash all over the internet. :) +I still wouldn't check in anything terribly sensitive, like private keys. + ### Usefulness ### Mostly I post this to github so I can quickly grab the things I want, but it might also be useful to others. Feel free to raise an issue if you have any @@ -22,6 +26,8 @@ MINIMAL: Don't do things that require git clones or installation of anything not included in my .skel. (Defaults to 0, installs everything.) INSTALL_KEYS: Install GnuPG and SSH keys. SSH keys are placed in authorized_keys. (Defaults to 1, installs keys.) +TRUST_ALL_KEYS: Allow all keys to be used for SSH login, versus a small subset. INSTALL_PKGS: Install common packages, if on a Debian-like system. (Defaults to opposite of $MINIMAL.) +SAVE: Save the install options to ${BASEDIR}/installed-prefs ``` diff --git a/bin/google-chrome b/bin/google-chrome new file mode 100755 index 0000000..77c29cc --- /dev/null +++ b/bin/google-chrome @@ -0,0 +1,10 @@ +#!/bin/bash + +CHROME=`which google-chrome` + +if [ `id -u` != "0" ] ; then + exec $CHROME "$@" +fi + +CMD="${CHROME} --user-data-dir=${HOME}/.chrome-data-dir \"$@\"" +su -c "${CMD}" chromeuser diff --git a/deb-to-kali.sh b/deb-to-kali.sh index a105a4c..03d6cc9 100755 --- a/deb-to-kali.sh +++ b/deb-to-kali.sh @@ -8,12 +8,9 @@ fi BASEDIR=`dirname $0` cat >/etc/apt/sources.list.d/kali.list < /dev/null ; then - if [[ `getent passwd $USER | cut -d: -f7` != */zsh ]] ; then - echo 'Enter password to change shell.' >&2 - chsh -s `which zsh` + if [[ $- == *i* ]] ; then + if [[ `getent passwd $USER | cut -d: -f7` != */zsh ]] ; then + echo 'Enter password to change shell.' >&2 + chsh -s `which zsh` + fi fi install_git https://github.com/robbyrussell/oh-my-zsh.git $HOME/.oh-my-zsh else @@ -200,6 +202,7 @@ function install_chrome { run_as_root /usr/bin/dpkg -i ${TMPD}/google-chrome.deb || \ run_as_root /usr/bin/apt-get install -qq -f -y || \ ( echo "Could not install chrome." >&2 && return 1 ) + rm -rf ${TMPD} } function read_saved_prefs { @@ -271,6 +274,7 @@ ARCH=`uname -m` (( $INSTALL_PKGS )) && is_deb_system && install_apt_pkgs install_dotfile_dir "${BASEDIR}/dotfiles" test -d "${BASEDIR}/private_dotfiles" && \ + test -d "${BASEDIR}/.git/git-crypt" && \ install_dotfile_dir "${BASEDIR}/private_dotfiles" install_basic_dir "${BASEDIR}/bin" "${HOME}/bin" (( $MINIMAL )) || postinstall diff --git a/kali-repo.key b/keys/gpg/kali-repo.key similarity index 100% rename from kali-repo.key rename to keys/gpg/kali-repo.key diff --git a/private_dotfiles/irssi/sasl.auth b/private_dotfiles/irssi/sasl.auth new file mode 100644 index 0000000..5841f87 Binary files /dev/null and b/private_dotfiles/irssi/sasl.auth differ diff --git a/private_dotfiles/ssh/config b/private_dotfiles/ssh/config new file mode 100644 index 0000000..f77467c Binary files /dev/null and b/private_dotfiles/ssh/config differ