Skip to content

Commit 446b874

Browse files
committed
Update configuration files to change ZSH theme to 'candy', modify sudoers permissions in Dockerfile, and enhance VS Code settings for improved editor experience.
1 parent a5f3de2 commit 446b874

5 files changed

Lines changed: 63 additions & 14 deletions

File tree

tag-browse/config/.demyxrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ EDITOR="nano"
33
POWERLEVEL9K_DISABLE_CONFIGURATION_WIZARD=true
44
TERM="xterm-256color"
55
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#444444"
6-
ZSH_THEME="powerlevel10k/powerlevel10k"
6+
ZSH_THEME="candy"
77
plugins=(git zsh-autosuggestions autoupdate)
8-
source "$DEMYX_CONFIG"/.p10k.zsh
8+
#source "$DEMYX_CONFIG"/.p10k.zsh
99
export GPG_TTY="$TTY"

tag-latest/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ RUN set -ex; \
120120
cp "$DEMYX_CONFIG"/ctop /home/demyx/.ctop; \
121121
\
122122
# sudo
123-
echo "demyx ALL=(ALL) NOPASSWD: /usr/bin/apt" > /etc/sudoers.d/demyx; \
123+
echo "demyx ALL=(ALL) NOPASSWD:SETENV: /usr/bin/apt, /usr/local/bin/demyx-ssh" > /etc/sudoers.d/demyx; \
124124
\
125125
# Set ownership
126126
chown -R root:root /usr/local/bin; \

tag-latest/bin/demyx-ssh

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
#!/bin/bash
2+
# Demyx
3+
# https://demyx.sh
4+
set -eEuo pipefail
5+
#
6+
#
7+
#
8+
demyx_ssh() {
9+
local DEMYX_SSH_HOME=/home/demyx
10+
11+
# Prevents ssh errors from local machine
12+
if [[ -f "${DEMYX_SSH_HOME}"/.ssh/ssh_host_rsa_key ]]; then
13+
if [[ ! -f /etc/ssh/ssh_host_rsa_key ]]; then
14+
cp "${DEMYX_SSH_HOME}"/.ssh/ssh_host_rsa_key /etc/ssh
15+
fi
16+
if [[ ! -f /etc/ssh/ssh_host_rsa_key.pub ]]; then
17+
cp "${DEMYX_SSH_HOME}"/.ssh/ssh_host_rsa_key.pub /etc/ssh
18+
fi
19+
else
20+
if [[ ! -f /etc/ssh/ssh_host_rsa_key ]]; then
21+
ssh-keygen -A >/dev/null
22+
fi
23+
if [[ ! -f "${DEMYX_SSH_HOME}"/.ssh/ssh_host_rsa_key ]]; then
24+
cp /etc/ssh/ssh_host_rsa_key "${DEMYX_SSH_HOME}"/.ssh
25+
fi
26+
if [[ ! -f "${DEMYX_SSH_HOME}"/.ssh/ssh_host_rsa_key.pub ]]; then
27+
cp /etc/ssh/ssh_host_rsa_key.pub "${DEMYX_SSH_HOME}"/.ssh
28+
fi
29+
fi
30+
31+
touch /run/sshd.pid
32+
chown demyx:demyx /run/sshd.pid
33+
chmod 700 "${DEMYX_SSH_HOME}"/.ssh
34+
chmod 600 /etc/ssh/ssh_host_rsa_key
35+
chown demyx:demyx /etc/ssh/ssh_host_rsa_key
36+
chown demyx:demyx /etc/ssh/ssh_host_rsa_key.pub
37+
chown -R demyx:demyx "${DEMYX_SSH_HOME}"
38+
39+
sed -e "s|#PermitRootLogin prohibit-password|PermitRootLogin no|g" \
40+
-e "s|#PubkeyAuthentication|PubkeyAuthentication|g" \
41+
-e "s|#PasswordAuthentication yes|PasswordAuthentication no|g" \
42+
-e "s|#PermitEmptyPasswords no|PermitEmptyPasswords no|g" \
43+
-i /etc/ssh/sshd_config
44+
45+
su -c "/usr/sbin/sshd -E ${DEMYX_LOG}/ssh.log" -s /bin/bash demyx
46+
}
47+
#
48+
#
49+
#
50+
demyx_ssh

tag-latest/config/.demyxrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ EDITOR="nano"
33
POWERLEVEL9K_DISABLE_CONFIGURATION_WIZARD=true
44
TERM="xterm-256color"
55
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#444444"
6-
ZSH_THEME="powerlevel10k/powerlevel10k"
6+
ZSH_THEME="candy"
77
plugins=(git zsh-autosuggestions autoupdate)
8-
source "$DEMYX_CONFIG"/.p10k.zsh
8+
#source "$DEMYX_CONFIG"/.p10k.zsh
99
export GPG_TTY="$TTY"

tag-latest/config/settings.json

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
{
2-
"editor.fontFamily": "'MesloLGS NF', Menlo, Monaco, 'Courier New', monospace",
3-
"editor.quickSuggestions": true,
2+
"editor.insertSpaces": false,
3+
"editor.quickSuggestions": {
4+
"comments": "on",
5+
"strings": "on",
6+
"other": "on"
7+
},
48
"files.autoSave": "onFocusChange",
59
"files.exclude": {
610
"**/.git": true,
@@ -22,16 +26,11 @@
2226
"**/node_modules/**": true,
2327
"**/tmp/**": true
2428
},
25-
"material-icon-theme.showReloadMessage": false,
26-
"material-icon-theme.showUpdateMessage": false,
27-
"material-icon-theme.showWelcomeMessage": false,
28-
"materialTheme.accent": "Teal",
2929
"shellcheck.enableQuickFix": true,
3030
"telemetry.enableTelemetry": false,
3131
"terminal.integrated.cursorBlinking": true,
3232
"terminal.integrated.cursorStyle": "line",
3333
"terminal.integrated.gpuAcceleration": "canvas",
34-
"terminal.integrated.shell.linux": "/bin/zsh",
35-
"workbench.colorTheme": "Material Theme Darker High Contrast",
36-
"workbench.iconTheme": "material-icon-theme"
34+
"workbench.colorTheme": "Catppuccin Mocha",
35+
"workbench.iconTheme": "catppuccin-mocha"
3736
}

0 commit comments

Comments
 (0)