From c0d903524a424b4f24ea83ebd612d38f89169f21 Mon Sep 17 00:00:00 2001 From: sneak Date: Wed, 8 Jul 2020 00:26:10 -0700 Subject: [PATCH] found it like this --- Dockerfile | 2 ++ Makefile | 2 +- build/root.sh | 6 +++--- build/user.sh | 1 + root/etc/service/sshd/run | 3 +++ root/home/user/.config/nixpkgs/config.nix | 1 + 6 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 root/etc/service/sshd/run diff --git a/Dockerfile b/Dockerfile index 4c8fc2f..283869c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -46,6 +46,8 @@ ARG SYSTEM_PACKAGES="\ tmux \ " +RUN /bin/bash -c "echo -e 'Y\n\n' | /usr/local/sbin/unminimize" + RUN \ apt update && \ apt -y upgrade && \ diff --git a/Makefile b/Makefile index 6ca5dd3..bb8b917 100644 --- a/Makefile +++ b/Makefile @@ -10,4 +10,4 @@ build: 2>&1 | tee -a build.log enter: - docker run -ti --rm=true -e HOME=/home/user -e USER=user --user=user -v /home/sneak:/home/user/.home sneak/work /home/user/.nix-profile/bin/zsh + docker run -ti --rm=true -e HOME=/home/user -e USER=user --user=user -v /home/sneak:/home/user/.home sneak/work /home/user/.nix-profile/bin/zsh -l diff --git a/build/root.sh b/build/root.sh index 111dbf2..fa249c6 100644 --- a/build/root.sh +++ b/build/root.sh @@ -44,7 +44,7 @@ ln -s /hostroot/root /root/.home mkdir -p /home/user/.ssh cp /root/.ssh/authorized_keys /home/user/.ssh/authorized_keys -echo chown -Rv $UID_TO_ADD:$GID_TO_ADD /home/user -chown -Rv $UID_TO_ADD:$GID_TO_ADD /home/user - +chown -R $UID_TO_ADD:$GID_TO_ADD /home/user echo "$USERNAME_TO_ADD ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/user + + diff --git a/build/user.sh b/build/user.sh index 2ece467..c1711d1 100644 --- a/build/user.sh +++ b/build/user.sh @@ -34,6 +34,7 @@ nix-env -i myPackages # oh-my-zsh curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh > /tmp/installomz.sh export ZSH="$HOME/.zsh" +export KEEP_ZSHRC=yes zsh /tmp/installomz.sh && rm /tmp/installomz.sh diff --git a/root/etc/service/sshd/run b/root/etc/service/sshd/run new file mode 100644 index 0000000..203b64f --- /dev/null +++ b/root/etc/service/sshd/run @@ -0,0 +1,3 @@ +#!/bin/bash + +exec /usr/sbin/sshd -D diff --git a/root/home/user/.config/nixpkgs/config.nix b/root/home/user/.config/nixpkgs/config.nix index 1648623..bc0cef1 100644 --- a/root/home/user/.config/nixpkgs/config.nix +++ b/root/home/user/.config/nixpkgs/config.nix @@ -25,6 +25,7 @@ vim weechat wget + zsh ]; };