Compare commits

..

30 Commits

Author SHA1 Message Date
95b6480323 Revert "feat: add ssh key into memory"
This reverts commit 2b19cccdbc.
2025-05-23 15:14:08 +00:00
2b19cccdbc feat: add ssh key into memory 2025-05-23 12:12:35 +00:00
5483cf71bd feat: remove secproc group and copy start.sh separately 2025-05-23 11:59:44 +00:00
b0c6750585 feat: remove default key paths 2025-05-23 11:59:16 +00:00
fce5d72b19 feat: set mode, remove secproc group and remove start.sh from tarball 2025-05-23 11:59:00 +00:00
bdac248845 chore: add task to update start.sh script in $HOME/ 2025-05-23 09:50:48 +00:00
1c7bc517dd feat: modify UID:GID to 1000:1000 for container 2025-05-22 16:49:48 +00:00
1e8bb0521c Revert "feat: add devuser to group appuser 1003"
This reverts commit d15950f86c.
2025-05-22 16:10:49 +00:00
9577707dd5 fix: add comma between groups 2025-05-21 15:13:20 +00:00
d15950f86c feat: add devuser to group appuser 1003 2025-05-21 15:07:04 +00:00
50907b9519 feat: remove sshd from openssh package 2025-05-21 10:36:38 +00:00
62d6833cdc feat: supress podman-compose warning 2025-05-20 20:59:24 +00:00
e5dc78049a chore: supress podman-compose warning 2025-05-20 20:53:45 +00:00
a3f393b844 feat: add packages podman-compose and podman-docker 2025-05-20 20:42:50 +00:00
fd7e83ccff feat: add environment var CONTAINER_CONNECTION to start up script 2025-05-20 19:54:19 +00:00
bc7d65a24b fix: run podman as user and correct default command 2025-05-20 18:37:17 +00:00
ed3dc4bb8f feat: add podman package and connection settings 2025-05-20 18:31:24 +00:00
9d0c18f94b Revert "feat: add package python-pip"
This reverts commit 1a9023b25f.
2025-05-20 09:14:08 +00:00
7f4913f942 feat: separate out .config installations into separate script 2025-05-20 09:10:09 +00:00
3c25755a27 chore: ignore home.tar.gz 2025-05-20 09:04:25 +00:00
1a9023b25f feat: add package python-pip 2025-05-20 09:03:47 +00:00
1652edccd0 Remove LFS-tracked file home.tar.gz 2025-05-20 09:01:59 +00:00
aa9dfca6c1 feat: add package rust-analyzer 2025-05-20 08:52:50 +00:00
2448ce6ab3 chore: build home.tar.gz
add rust lazy extra
2025-05-20 07:43:04 +00:00
c6503fa9dd feat: add lang.rust lazy extra plugin 2025-05-20 07:39:03 +00:00
1ced08a364 feat: add fish configuration files 2025-05-20 07:38:24 +00:00
44eff8fc7f feat: add continuum plugin to tmux 2025-05-20 06:53:06 +00:00
bfcb9175ec chore: build home.tar.gz 2025-05-20 06:52:29 +00:00
e319884921 feat: add packages rust startship and fortune-mod 2025-05-20 05:53:13 +00:00
7e4aaa2dec chore: correct task command to remove images 2025-05-17 19:33:18 +00:00
14 changed files with 50 additions and 25 deletions

View File

@ -14,5 +14,5 @@ replace_home() {
find .config -type d -exec chmod g+x {} +
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"

5
.bin/install-config.sh Executable file
View 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

View File

@ -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'
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
exec tmux attach -t "$SESSION"

1
.config/fish/config.fish Normal file
View File

@ -0,0 +1 @@
starship init fish | source

View File

@ -0,0 +1,4 @@
patrickf1/fzf.fish
jorgebucaran/autopair.fish
gazorby/fish-abbreviation-tips
jethrokuan/z

View File

@ -0,0 +1 @@
function fish_greeting; fortune; end

View File

@ -21,6 +21,7 @@
"lazyvim.plugins.extras.lang.json",
"lazyvim.plugins.extras.lang.markdown",
"lazyvim.plugins.extras.lang.python",
"lazyvim.plugins.extras.lang.rust",
"lazyvim.plugins.extras.lang.scala",
"lazyvim.plugins.extras.lang.sql",
"lazyvim.plugins.extras.lang.toml",
@ -35,4 +36,4 @@
"NEWS.md": "10960"
},
"version": 8
}
}

