commit 2bae9747c946511b605ccaf57f9241a97e3549e1 Author: Yuri Zamyatin Date: Sun Dec 15 23:37:24 2024 +0000 wip diff --git a/README.md b/README.md new file mode 100644 index 0000000..911584b --- /dev/null +++ b/README.md @@ -0,0 +1,10 @@ +# Workspace + +My scripts and configuration. + +Built with multi-user and multi-machine setup in mind (assuming you are in charge). + +- arch-root/ - administrative pc stuff related to hardware, packages, login management, group flow, roaming, etc. +- arch-user/ - all the pc session stuff including window management that reflect my preferences as a user. Tiling wm, colemak, minimalism, vi bindings everywhere. +- deb-vps/ +- android/ diff --git a/arch-root/install.sh b/arch-root/install.sh new file mode 100644 index 0000000..1b37a19 --- /dev/null +++ b/arch-root/install.sh @@ -0,0 +1,75 @@ +#!/bin/bash +set -e + +PACKAGES=( + + # system + base apparmor lvm2 greetd sudo # system + openssh networkmanager man-db restic htop # admin utils + + # cli programs + vifm vim # navigation & editors + dash shellcheck # shell scripting + hugo miniserve neomutt # www + gnupg pass pass-otp # crypt + git zip # others + + # desktop env + sway swaybg xorg-xwayland # basic + foot bemenu-wayland i3blocks mako # terminals, ui + xorg-xev wl-clipboard slurp grim # interaction + ttf-roboto ttf-roboto-mono # fonts + + # gui apps + imv mpv gimp # media + firefox sqlitebrowser qt5-wayland + + # extensions + firefox-tridactyl vim-ale vim-fugitive + +) + +file_has_line() { + grep -qxF "$2" "$1" || echo "$2" >> "$1" +} + +[ "$(id -u)" != "0" ] && echo "ERROR: root required" >&2 && exit 1 + +pacman -Syu +pacman -S --needed "${PACKAGES[@]}" +pacman -S --needed brightnessctl sof-firmware intel-media-driver intel-ucode + +file_has_line "/etc/profile" "umask 002" + +while read -r entity; do + # group + # user [...] + read -ra entity_parts <<< "$entity" + etype="${entity_parts[0]}" + ename="${entity_parts[1]}" + eid="${entity_parts[2]}" + [ "$etype" != "user" ] && [ "$etype" != "group" ] && echo "ERROR: bad entity type" >&2 && exit 1 + + # every user has their own primary group with id matching uid, + # so for each entry we need a usergroup + if [ -z "$(getent group "$eid")" ]; then + echo "Creating group \"$ename\", id=$eid" + groupadd --gid "$eid" "$ename" + fi + if [ "$etype" = "user" ]; then + if ! id "$eid" >/dev/null 2>&1; then + echo "Creating user \"$ename\", id=$eid" + useradd --gid "$eid" --uid "$eid" -m "$ename" + fi + usermod -aG "$(IFS=,; echo "${entity_parts[*]:3}")" "$ename" + else # group + if [[ "$ename" == share-* ]]; then + echo "Creating shared dir $ename" + mkdir -p "/home/$ename" + chgrp "$ename" -R "/home/$ename" + chmod u=rwX,g=rwX,o= -R "/home/$ename" + find "/home/$ename" -type d -print0 | xargs -0 chmod g+s + + fi + fi +done /dev/null + +PS1='\u@\h:\w> ' diff --git a/arch-user/config/bemenu/config.sh b/arch-user/config/bemenu/config.sh new file mode 100644 index 0000000..5428b1a --- /dev/null +++ b/arch-user/config/bemenu/config.sh @@ -0,0 +1,2 @@ +#!/bin/sh +export BEMENU_OPTS="--ignorecase --width-factor 0.5 --fn \"Roboto Mono 14\" --list 500 --border 1 --scrollbar autohide --bdr #9988ff --nb #0d1117d9 --ab #0d1117d9" diff --git a/arch-user/config/foot/foot.ini b/arch-user/config/foot/foot.ini new file mode 100644 index 0000000..4009cae --- /dev/null +++ b/arch-user/config/foot/foot.ini @@ -0,0 +1,255 @@ +# -*- conf -*- + +# shell=$SHELL (if set, otherwise user's default shell from /etc/passwd) +# term=foot (or xterm-256color if built with -Dterminfo=disabled) +# login-shell=no + +# app-id=foot # globally set wayland app-id. Default values are "foot" and "footclient" for desktop and server mode +# title=foot +# locked-title=no +font=Roboto Mono:size=12 +# font-bold= +# font-italic= +# font-bold-italic= +# font-size-adjustment=0.5 +# line-height= +# letter-spacing=0 +# horizontal-letter-offset=0 +# vertical-letter-offset=0 +# underline-offset= +# underline-thickness= +# strikeout-thickness= +# box-drawings-uses-font-glyphs=no +# dpi-aware=no + +# initial-window-size-pixels=700x500 # Or, +# initial-window-size-chars= +# initial-window-mode=windowed +# pad=0x0 # optionally append 'center' +# resize-by-cells=yes +# resize-keep-grid=yes +# resize-delay-ms=100 + +# bold-text-in-bright=no +# word-delimiters=,│`|:"'()[]{}<> +# selection-target=primary +# workers= +# utmp-helper=/usr/lib/utempter/utempter # When utmp backend is ‘libutempter’ (Linux) +# utmp-helper=/usr/libexec/ulog-helper # When utmp backend is ‘ulog’ (FreeBSD) + +[environment] +# name=value + +[bell] +# urgent=no +# notify=no +# visual=no +# command= +# command-focused=no + +[desktop-notifications] +# command=notify-send --wait --app-name ${app-id} --icon ${app-id} --category ${category} --urgency ${urgency} --expire-time ${expire-time} --hint STRING:image-path:${icon} --hint BOOLEAN:suppress-sound:${muted} --hint STRING:sound-name:${sound-name} --replace-id ${replace-id} ${action-argument} --print-id -- ${title} ${body} +# command-action-argument=--action ${action-name}=${action-label} +# close="" +# inhibit-when-focused=yes + + +[scrollback] +# lines=1000 +# multiplier=3.0 +# indicator-position=relative +# indicator-format="" + +[url] +# launch=xdg-open ${url} +# label-letters=sadfjklewcmpgh +# osc8-underline=url-mode +# protocols=http, https, ftp, ftps, file, gemini, gopher +# uri-characters=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.,~:;/?#@!$&%*+="'()[] + +[cursor] +# style=block +# color= +# blink=no +# blink-rate=500 +# beam-thickness=1.5 +# underline-thickness= + +[mouse] +# hide-when-typing=no +# alternate-scroll-mode=yes + +[touch] +# long-press-delay=400 + +[colors] +# alpha=1.0 +background=0d1117 +# foreground=ffffff +# flash=7f7f00 +# flash-alpha=0.5 + +## Normal/regular colors (color palette 0-7) +# regular0=242424 # black +# regular1=f62b5a # red +# regular2=47b413 # green +# regular3=e3c401 # yellow +# regular4=24acd4 # blue +# regular5=f2affd # magenta +# regular6=13c299 # cyan +# regular7=e6e6e6 # white + +## Bright colors (color palette 8-15) +# bright0=616161 # bright black +# bright1=ff4d51 # bright red +# bright2=35d450 # bright green +# bright3=e9e836 # bright yellow +# bright4=5dc5f8 # bright blue +# bright5=feabf2 # bright magenta +# bright6=24dfc4 # bright cyan +# bright7=ffffff # bright white + +## dimmed colors (see foot.ini(5) man page) +# dim0= +# ... +# dim7= + +## The remaining 256-color palette +# 16 = <256-color palette #16> +# ... +# 255 = <256-color palette #255> + +## Sixel colors +# sixel0 = 000000 +# sixel1 = 3333cc +# sixel2 = cc2121 +# sixel3 = 33cc33 +# sixel4 = cc33cc +# sixel5 = 33cccc +# sixel6 = cccc33 +# sixel7 = 878787 +# sixel8 = 424242 +# sixel9 = 545499 +# sixel10 = 994242 +# sixel11 = 549954 +# sixel12 = 995499 +# sixel13 = 549999 +# sixel14 = 999954 +# sixel15 = cccccc + +## Misc colors +# selection-foreground= +# selection-background= +# jump-labels= # black-on-yellow +# scrollback-indicator= # black-on-bright-blue +# search-box-no-match= # black-on-red +# search-box-match= # black-on-yellow +# urls= + +[csd] +# preferred=server +# size=26 +# font= +# color= +# hide-when-maximized=no +# double-click-to-maximize=yes +# border-width=0 +# border-color= +# button-width=26 +# button-color= +# button-minimize-color= +# button-maximize-color= +# button-close-color= + +[key-bindings] +# scrollback-up-page=Shift+Page_Up +# scrollback-up-half-page=none +# scrollback-up-line=none +# scrollback-down-page=Shift+Page_Down +# scrollback-down-half-page=none +# scrollback-down-line=none +# scrollback-home=none +# scrollback-end=none +# clipboard-copy=Control+Shift+c XF86Copy +# clipboard-paste=Control+Shift+v XF86Paste +# primary-paste=Shift+Insert +# search-start=Control+Shift+r +# font-increase=Control+plus Control+equal Control+KP_Add +# font-decrease=Control+minus Control+KP_Subtract +# font-reset=Control+0 Control+KP_0 +# spawn-terminal=Control+Shift+n +# minimize=none +# maximize=none +# fullscreen=none +# pipe-visible=[sh -c "xurls | fuzzel | xargs -r firefox"] none +# pipe-scrollback=[sh -c "xurls | fuzzel | xargs -r firefox"] none +# pipe-selected=[xargs -r firefox] none +# pipe-command-output=[wl-copy] none # Copy last command's output to the clipboard +# show-urls-launch=Control+Shift+o +# show-urls-copy=none +# show-urls-persistent=none +# prompt-prev=Control+Shift+z +# prompt-next=Control+Shift+x +# unicode-input=Control+Shift+u +# noop=none + +[search-bindings] +# cancel=Control+g Control+c Escape +# commit=Return +# find-prev=Control+r +# find-next=Control+s +# cursor-left=Left Control+b +# cursor-left-word=Control+Left Mod1+b +# cursor-right=Right Control+f +# cursor-right-word=Control+Right Mod1+f +# cursor-home=Home Control+a +# cursor-end=End Control+e +# delete-prev=BackSpace +# delete-prev-word=Mod1+BackSpace Control+BackSpace +# delete-next=Delete +# delete-next-word=Mod1+d Control+Delete +# extend-char=Shift+Right +# extend-to-word-boundary=Control+w Control+Shift+Right +# extend-to-next-whitespace=Control+Shift+w +# extend-line-down=Shift+Down +# extend-backward-char=Shift+Left +# extend-backward-to-word-boundary=Control+Shift+Left +# extend-backward-to-next-whitespace=none +# extend-line-up=Shift+Up +# clipboard-paste=Control+v Control+Shift+v Control+y XF86Paste +# primary-paste=Shift+Insert +# unicode-input=none +# quit=none +# scrollback-up-page=Shift+Page_Up +# scrollback-up-half-page=none +# scrollback-up-line=none +# scrollback-down-page=Shift+Page_Down +# scrollback-down-half-page=none +# scrollback-down-line=none +# scrollback-home=none +# scrollback-end=none + +[url-bindings] +# cancel=Control+g Control+c Control+d Escape +# toggle-url-visible=t + +[text-bindings] +# \x03=Mod4+c # Map Super+c -> Ctrl+c + +[mouse-bindings] +# scrollback-up-mouse=BTN_WHEEL_BACK +# scrollback-down-mouse=BTN_WHEEL_FORWARD +# font-increase=Control+BTN_WHEEL_BACK +# font-decrease=Control+BTN_WHEEL_FORWARD +# selection-override-modifiers=Shift +# primary-paste=BTN_MIDDLE +# select-begin=BTN_LEFT +# select-begin-block=Control+BTN_LEFT +# select-extend=BTN_RIGHT +# select-extend-character-wise=Control+BTN_RIGHT +# select-word=BTN_LEFT-2 +# select-word-whitespace=Control+BTN_LEFT-2 +# select-quote = BTN_LEFT-3 +# select-row=BTN_LEFT-4 + +# vim: ft=dosini diff --git a/arch-user/config/git/config b/arch-user/config/git/config new file mode 100644 index 0000000..d6444aa --- /dev/null +++ b/arch-user/config/git/config @@ -0,0 +1,7 @@ +[user] + email = yuri@yrz.am + name = Yuri Zamyatin +[init] + defaultBranch = main +[pull] + rebase = false diff --git a/arch-user/config/i3blocks/battery b/arch-user/config/i3blocks/battery new file mode 100755 index 0000000..0081394 --- /dev/null +++ b/arch-user/config/i3blocks/battery @@ -0,0 +1,12 @@ +#!/bin/sh + +set -- /sys/class/power_supply/*/capacity; +read cap < "$1" +read st < "/sys/class/power_supply/ACAD/online" || true + +if [ "$st" = "1" ]; then + echo "⚡$cap▴" +else + echo "⚡$cap▾" + [ "$cap" -lt "15" ] && exit 33 +fi diff --git a/arch-user/config/i3blocks/config b/arch-user/config/i3blocks/config new file mode 100644 index 0000000..3d6df1c --- /dev/null +++ b/arch-user/config/i3blocks/config @@ -0,0 +1,10 @@ +separator_block_width=15 + +[batterybar] +command=~/.config/i3blocks/battery +interval=10 + +[time] +command=date +"%Y-%m-%dT%H:%M:%SZ" +interval=1 + diff --git a/arch-user/config/profile b/arch-user/config/profile new file mode 100644 index 0000000..b75df95 --- /dev/null +++ b/arch-user/config/profile @@ -0,0 +1,4 @@ +#!/bin/bash + +export SESSION_START_COMMAND=sway +export PATH=$PATH:~/scripts diff --git a/arch-user/config/sway/config.tmpl b/arch-user/config/sway/config.tmpl new file mode 100644 index 0000000..58c83ba --- /dev/null +++ b/arch-user/config/sway/config.tmpl @@ -0,0 +1,98 @@ +# vim: filetype=swayconfig + +set $mod Mod4 +set $left n +set $down e +set $up i +set $right o + +################ inputs #################### +input "type:keyboard" { + xkb_layout us(colemak_yz),us(basic),ru +} +bindsym $mod+0 input "type:keyboard" xkb_switch_layout next +input "type:touchpad" { + dwt enabled + tap enabled + natural_scroll enabled + middle_emulation enabled +} +############################################ + +############### workspaces ################# +bindsym --to-code $mod+x workspace x +bindsym --to-code $mod+c workspace c +bindsym --to-code $mod+d workspace d +bindsym --to-code $mod+v workspace v +bindsym --to-code $mod+z workspace z +bindsym --to-code $mod+k workspace k +bindsym --to-code $mod+h workspace h +bindsym --to-code $mod+Control+x move container to workspace x +bindsym --to-code $mod+Control+c move container to workspace c +bindsym --to-code $mod+Control+d move container to workspace d +bindsym --to-code $mod+Control+v move container to workspace v +bindsym --to-code $mod+Control+z move container to workspace z +bindsym --to-code $mod+Control+k move container to workspace k +bindsym --to-code $mod+Control+h move container to workspace h +bindgesture swipe:right workspace prev +bindgesture swipe:left workspace next +############################################ + +############### containers ################# +bindsym --to-code $mod+$left focus left +bindsym --to-code $mod+$down focus down +bindsym --to-code $mod+$up focus up +bindsym --to-code $mod+$right focus right +bindsym --to-code $mod+Control+$left move left +bindsym --to-code $mod+Control+$down move down +bindsym --to-code $mod+Control+$up move up +bindsym --to-code $mod+Control+$right move right +bindsym --to-code $mod+r mode "resize" +mode "resize" { + bindsym $left resize shrink width 5ppt + bindsym $down resize grow height 5ppt + bindsym $up resize shrink height 5ppt + bindsym $right resize grow width 5ppt + bindsym Escape mode "default" +} +bindsym --to-code $mod+f fullscreen + + floating_modifier $mod normal + bindsym --to-code $mod+b splith + bindsym --to-code $mod+m splitv + bindsym --to-code $mod+s layout stacking + bindsym --to-code $mod+w layout tabbed + bindsym --to-code $mod+9 layout toggle split + bindsym --to-code $mod+a focus parent + bindsym --to-code $mod+Shift+minus move scratchpad + bindsym --to-code $mod+minus scratchpad show +############################################ + +################ styles #################### +default_border pixel 1 +output * bg #$THEME_COLOR_BG solid_color +client.focused #$THEME_COLOR_BG_ACCENT_LIGHT #$THEME_COLOR_BG_ACCENT_LIGHT #$THEME_COLOR_BG_ACCENT_LIGHT +############################################ + +################## bar ##################### +bar { + position top + font "Roboto Mono 12" + status_command i3blocks + colors { + statusline #$THEME_COLOR_FG + background #$THEME_COLOR_BG + focused_workspace #$THEME_COLOR_BG_ACCENT_LIGHT #$THEME_COLOR_BG_ACCENT_LIGHT #$THEME_COLOR_FG + inactive_workspace #$THEME_COLOR_BG_ACCENT_DARK #$THEME_COLOR_BG_ACCENT_DARK #$THEME_COLOR_FG + } +} +########################################### + +################ scripts ################## +bindsym --to-code $mod+Escape kill +bindsym --to-code $mod+Control+r reload +bindsym --to-code $mod+Return exec foot +bindsym --to-code $mod+Space exec run.sh +########################################### + +exec foot -s diff --git a/arch-user/config/theme.sh b/arch-user/config/theme.sh new file mode 100644 index 0000000..50215df --- /dev/null +++ b/arch-user/config/theme.sh @@ -0,0 +1,10 @@ +#!/bin/bash +export THEME_COLOR_FG=ffffff # main text +export THEME_COLOR_FG_DARK=b8bcc1 # secondary text +export THEME_COLOR_FG_ACCENT=9988ff # highlighted text, scrollbars (low-mid transp) +export THEME_COLOR_BG=0d1117 # base bg +export THEME_COLOR_BG_ACCENT_LIGHT=510079 # highlighted alt bg, borders +export THEME_COLOR_BG_ACCENT_DARK=020030 # alt bg +export THEME_OPACITY_LOW=0.2 +export THEME_OPACITY_MID=0.55 +export THEME_OPACITY_HIGH=0.85 diff --git a/arch-user/config/vim/vimrc b/arch-user/config/vim/vimrc new file mode 100644 index 0000000..8df869c --- /dev/null +++ b/arch-user/config/vim/vimrc @@ -0,0 +1,23 @@ +" Don't try to be vi compatible +set nocompatible + +" Show matching brackets when text indicator is over them +set showmatch + +" Turn on syntax highlighting +syntax on + +" Highlight search results +set hlsearch + +" Search while typing +set incsearch + +" Show line numbers +set number + +" Show file stats +set ruler + +" W - Save file as superuser +command! W execute 'w !sudo tee % > /dev/null' edit! diff --git a/arch-user/config/xkb/symbols/us b/arch-user/config/xkb/symbols/us new file mode 100644 index 0000000..8811ed9 --- /dev/null +++ b/arch-user/config/xkb/symbols/us @@ -0,0 +1,31 @@ +xkb_symbols "colemak_yz" { + + include "us(colemak_dh)" + + # functional + key.type = "ONE_LEVEL"; + replace key { [ BackSpace ] }; + replace key { [ Escape ] }; + + # modifiers + key.type = "ONE_LEVEL"; + replace key { [ Control_L ] }; + modifier_map Control { }; + replace key { [ Super_L ] }; + modifier_map Mod4 { }; + replace key { [ ISO_Level3_Shift ] }; + modifier_map Mod3 { }; + replace key { [ Alt_L ] }; + modifier_map Mod1 { }; + + # layer3 + # TODO: migrate to type=ALPHANUMERIC + # This would fix caps lock which i dont use anyway + key.type = "FOUR_LEVEL"; + # navigation + key { [ n, N, Left, eacute] }; + key { [ e, E, Down, eacute ] }; + key { [ i, I, Up, iacute ] }; + key { [ o, O, Right, oacute ] }; + +}; diff --git a/arch-user/install.sh b/arch-user/install.sh new file mode 100644 index 0000000..5683cd0 --- /dev/null +++ b/arch-user/install.sh @@ -0,0 +1,40 @@ +#!/bin/bash +set -e +cd "$(dirname "$0")" +umask 002 + +########## scripts ############# +cp -rf scripts/* ~/scripts +################################ + +########### config ############# +source config/theme.sh +VARS=$(printenv | \ + grep -E 'THEME_.*' | \ + sed -e 's/[= ].*//g' | sed -e 's/^/\$/' | tr '\n' ' ' +) +cp_subst() { + mkdir -p "$(dirname "$2")" + envsubst "$VARS" < "$1" > "$2" +} + +# simple +cp -rf config/foot ~/.config +cp -rf config/i3blocks ~/.config +cp -rf config/git ~/.config +cp -rf config/vim ~/.config +cp -rf config/xkb ~/.config + +# non-xdg +cp -rf config/bash/bashrc ~/.bashrc + +# templated +cp_subst config/sway/config.tmpl ~/.config/sway/config + +# dynamic +cp -rf config/profile ~/.profile +cat config/bemenu/config.sh >> ~/.profile +cat config/theme.sh >> ~/.profile +################################ + +swaymsg reload diff --git a/arch-user/scripts/current-font-glyphs.sh b/arch-user/scripts/current-font-glyphs.sh new file mode 100755 index 0000000..074c41d --- /dev/null +++ b/arch-user/scripts/current-font-glyphs.sh @@ -0,0 +1,12 @@ +#!/bin/bash +for range in $(fc-match --format='%{charset}\n' "$1"); do + for n in $(seq "0x${range%-*}" "0x${range#*-}"); do + printf "%04x\n" "$n" + done +done | while read -r n_hex; do + count=$((count + 1)) + printf "%-5s\U$n_hex\t" "$n_hex" + [ $((count % 10)) = 0 ] && printf "\n" +done +printf "\n" + diff --git a/arch-user/scripts/gpg-reencrypt-to-sym.sh b/arch-user/scripts/gpg-reencrypt-to-sym.sh new file mode 100755 index 0000000..ead9a48 --- /dev/null +++ b/arch-user/scripts/gpg-reencrypt-to-sym.sh @@ -0,0 +1,18 @@ +#!/bin/bash +set -e + +if [ -z "$1" ] || [ -z "$2" ]; then + echo "bad args" >&2 + exit 1 +fi + +DEST=$(realpath "$2") +cd "$1" +mkdir -p DEST + +for rel in $(find . -type f -name *.gpg); do + DESTFILE=$(echo $DEST/$rel | sed 's/\.[^.]*$//') + [ -f "$DESTFILE" ] && continue + mkdir -p "$(dirname "$DESTFILE")" + gpg --output "$DESTFILE" --decrypt "$rel" +done diff --git a/arch-user/scripts/run.sh b/arch-user/scripts/run.sh new file mode 100755 index 0000000..898f47e --- /dev/null +++ b/arch-user/scripts/run.sh @@ -0,0 +1,65 @@ +#!/bin/sh + +if [ "$USER" = "yrzam" ]; then + WEB="\ +web projects +web life\ +" +else + WEB=web +fi + +LIST="\ +term +$WEB +vifm +vim +gimp +htop +man +sway reload +logout +poweroff +reboot\ +" + +out=$(bemenu --prompt "" << EOF +$LIST +EOF +) + +conf() { + echo yes | bemenu --prompt "sure?" +} + +case "$out " in + " ");; + "web "*) + profile="${out##* }" + if [ "$profile" != "web" ]; then + exec firefox -P "$profile" + else + exec firefox + fi;; + "man ") + page="$(man -k . | bemenu --prompt "man" | awk '{print $1}')" + [ -n "$page" ] && exec footclient man "$page";; + "logout ") + conf && swaymsg exit;; + "poweroff "|"reboot ") + conf && exec systemctl "$out";; + "sway reload ") + exec $out;; + # term session + "term ") + exec footclient -D ~/;; + # term exec pure + "man "*|"htop ") + exec footclient -D ~/ "$out";; + # term exec in shell + "vifm "*|"vim "*) + exec footclient -D ~/ "$SHELL" -c "$out";; + #term exec in shell and wait + *) + exec footclient -D ~/ "$SHELL" -c "$out; read -n1";; +esac diff --git a/arch-user/scripts/uninstall_orphans.sh b/arch-user/scripts/uninstall_orphans.sh new file mode 100755 index 0000000..d5f40dd --- /dev/null +++ b/arch-user/scripts/uninstall_orphans.sh @@ -0,0 +1,2 @@ +#!/bin/sh +pacman -Qdttq | sudo pacman -Rns - diff --git a/deb-vps-docker/install.sh b/deb-vps-docker/install.sh new file mode 100644 index 0000000..998bda8 --- /dev/null +++ b/deb-vps-docker/install.sh @@ -0,0 +1,17 @@ +#!/bin/bash +set -e + +# packages +echo \ + "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \ + $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ + sudo tee /etc/apt/sources.list.d/docker.list > /dev/null +sudo apt update && sudo apt upgrade -y +sudo apt install gnupg docker-ce + +# keys +curl https://yrz.am/gpg | gpg --import + +# files +mkdir -p ~/app +touch ~/app/docker-compose.yaml