Merge branch 'master' of github.com:sabrehagen/desktop-environment

This commit is contained in:
Jackson Delahunt 2019-11-18 12:36:05 +11:00
commit b50968eb0b
4 changed files with 72 additions and 44 deletions

View file

@ -1,12 +1,10 @@
# ☁️ Cloud Desktop Environment
[![Build Status](https://travis-ci.org/sabrehagen/desktop-environment.svg?branch=master)](https://travis-ci.org/sabrehagen/desktop-environment)
My [daily driver](https://cloud.docker.com/repository/docker/sabrehagen/desktop-environment) on the cloud and on desktop.
## Getting Started
The only dependency required for this environment is [Docker](https://docs.docker.com/install).
The only dependency required is [Docker](https://docs.docker.com/install).
```sh
# Clone desktop environment
@ -20,8 +18,39 @@ git clone https://github.com/sabrehagen/desktop-environment
Set your [user configuration](docker/scripts/environment.sh#L3) and go.
## Keybindings
```sh
# Launch alacritty
Mod + Return
# Launch chrome
Mod + b
# Launch vs code
Mod + c
# Launch dmenu
Mod + d
# Launch pcmanfm
Mod + e
# Launch slack
Mod + m
# Launch signal
Mod + y
# Launch maim
Mod + x
# Launch i3lock
Mod + slash
```
## Project Goals
- [x] A computer wholly defined in code.
- [x] Only one command required to start.
- [x] Accessible from anywhere.
- [x] Only one command required to start from scratch.

View file

@ -36,7 +36,6 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && \
RUN apt-get update -qq && \
DEBIAN_FRONTEND=noninteractive apt-get install -qq --fix-missing \
alsa-utils \
alttab \
apt-utils \
arandr \
asciinema \
@ -79,7 +78,6 @@ RUN apt-get update -qq && \
neovim \
net-tools \
netcat-openbsd \
nnn \
numlockx \
openssl \
openvpn \
@ -89,6 +87,7 @@ RUN apt-get update -qq && \
python-pip \
python3 \
python3-pip \
ranger \
ruby \
software-properties-common \
ssh \
@ -128,7 +127,7 @@ RUN wget -O bat.deb -qnv https://github.com/sharkdp/bat/releases/download/v0.9.0
rm bat.deb
# Install alacritty
RUN wget -O alacritty.deb -nv https://github.com/jwilm/alacritty/releases/download/v0.2.9/Alacritty-v0.2.9_amd64.deb && \
RUN wget -O alacritty.deb -nv https://github.com/jwilm/alacritty/releases/download/v0.3.3/Alacritty-v0.3.3-ubuntu_18_04_amd64.deb && \
dpkg -i alacritty.deb && \
rm alacritty.deb
@ -230,7 +229,7 @@ RUN add-apt-repository ppa:kgilmer/speed-ricer && \
apt-get install -qq i3blocks i3-gaps i3lock-fancy && \
sed -i 's/TEXT=".*"/TEXT=""/' /usr/bin/i3lock-fancy && \
wget -qnv -O /usr/share/i3lock-fancy/lock.png http://png-pixel.com/1x1-00000000.png && \
pip3 install --user i3-resurrect && \
pip3 install --user i3-resurrect==1.3.2 && \
pip3 install --force --user i3-workspace-names-daemon
# Install jobber
@ -318,6 +317,11 @@ RUN wget -O code.deb -nv https://go.microsoft.com/fwlink/?LinkID=760868 && \
wget -O /usr/local/bin/shfmt -nv https://github.com/mvdan/sh/releases/download/v2.6.3/shfmt_v2.6.3_linux_amd64 && \
chmod +x /usr/local/bin/shfmt
# Install warnai
RUN apt-get update -qq && \
apt-get install -qq inkscape optipng xfconf && \
git clone --depth 1 https://github.com/reorr/warnai /opt/warnai
# Install xava
RUN apt-get update -qq && \
apt-get install -qq \
@ -395,30 +399,10 @@ RUN chown -R $USER:$USER $HOME /opt
USER $USER
WORKDIR $HOME
# If the DOTFILES_CACHEBUST build arg is supplied, rebuild from dotfiles onwards
ARG DOTFILES_CACHEBUST
RUN DOTFILES_CACHEBUST=$DOTFILES_CACHEBUST echo "Building from dotfiles..."
# Clone dotfiles configuration
RUN vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-alacritty.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-alsa.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-autorandr.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-code.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-compton.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-crt.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-dunst.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-git.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-i3.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-jobber.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-mime.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-mpd.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-musikcube.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-ncmpcpp.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-scripts.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-ssh.git & \
# Clone large dotfiles and those that require post install
RUN vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-gtk.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-tmux.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-x11.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-xdg.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-zsh.git & \
wait
@ -428,13 +412,36 @@ RUN zsh -c "source $HOME/.zshrc"
# Cache tmux plugins
RUN zsh -c $HOME/.tmux/plugins/tpm/bin/install_plugins
# Configure lazygit
RUN mkdir -p $HOME/.config/jesseduffield/lazygit && \
echo 'reporting: "off"' > $HOME/.config/jesseduffield/lazygit/config.yml
# If the DOTFILES_CACHEBUST build arg is supplied, rebuild from static dotfiles onwards
ARG DOTFILES_CACHEBUST
RUN DOTFILES_CACHEBUST=$DOTFILES_CACHEBUST echo "Building from dotfiles..."
# Clone static dotfiles
RUN vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-alacritty.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-alsa.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-autorandr.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-code.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-compton.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-crt.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-dnsmasq.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-dunst.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-git.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-i3.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-jobber.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-mime.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-mpd.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-musikcube.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-ncmpcpp.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-pcmanfm.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-ranger.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-scripts.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-ssh.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-tmux.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-xdg.git & \
vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-zsh.git & \
wait
# Record container build information
ARG DESKTOP_CONTAINER_BUILD_DATE
ARG DESKTOP_CONTAINER_GIT_SHA
ENV CONTAINER_BUILD_DATE $DESKTOP_CONTAINER_BUILD_DATE
ENV CONTAINER_GIT_SHA $DESKTOP_CONTAINER_GIT_SHA
ENV CONTAINER_IMAGE_NAME sabrehagen/desktop-environment

View file

@ -4,7 +4,6 @@ REPO_ROOT=$(dirname $(readlink -f $0))/../..
eval "$($REPO_ROOT/docker/scripts/environment.sh)"
docker build \
--build-arg DESKTOP_CONTAINER_BUILD_DATE=$(date +%s) \
--build-arg DESKTOP_CONTAINER_GIT_SHA=$(git --git-dir $REPO_ROOT/.git rev-parse HEAD | cut -b 1-7) \
--build-arg DESKTOP_ENVIRONMENT_USER=$DESKTOP_ENVIRONMENT_USER \
--build-arg DOTFILES_CACHEBUST=$(cat $REPO_ROOT/.dotfiles-cachebust 2>/dev/null) \

View file

@ -1,8 +1,5 @@
REPO_ROOT=$(dirname $(readlink -f $0))/../..
DESKTOP_ENVIRONMENT_CLOUDFLARE_DOMAIN=jacksondelahunt.com
DESKTOP_ENVIRONMENT_CLOUDFLARE_EMAIL=jackson@jacksondelahunt.com
DESKTOP_ENVIRONMENT_CONTAINER_NAME=desktop-environment
DESKTOP_ENVIRONMENT_REGISTRY=sabrehagen
DESKTOP_ENVIRONMENT_USER=jackson
@ -18,10 +15,6 @@ echo export DESKTOP_ENVIRONMENT_USER=$DESKTOP_ENVIRONMENT_USER
echo export DESKTOP_ENVIRONMENT_USER_HOME=$DESKTOP_ENVIRONMENT_USER_HOME
echo export DESKTOP_ENVIRONMENT_USER_ID=1000
# Desktop environment cloudflare configuration
echo export DESKTOP_ENVIRONMENT_CLOUDFLARE_DOMAIN=$DESKTOP_ENVIRONMENT_CLOUDFLARE_DOMAIN
echo export DESKTOP_ENVIRONMENT_CLOUDFLARE_EMAIL=$DESKTOP_ENVIRONMENT_CLOUDFLARE_EMAIL
# Desktop environment docker configuration
echo export DESKTOP_ENVIRONMENT_DOCKER_NETWORK=$DESKTOP_ENVIRONMENT_REGISTRY-$DESKTOP_ENVIRONMENT_CONTAINER_NAME
echo export DESKTOP_ENVIRONMENT_DOCKER_REPOSITORY=/$DESKTOP_ENVIRONMENT_CONTAINER_NAME