View File

@ -431,9 +431,9 @@ tmux_conf_uninstall_plugins_on_reload=true
# visit https://github.com/tmux-plugins for available plugins
#set -g @plugin 'tmux-plugins/tmux-copycat'
#set -g @plugin 'tmux-plugins/tmux-cpu'
#set -g @plugin 'tmux-plugins/tmux-resurrect'
#set -g @plugin 'tmux-plugins/tmux-continuum'
#set -g @continuum-restore 'on'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @continuum-restore 'on'
set -g @plugin 'catppuccin/tmux'

7
.gitignore vendored
View File

@ -2,6 +2,11 @@ logs
.local
.cache
.state
.config/fish
.config/fish/*/*
.config/fish/fish_variables
!.config/fish/config.fish
!.config/fish/fish_plugins
!.config/fish/functions/fish_greeting.fish
.npm
.config/nvim/lazy-lock.json
home.tar.gz

View File

@ -1,7 +1,6 @@
Host alps
HostName 10.88.0.1
User git
IdentityFile ~/.ssh/id_ed25519
IdentitiesOnly yes
StrictHostKeyChecking yes
Port 2222
@ -10,7 +9,6 @@ Host alps
Host github
HostName github.com
User git
IdentityFile ~/.ssh/id_ed25519
IdentitiesOnly yes
StrictHostKeyChecking yes
ProxyCommand none

10
.vscode/tasks.json vendored
View File

@ -56,6 +56,14 @@
"problemMatcher": [],
"detail": "Copy gitconfig.template to $HOME/"
},
{
"label": "GitOps(Update): start.sh",
"type": "shell",
"command": ".bin/gitops update start.sh",
"group": "build",
"problemMatcher": [],
"detail": "Copy start.sh to $HOME/"
},
{
"label": "Create home tarball",
"type": "shell",
@ -89,7 +97,7 @@
{
"label": "GitOps: Remove workspace image",
"type": "shell",
"command": ".bin/gitops remove ${input:images}",
"command": ".bin/gitops rmi ${input:images}",
"problemMatcher": [],
"detail": "run podman rmi $args on remote"
},

View File

@ -4,23 +4,22 @@
FROM archlinux:base-devel-20250511.0.348143 as base
ARG DEV_USER=devuser
ARG DEV_UID=1001
ARG DEV_GID=1001
ARG DEV_UID=1000
ARG DEV_GID=1000
# Install all necessary packages and clean up cache
RUN pacman -Sy --noconfirm && \
pacman -S --noconfirm --needed \
base-devel neovim git git-lfs fish tmux go-yq \
nodejs python fzf fd ripgrep jdk-openjdk fisher yazi less \
base-devel neovim git git-lfs fish tmux go-yq rust starship podman \
nodejs python fzf fd ripgrep jdk-openjdk fisher yazi less rust-analyzer \
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 && \
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
RUN groupadd -g $DEV_GID $DEV_USER && \
groupadd -g 1002 secproc && \
useradd -l -ms /bin/fish -G secproc -u $DEV_UID -g $DEV_GID $DEV_USER
useradd -l -ms /bin/fish -u $DEV_UID -g $DEV_GID $DEV_USER
# ────────────────────────
# Stage 2: Workspace Image
@ -28,15 +27,19 @@ RUN groupadd -g $DEV_GID $DEV_USER && \
FROM base as workspace
ARG DEV_USER=devuser
ARG DEV_UID=1001
ARG DEV_GID=1001
ARG DEV_UID=1000
ARG DEV_GID=1000
ARG DEV_HOME=/home/$DEV_USER
ARG POD_USER=mypodmanuser
ARG POD_UID=1002
# Use ADD for extracting archives
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
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 22 github.com >> $DEV_HOME/.ssh/known_hosts && \
for d in $DEV_HOME/.local \
@ -56,4 +59,8 @@ RUN mkdir -p $DEV_HOME/.ssh && \
WORKDIR /app
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"]

BIN
home.tar.gz (Stored with Git LFS)

Binary file not shown.

View File

@ -1,2 +1,2 @@
#!/bin/bash
EDITOR=nvim tmux new-session -s "$1"
PODMAN_COMPOSE_WARNING_LOGS=false EDITOR=nvim CONTAINER_CONNECTION=my-remote tmux new-session -s "$1"