This commit is contained in:
Jackson Delahunt 2019-02-14 22:36:08 +11:00
parent add7a4476b
commit 6990c70449
5 changed files with 24 additions and 19 deletions

View file

@ -6,18 +6,17 @@ My [daily driver](https://cloud.docker.com/repository/docker/sabrehagen/desktop-
Use a new GitHub [Personal Access Token](https://github.com/settings/tokens/new) for [`DESKTOP_ENVIRONMENT_GITHUB_TOKEN`](scripts/credentials.sh#L2) on each device running the desktop environmment.
On a clean install of Ubuntu 18.10+ run as `root`:
```sh
# Clone docker environment.
git clone https://github.com/sabrehagen/desktop-environment && cd desktop-environment
# Clone desktop environment
git clone https://github.com/sabrehagen/desktop-environment
# Bootstrap docker host.
./scripts/bootstrap-host.sh
# Provide repository with github access
echo DESKTOP_ENVIRONMENT_GITHUB_TOKEN=... > desktop-environment/scripts/credentials.sh
# Become non-root user.
su jackson
# Start the environment.
./scripts/refresh.sh
# Start desktop environment
desktop-environment/scripts/bootstrap-host.sh
```
## Forking

View file

@ -1,2 +1,7 @@
# Start a desktop environment terminal detached from this shell
nohup alacritty </dev/null >/dev/null 2>&1 &
REPO_ROOT=$(dirname $(realpath $0))/..
# Export desktop environment shell configuration
export $(sh $REPO_ROOT/scripts/environment.sh)
# Start a desktop environment detached from this shell
gosu $DESKTOP_ENVIRONMENT_USER nohup alacritty </dev/null >/dev/null 2>&1 &

View file

@ -85,14 +85,14 @@ cp $REPO_ROOT/scripts/credentials.sh $HOST_REGISTRY/scripts/credentials.sh
chown -R $HOST_USER:$HOST_USER /$HOST_USER $HOST_REPOSITORY
# Install dotfiles configuration for host user
su -c "vcsh clone https://github.com/sabrehagen/dotfiles-alacritty.git" $HOST_USER
su -c "vcsh clone https://github.com/sabrehagen/dotfiles-autostart.git" $HOST_USER
su -c "vcsh clone https://github.com/sabrehagen/dotfiles-kwin.git" $HOST_USER
su -c "vcsh clone https://${DESKTOP_ENVIRONMENT_GITHUB_TOKEN}@github.com/sabrehagen/dotfiles-ssh.git" $HOST_USER
su -c "vcsh clone https://github.com/sabrehagen/dotfiles-scripts.git" $HOST_USER
gosu $HOST_USER vcsh clone https://github.com/sabrehagen/dotfiles-alacritty.git
gosu $HOST_USER vcsh clone https://github.com/sabrehagen/dotfiles-autostart.git
gosu $HOST_USER vcsh clone https://github.com/sabrehagen/dotfiles-kwin.git
gosu $HOST_USER vcsh clone https://${DESKTOP_ENVIRONMENT_GITHUB_TOKEN}@github.com/sabrehagen/dotfiles-ssh.git
gosu $HOST_USER vcsh clone https://github.com/sabrehagen/dotfiles-scripts.git
# Manually execute startup script to prepare host machine
# Manually execute startup script to simulate host startup
$HOST_HOME/.config/scripts/startup.sh
# Start the desktop environment as the host user
su -c "$HOST_REPOSITORY/scripts/refresh.sh" $HOST_USER
# Recycle the desktop environment
$HOST_REPOSITORY/scripts/recycle.sh

View file

@ -22,6 +22,7 @@ docker run \
--rm \
--security-opt seccomp:$REPO_ROOT/config/chrome/chrome.json \
--tty \
--user $DESKTOP_ENVIRONMENT_USER \
--volume /dev/shm:/dev/shm \
--volume /etc/localtime:/etc/localtime:ro \
--volume /run/systemd:/run/systemd \