diff --git a/common/etc/ssh/ssh_config b/common/etc/ssh/ssh_config index 4daaf2d..8000509 100644 --- a/common/etc/ssh/ssh_config +++ b/common/etc/ssh/ssh_config @@ -14,6 +14,8 @@ Host home-gw Host router HostName 192.168.255.1 User vyos +Host sandbox + HostName sandbox.server.home.arpa Host vps HostName vps.strypsteen.com Host * diff --git a/containers/code-server/Containerfile b/containers/code-server/Containerfile index a68e704..78b093a 100644 --- a/containers/code-server/Containerfile +++ b/containers/code-server/Containerfile @@ -12,6 +12,7 @@ RUN mkdir -p /home/coder/.config/systemd/user/default.target.wants RUN ln -s /etc/systemd/user/code-server.service /home/coder/.config/systemd/user/default.target.wants RUN rustup-init -y USER root +COPY polkit.service /etc/systemd/system COPY override.conf /etc/systemd/system/user@.service.d COPY code-server.service /etc/systemd/user ENTRYPOINT /sbin/init diff --git a/containers/code-server/polkit.service b/containers/code-server/polkit.service new file mode 100644 index 0000000..84c3c78 --- /dev/null +++ b/containers/code-server/polkit.service @@ -0,0 +1,5 @@ +[Service] +Type=dbus +BusName=org.freedesktop.PolicyKit1 +ExecStart=/usr/lib/polkit-1/polkitd --no-debug +User=polkitd diff --git a/sandbox/etc/containers/systemd/code-server.container b/sandbox/etc/containers/systemd/code-server.container index 37d7772..08c3cfc 100644 --- a/sandbox/etc/containers/systemd/code-server.container +++ b/sandbox/etc/containers/systemd/code-server.container @@ -1,11 +1,15 @@ [Container] Image=git.strypsteen.com/mathieu/code-server ReadOnly=false +AddDevice=/dev/kvm +AddDevice=/dev/net/tun Volume=/var/lib/system-config/container-config/code-server/settings.json:/home/coder/.local/share/code-server/Machine/settings.json:z,ro Volume=code-server-settings.volume:/home/coder/.local/share/code-server:U,Z Volume=code-server-ssh.volume:/home/coder/.ssh:U,Z Volume=code-server-projects.volume:/home/coder/projects:U,Z -Volume=/etc/gitconfig:/etc/gitconfig:z,ro +Volume=/var/lib/system-config/common/etc/gitconfig:/etc/gitconfig:z,ro +Volume=/var/lib/system-config/common/etc/ssh/ssh_config:/etc/ssh/ssh_config:z,ro +Volume=/var/lib/system-config/common/etc/vimrc:/etc/vimrc:z,ro Secret=CODE_SERVER_PASSWORD,type=env,target=PASSWORD PublishPort=8080:8080 AutoUpdate=registry