Compare commits
34 Commits
b7b09db4c5
...
master
Author | SHA1 | Date | |
---|---|---|---|
95b6480323 | |||
2b19cccdbc | |||
5483cf71bd | |||
b0c6750585 | |||
fce5d72b19 | |||
bdac248845 | |||
1c7bc517dd | |||
1e8bb0521c | |||
9577707dd5 | |||
d15950f86c | |||
50907b9519 | |||
62d6833cdc | |||
e5dc78049a | |||
a3f393b844 | |||
fd7e83ccff | |||
bc7d65a24b | |||
ed3dc4bb8f | |||
9d0c18f94b | |||
7f4913f942 | |||
3c25755a27 | |||
1a9023b25f | |||
1652edccd0 | |||
aa9dfca6c1 | |||
2448ce6ab3 | |||
c6503fa9dd | |||
1ced08a364 | |||
44eff8fc7f | |||
bfcb9175ec | |||
e319884921 | |||
7e4aaa2dec | |||
f0559a240f | |||
a2ea4e6344 | |||
bc3db0abae | |||
77435d3748 |
@ -14,5 +14,5 @@ replace_home() {
|
|||||||
find .config -type d -exec chmod g+x {} +
|
find .config -type d -exec chmod g+x {} +
|
||||||
|
|
||||||
replace_home "$PWD" "/home/devuser"
|
replace_home "$PWD" "/home/devuser"
|
||||||
tar -czf home.tar.gz --owner root:0 --group secproc:1002 --xform "s,$PWD,/home/devuser," .config .local .ssh start.sh
|
tar --mode=a=r,u+w,a+x -czf home.tar.gz --owner root:0 --group root:0 --xform "s,$PWD,/home/devuser," .config .local .ssh
|
||||||
replace_home "/home/devuser" "$PWD"
|
replace_home "/home/devuser" "$PWD"
|
||||||
|
5
.bin/install-config.sh
Executable file
5
.bin/install-config.sh
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
#!/usr/bin/env fish
|
||||||
|
|
||||||
|
fisher install patrickf1/fzf.fish jorgebucaran/autopair.fish gazorby/fish-abbreviation-tips jethrokuan/z
|
||||||
|
echo 'function fish_greeting; fortune; end' >"$HOME"/.config/fish/functions/fish_greeting.fish
|
||||||
|
echo 'starship init fish | source' >"$HOME"/.config/fish/config.fish
|
@ -24,7 +24,5 @@ if ! tmux has-session -t "$SESSION" 2>/dev/null; then
|
|||||||
tmux new-session -d -s "$SESSION" -n editor 'HOME='"$HOME"' XDG_STATE_HOME='"$HOME/.state"' /usr/bin/fish'
|
tmux new-session -d -s "$SESSION" -n editor 'HOME='"$HOME"' XDG_STATE_HOME='"$HOME/.state"' /usr/bin/fish'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
tmux send-keys -t $SESSION:editor 'fisher install jorgebucaran/fisher pure-fish/pure patrickf1/fzf.fish jorgebucaran/autopair.fish gazorby/fish-abbreviation-tips jethrokuan/z' Enter
|
|
||||||
|
|
||||||
# Attach to it
|
# Attach to it
|
||||||
exec tmux attach -t "$SESSION"
|
exec tmux attach -t "$SESSION"
|
||||||
|
1
.config/fish/config.fish
Normal file
1
.config/fish/config.fish
Normal file
@ -0,0 +1 @@
|
|||||||
|
starship init fish | source
|
4
.config/fish/fish_plugins
Normal file
4
.config/fish/fish_plugins
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
patrickf1/fzf.fish
|
||||||
|
jorgebucaran/autopair.fish
|
||||||
|
gazorby/fish-abbreviation-tips
|
||||||
|
jethrokuan/z
|
1
.config/fish/functions/fish_greeting.fish
Normal file
1
.config/fish/functions/fish_greeting.fish
Normal file
@ -0,0 +1 @@
|
|||||||
|
function fish_greeting; fortune; end
|
@ -21,6 +21,7 @@
|
|||||||
"lazyvim.plugins.extras.lang.json",
|
"lazyvim.plugins.extras.lang.json",
|
||||||
"lazyvim.plugins.extras.lang.markdown",
|
"lazyvim.plugins.extras.lang.markdown",
|
||||||
"lazyvim.plugins.extras.lang.python",
|
"lazyvim.plugins.extras.lang.python",
|
||||||
|
"lazyvim.plugins.extras.lang.rust",
|
||||||
"lazyvim.plugins.extras.lang.scala",
|
"lazyvim.plugins.extras.lang.scala",
|
||||||
"lazyvim.plugins.extras.lang.sql",
|
"lazyvim.plugins.extras.lang.sql",
|
||||||
"lazyvim.plugins.extras.lang.toml",
|
"lazyvim.plugins.extras.lang.toml",
|
||||||
@ -35,4 +36,4 @@
|
|||||||
"NEWS.md": "10960"
|
"NEWS.md": "10960"
|
||||||
},
|
},
|
||||||
"version": 8
|
"version": 8
|
||||||
}
|
}
|
@ -431,9 +431,9 @@ tmux_conf_uninstall_plugins_on_reload=true
|
|||||||
# visit https://github.com/tmux-plugins for available plugins
|
# visit https://github.com/tmux-plugins for available plugins
|
||||||
#set -g @plugin 'tmux-plugins/tmux-copycat'
|
#set -g @plugin 'tmux-plugins/tmux-copycat'
|
||||||
#set -g @plugin 'tmux-plugins/tmux-cpu'
|
#set -g @plugin 'tmux-plugins/tmux-cpu'
|
||||||
#set -g @plugin 'tmux-plugins/tmux-resurrect'
|
set -g @plugin 'tmux-plugins/tmux-resurrect'
|
||||||
#set -g @plugin 'tmux-plugins/tmux-continuum'
|
set -g @plugin 'tmux-plugins/tmux-continuum'
|
||||||
#set -g @continuum-restore 'on'
|
set -g @continuum-restore 'on'
|
||||||
|
|
||||||
set -g @plugin 'catppuccin/tmux'
|
set -g @plugin 'catppuccin/tmux'
|
||||||
|
|
||||||
|
7
.gitignore
vendored
7
.gitignore
vendored
@ -2,6 +2,11 @@ logs
|
|||||||
.local
|
.local
|
||||||
.cache
|
.cache
|
||||||
.state
|
.state
|
||||||
.config/fish
|
.config/fish/*/*
|
||||||
|
.config/fish/fish_variables
|
||||||
|
!.config/fish/config.fish
|
||||||
|
!.config/fish/fish_plugins
|
||||||
|
!.config/fish/functions/fish_greeting.fish
|
||||||
.npm
|
.npm
|
||||||
.config/nvim/lazy-lock.json
|
.config/nvim/lazy-lock.json
|
||||||
|
home.tar.gz
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
Host alps
|
Host alps
|
||||||
HostName 10.88.0.1
|
HostName 10.88.0.1
|
||||||
User git
|
User git
|
||||||
IdentityFile ~/.ssh/id_ed25519
|
|
||||||
IdentitiesOnly yes
|
IdentitiesOnly yes
|
||||||
StrictHostKeyChecking yes
|
StrictHostKeyChecking yes
|
||||||
Port 2222
|
Port 2222
|
||||||
@ -10,7 +9,6 @@ Host alps
|
|||||||
Host github
|
Host github
|
||||||
HostName github.com
|
HostName github.com
|
||||||
User git
|
User git
|
||||||
IdentityFile ~/.ssh/id_ed25519
|
|
||||||
IdentitiesOnly yes
|
IdentitiesOnly yes
|
||||||
StrictHostKeyChecking yes
|
StrictHostKeyChecking yes
|
||||||
ProxyCommand none
|
ProxyCommand none
|
||||||
|
35
.vscode/tasks.json
vendored
35
.vscode/tasks.json
vendored
@ -40,22 +40,6 @@
|
|||||||
"problemMatcher": [],
|
"problemMatcher": [],
|
||||||
"detail": "Copy Containerfile to $HOME/"
|
"detail": "Copy Containerfile to $HOME/"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"label": "GitOps(Update): ssh_router.sh",
|
|
||||||
"type": "shell",
|
|
||||||
"command": ".bin/gitops update ssh_router",
|
|
||||||
"group": "build",
|
|
||||||
"problemMatcher": [],
|
|
||||||
"detail": "Copy ssh_router.sh to $HOME/.local/bin/"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "GitOps(Update): gitops_router.sh",
|
|
||||||
"type": "shell",
|
|
||||||
"command": ".bin/gitops update gitops_router",
|
|
||||||
"group": "build",
|
|
||||||
"problemMatcher": [],
|
|
||||||
"detail": "Copy gitops_router.sh to $HOME/.local/bin"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"label": "GitOps(Update): home.tar.gz",
|
"label": "GitOps(Update): home.tar.gz",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
@ -73,12 +57,12 @@
|
|||||||
"detail": "Copy gitconfig.template to $HOME/"
|
"detail": "Copy gitconfig.template to $HOME/"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "GitOps(Update): validate_command_access.sh",
|
"label": "GitOps(Update): start.sh",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"command": ".bin/gitops update validate_command",
|
"command": ".bin/gitops update start.sh",
|
||||||
"group": "build",
|
"group": "build",
|
||||||
"problemMatcher": [],
|
"problemMatcher": [],
|
||||||
"detail": "Copy validate_command_access.sh to $HOME/.local/bin"
|
"detail": "Copy start.sh to $HOME/"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Create home tarball",
|
"label": "Create home tarball",
|
||||||
@ -110,6 +94,13 @@
|
|||||||
"problemMatcher": [],
|
"problemMatcher": [],
|
||||||
"detail": "run podman rm $args on remote"
|
"detail": "run podman rm $args on remote"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"label": "GitOps: Remove workspace image",
|
||||||
|
"type": "shell",
|
||||||
|
"command": ".bin/gitops rmi ${input:images}",
|
||||||
|
"problemMatcher": [],
|
||||||
|
"detail": "run podman rmi $args on remote"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"label": "Cleanup worktree",
|
"label": "Cleanup worktree",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
@ -125,6 +116,12 @@
|
|||||||
"description": "Pick a container",
|
"description": "Pick a container",
|
||||||
"options": ["pallav", "palak", "param", "darshan"],
|
"options": ["pallav", "palak", "param", "darshan"],
|
||||||
"default": "pallav"
|
"default": "pallav"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "images",
|
||||||
|
"type": "promptString",
|
||||||
|
"description": "space separated list of images",
|
||||||
|
"default": ""
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -4,23 +4,22 @@
|
|||||||
FROM archlinux:base-devel-20250511.0.348143 as base
|
FROM archlinux:base-devel-20250511.0.348143 as base
|
||||||
|
|
||||||
ARG DEV_USER=devuser
|
ARG DEV_USER=devuser
|
||||||
ARG DEV_UID=1001
|
ARG DEV_UID=1000
|
||||||
ARG DEV_GID=1001
|
ARG DEV_GID=1000
|
||||||
|
|
||||||
# Install all necessary packages and clean up cache
|
# Install all necessary packages and clean up cache
|
||||||
RUN pacman -Sy --noconfirm && \
|
RUN pacman -Sy --noconfirm && \
|
||||||
pacman -S --noconfirm --needed \
|
pacman -S --noconfirm --needed \
|
||||||
base-devel neovim git git-lfs fish tmux go-yq \
|
base-devel neovim git git-lfs fish tmux go-yq rust starship podman \
|
||||||
nodejs python podman fzf fd ripgrep jdk-openjdk fisher yazi less \
|
nodejs python fzf fd ripgrep jdk-openjdk fisher yazi less rust-analyzer \
|
||||||
lazygit luarocks python-pynvim npm bash-completion tree-sitter-cli kitty-terminfo \
|
lazygit luarocks python-pynvim npm bash-completion tree-sitter-cli kitty-terminfo \
|
||||||
lua51 openssh && \
|
lua51 openssh fortune-mod podman-compose podman-docker && \
|
||||||
pacman -Scc --noconfirm && \
|
pacman -Scc --noconfirm && \
|
||||||
rm -rf /var/cache/pacman/pkg/*
|
rm -rf /var/cache/pacman/pkg/* /usr/bin/sshd /usr/lib/systemd/system/sshd.service
|
||||||
|
|
||||||
# Create user/groups as per your script, with -l to avoid system user quirks
|
# Create user/groups as per your script, with -l to avoid system user quirks
|
||||||
RUN groupadd -g $DEV_GID $DEV_USER && \
|
RUN groupadd -g $DEV_GID $DEV_USER && \
|
||||||
groupadd -g 1002 secproc && \
|
useradd -l -ms /bin/fish -u $DEV_UID -g $DEV_GID $DEV_USER
|
||||||
useradd -l -ms /bin/fish -G secproc -u $DEV_UID -g $DEV_GID $DEV_USER
|
|
||||||
|
|
||||||
# ────────────────────────
|
# ────────────────────────
|
||||||
# Stage 2: Workspace Image
|
# Stage 2: Workspace Image
|
||||||
@ -28,15 +27,19 @@ RUN groupadd -g $DEV_GID $DEV_USER && \
|
|||||||
FROM base as workspace
|
FROM base as workspace
|
||||||
|
|
||||||
ARG DEV_USER=devuser
|
ARG DEV_USER=devuser
|
||||||
ARG DEV_UID=1001
|
ARG DEV_UID=1000
|
||||||
ARG DEV_GID=1001
|
ARG DEV_GID=1000
|
||||||
ARG DEV_HOME=/home/$DEV_USER
|
ARG DEV_HOME=/home/$DEV_USER
|
||||||
|
ARG POD_USER=mypodmanuser
|
||||||
|
ARG POD_UID=1002
|
||||||
|
|
||||||
# Use ADD for extracting archives
|
# Use ADD for extracting archives
|
||||||
ADD home.tar.gz $DEV_HOME
|
ADD home.tar.gz $DEV_HOME
|
||||||
|
COPY --chmod=755 start.sh $DEV_HOME/
|
||||||
|
|
||||||
# Prepare .ssh and known_hosts, and fix permissions only if dirs exist
|
# Prepare .ssh and known_hosts, and fix permissions only if dirs exist
|
||||||
RUN mkdir -p $DEV_HOME/.ssh && \
|
RUN mkdir -p $DEV_HOME/.ssh && \
|
||||||
|
touch /etc/containers/nodocker && \
|
||||||
ssh-keyscan -p 2222 10.88.0.1 >> $DEV_HOME/.ssh/known_hosts && \
|
ssh-keyscan -p 2222 10.88.0.1 >> $DEV_HOME/.ssh/known_hosts && \
|
||||||
ssh-keyscan -p 22 github.com >> $DEV_HOME/.ssh/known_hosts && \
|
ssh-keyscan -p 22 github.com >> $DEV_HOME/.ssh/known_hosts && \
|
||||||
for d in $DEV_HOME/.local \
|
for d in $DEV_HOME/.local \
|
||||||
@ -54,7 +57,10 @@ RUN mkdir -p $DEV_HOME/.ssh && \
|
|||||||
done
|
done
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
ENV CONTAINER_HOST=unix:///run/podman/podman.sock
|
|
||||||
USER $DEV_USER
|
USER $DEV_USER
|
||||||
|
|
||||||
|
RUN podman system connection add my-remote --identity $DEV_HOME/.ssh/id_ed25519 \
|
||||||
|
ssh://$POD_USER@10.88.0.1/run/user/${POD_UID}/podman/podman.sock && \
|
||||||
|
podman system connection default my-remote
|
||||||
|
|
||||||
CMD ["/home/devuser/start.sh"]
|
CMD ["/home/devuser/start.sh"]
|
||||||
|
BIN
home.tar.gz
(Stored with Git LFS)
BIN
home.tar.gz
(Stored with Git LFS)
Binary file not shown.
Reference in New Issue
Block a user