Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ace4b0c7f7 | |||
| 6afc232505 | |||
| 24adaf03c3 | |||
| b8eb9cbc0e | |||
| 96f57c1c78 | |||
| f87c433fe8 | |||
| 2245f91b5b | |||
| a29050a389 | |||
| 38e8ea43cd | |||
| d11455427c | |||
| 05da66e888 | |||
| 452ce78c46 | |||
| 579d141d93 | |||
| 855902bd61 |
@@ -86,7 +86,7 @@ bind '"\e[B": history-search-forward'
|
|||||||
|
|
||||||
** Kitty for SSH
|
** Kitty for SSH
|
||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
[ "$TERM" = "xterm-kitty" ] && alias ssh="kitty +kitten ssh"
|
[ "$TERM" = "xterm-kitty" ] && [ -n "$KITTY_WINDOW_ID" ] && alias ssh="kitty +kitten ssh"
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Aliases
|
** Aliases
|
||||||
@@ -238,13 +238,15 @@ export TEXMFHOME=$HOME/.local/share/texmf
|
|||||||
|
|
||||||
*** Linkding
|
*** Linkding
|
||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
|
if [ "$(hostnamectl hostname)" = "ldehaeze" ]; then
|
||||||
export LINKDING_URL=`pass nas/linkding_url`
|
export LINKDING_URL=`pass nas/linkding_url`
|
||||||
export LINKDING_TOKEN=`pass nas/linkding_token`
|
export LINKDING_TOKEN=`pass nas/linkding_token`
|
||||||
|
fi
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
*** Restic
|
*** Restic
|
||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
if [ "$(hostname)" = "ldehaeze" ]; then
|
if [ "$(hostnamectl hostname)" = "ldehaeze" ]; then
|
||||||
export RESTIC_REPOSITORY=sftp:thomas@homelab:/srv/storage/Backups/esrf-laptop
|
export RESTIC_REPOSITORY=sftp:thomas@homelab:/srv/storage/Backups/esrf-laptop
|
||||||
export RESTIC_PASSWORD_COMMAND="pass show restic"
|
export RESTIC_PASSWORD_COMMAND="pass show restic"
|
||||||
fi
|
fi
|
||||||
@@ -258,7 +260,7 @@ export PATH
|
|||||||
|
|
||||||
** Automatically run =startx=
|
** Automatically run =startx=
|
||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
if [ -z "${DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ]; then
|
if [ -z "${DISPLAY}" ] && [ -n "${XDG_VTNR}" ] && [ "${XDG_VTNR}" -eq 1 ]; then
|
||||||
exec startx
|
exec startx
|
||||||
fi
|
fi
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|||||||
+14
-14
@@ -378,7 +378,7 @@ List of useful programs:
|
|||||||
- =inkscape=
|
- =inkscape=
|
||||||
- =gs=
|
- =gs=
|
||||||
- =pdfcrop=
|
- =pdfcrop=
|
||||||
- =pdftk=
|
- =qpdf=
|
||||||
|
|
||||||
*** PDF to PNG
|
*** PDF to PNG
|
||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
@@ -439,7 +439,7 @@ pdftrim_function() { \
|
|||||||
*** PDF Extract Pages
|
*** PDF Extract Pages
|
||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
pdfextract_function() { \
|
pdfextract_function() { \
|
||||||
if command -v pdftk &> /dev/null; then
|
if command -v qpdf &> /dev/null; then
|
||||||
pages=$(echo -e "get first\ndelete first\nextract i-j" | rofi -i -dmenu -p "Extract pages")
|
pages=$(echo -e "get first\ndelete first\nextract i-j" | rofi -i -dmenu -p "Extract pages")
|
||||||
|
|
||||||
if [ -z "$pages" ]; then
|
if [ -z "$pages" ]; then
|
||||||
@@ -448,21 +448,21 @@ pdfextract_function() { \
|
|||||||
|
|
||||||
case "$pages" in
|
case "$pages" in
|
||||||
"get first")
|
"get first")
|
||||||
if command -v pdftk &> /dev/null; then
|
if command -v qpdf &> /dev/null; then
|
||||||
pdftk "$filename_with_extension" cat 1-1 output "$filename_without_extension.first.pdf"
|
qpdf --pages "$filename_with_extension" 1 -- "$filename_with_extension" "$filename_without_extension.first.pdf"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
"delete first")
|
"delete first")
|
||||||
if command -v pdftk &> /dev/null; then
|
if command -v qpdf &> /dev/null; then
|
||||||
pdftk "$filename_with_extension" cat 2-end output "$filename_with_extension"
|
qpdf --pages "$filename_with_extension" 2-z -- "$filename_with_extension" "$filename_with_extension"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
"extract i-j")
|
"extract i-j")
|
||||||
# TODO
|
# TODO
|
||||||
page_i=$(rofi -dmenu -p "From")
|
page_i=$(rofi -dmenu -p "From")
|
||||||
page_j=$(rofi -dmenu -p "To")
|
page_j=$(rofi -dmenu -p "To")
|
||||||
if command -v pdftk &> /dev/null; then
|
if command -v qpdf &> /dev/null; then
|
||||||
pdftk "$filename_with_extension" cat "$page_i-$page_j" output "$filename_with_extension.slice.pdf"
|
qpdf --pages "$filename_with_extension" "$page_i-$page_j" -- "$filename_with_extension" "$filename_with_extension.slice.pdf"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@@ -474,9 +474,9 @@ pdfextract_function() { \
|
|||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
pdf_delete_first_page_function() { \
|
pdf_delete_first_page_function() { \
|
||||||
if command -v stapler &> /dev/null; then
|
if command -v stapler &> /dev/null; then
|
||||||
stapler del "$filename_with_extension" 1 /tmp/pdftk_out.pdf && mv /tmp/pdftk_out.pdf "$filename_with_extension"
|
stapler del "$filename_with_extension" 1 /tmp/qpdf_out.pdf && mv /tmp/qpdf_out.pdf "$filename_with_extension"
|
||||||
elif command -v pdftk &> /dev/null; then
|
elif command -v qpdf &> /dev/null; then
|
||||||
pdftk "$filename_with_extension" cat 2-end output /tmp/pdftk_out.pdf && mv /tmp/pdftk_out.pdf "$filename_with_extension"
|
qpdf --pages "$filename_with_extension" 2-z -- "$filename_with_extension" /tmp/qpdf_out.pdf && mv /tmp/qpdf_out.pdf "$filename_with_extension"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
#+end_src
|
#+end_src
|
||||||
@@ -484,10 +484,10 @@ pdf_delete_first_page_function() { \
|
|||||||
*** Remove Annotations
|
*** Remove Annotations
|
||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
pdf_remove_annotations_function() { \
|
pdf_remove_annotations_function() { \
|
||||||
if command -v pdftk &> /dev/null; then
|
if command -v qpdf &> /dev/null; then
|
||||||
pdftk "$filename_with_extension" output /tmp/uncompressed.pdf uncompress
|
qpdf --qdf "$filename_with_extension" /tmp/uncompressed.pdf
|
||||||
LANG=C sed -n '/^\/Annots/!p' /tmp/uncompressed.pdf > /tmp/stripped.pdf
|
LANG=C sed -n '/^\/Annots/!p' /tmp/uncompressed.pdf > /tmp/stripped.pdf
|
||||||
pdftk /tmp/stripped.pdf output "$filename_with_extension" compress
|
qpdf /tmp/stripped.pdf "$filename_with_extension"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|||||||
@@ -1,6 +1,47 @@
|
|||||||
#+TITLE:Calendar and Contact Configuration
|
#+TITLE:Calendar and Contact Configuration
|
||||||
#+SETUPFILE: ./setup/org-setup-file.org
|
#+SETUPFILE: ./setup/org-setup-file.org
|
||||||
|
|
||||||
|
* Calendar Install Script
|
||||||
|
:PROPERTIES:
|
||||||
|
:header-args:bash: :tangle scripts/install-calendar.sh :shebang "#!/bin/bash" :mkdirp yes
|
||||||
|
:END:
|
||||||
|
|
||||||
|
Calendar/contact documentation: [[file:calendar-contact.org][calendar-contact.org]]
|
||||||
|
|
||||||
|
#+begin_src bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
DOTFILES="${HOME}/.config/literate-dotfiles"
|
||||||
|
|
||||||
|
tangle() {
|
||||||
|
emacs --batch -l org --eval "(org-babel-tangle-file \"${DOTFILES}/$1\")"
|
||||||
|
}
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
** Packages
|
||||||
|
|
||||||
|
#+begin_src bash
|
||||||
|
echo "==> Calendar and contacts packages"
|
||||||
|
paru -S --needed --noconfirm \
|
||||||
|
vdirsyncer \
|
||||||
|
khal \
|
||||||
|
khard
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
** Tangle Systemd Configs
|
||||||
|
|
||||||
|
#+begin_src bash
|
||||||
|
echo "==> Tangling systemd configs for calendar"
|
||||||
|
tangle "systemd.org"
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
** Systemd Timer
|
||||||
|
|
||||||
|
#+begin_src bash
|
||||||
|
echo "==> Enabling vdirsyncer timer"
|
||||||
|
systemctl --user enable --now vdirsyncer.timer
|
||||||
|
#+end_src
|
||||||
|
|
||||||
* =vdirsyncer= - Synchronize calendars and contacts
|
* =vdirsyncer= - Synchronize calendars and contacts
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:header-args: :tangle ~/.config/vdirsyncer/config
|
:header-args: :tangle ~/.config/vdirsyncer/config
|
||||||
|
|||||||
+12
-8
@@ -13,31 +13,35 @@ Host backup
|
|||||||
hostname pierrick.tdehaeze.xyz
|
hostname pierrick.tdehaeze.xyz
|
||||||
Port 10022
|
Port 10022
|
||||||
user thomas
|
user thomas
|
||||||
IdentityFile ~/.ssh/id_rsa
|
IdentityFile ~/.ssh/id_ed25519
|
||||||
|
|
||||||
Host pierrick
|
Host pierrick
|
||||||
hostname pierrick.tdehaeze.xyz
|
hostname pierrick.tdehaeze.xyz
|
||||||
Port 56432
|
Port 56432
|
||||||
user pierrick
|
user pierrick
|
||||||
IdentityFile ~/.ssh/id_rsa
|
IdentityFile ~/.ssh/id_ed25519
|
||||||
|
|
||||||
Host homelab
|
Host homelab
|
||||||
hostname <<get-password(passname="ip/homelab")>>
|
hostname <<get-password(passname="ip/homelab")>>
|
||||||
Port 22
|
Port 22
|
||||||
user thomas
|
user thomas
|
||||||
IdentityFile ~/.ssh/id_rsa
|
IdentityFile ~/.ssh/id_ed25519
|
||||||
|
|
||||||
|
Host zotac
|
||||||
|
hostname 192.168.5.75
|
||||||
|
Port 22
|
||||||
|
user thomas
|
||||||
|
IdentityFile ~/.ssh/id_ed25519
|
||||||
|
|
||||||
Host router
|
Host router
|
||||||
hostname 192.168.1.1
|
hostname 192.168.1.1
|
||||||
Port 22
|
Port 22
|
||||||
user root
|
user root
|
||||||
IdentityFile ~/.ssh/id_rsa
|
IdentityFile ~/.ssh/id_ed25519
|
||||||
PubkeyAcceptedAlgorithms +ssh-rsa
|
|
||||||
HostkeyAlgorithms +ssh-rsa
|
|
||||||
|
|
||||||
Host *.esrf.fr
|
Host *.esrf.fr
|
||||||
User dehaeze
|
User dehaeze
|
||||||
IdentityFile ~/.ssh/id_rsa
|
IdentityFile ~/.ssh/id_ed25519
|
||||||
|
|
||||||
Host firewall.esrf.fr
|
Host firewall.esrf.fr
|
||||||
Port 5022
|
Port 5022
|
||||||
@@ -49,7 +53,7 @@ Match host *.esrf.fr !host firewall.esrf.fr !exec "~/.ssh/esrf-test"
|
|||||||
Host rnice
|
Host rnice
|
||||||
Port 22
|
Port 22
|
||||||
user dehaeze
|
user dehaeze
|
||||||
IdentityFile ~/.ssh/id_rsa
|
IdentityFile ~/.ssh/id_ed25519
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src bash :tangle ~/.ssh/esrf-test :comments none :mkdirp yes :shebang "#!/usr/bin/env bash" :tangle-mode (identity #o555)
|
#+begin_src bash :tangle ~/.ssh/esrf-test :comments none :mkdirp yes :shebang "#!/usr/bin/env bash" :tangle-mode (identity #o555)
|
||||||
|
|||||||
@@ -30,15 +30,7 @@ DOOM="${HOME}/.config/emacs/bin/doom"
|
|||||||
|
|
||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
echo "==> Emacs packages"
|
echo "==> Emacs packages"
|
||||||
paru -S --needed emacs aspell aspell-en aspell-fr
|
paru -S --needed --noconfirm emacs aspell aspell-en aspell-fr
|
||||||
#+end_src
|
|
||||||
|
|
||||||
** Doom Emacs
|
|
||||||
|
|
||||||
#+begin_src bash
|
|
||||||
echo "==> Installing Doom Emacs"
|
|
||||||
git clone --depth 1 https://github.com/doomemacs/doomemacs ~/.config/emacs
|
|
||||||
"${DOOM}" install --no-config
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Tangle Configuration
|
** Tangle Configuration
|
||||||
@@ -47,15 +39,16 @@ Tangle =doom.org= to generate =config.el=, =init.el= and =packages.el=:
|
|||||||
|
|
||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
echo "==> Tangling doom.org"
|
echo "==> Tangling doom.org"
|
||||||
emacsclient -e "(org-babel-tangle-file \"${DOTFILES}/doom.org\")" \
|
mkdir ${HOME}/.config/doom
|
||||||
|| emacs --batch -l org --eval "(org-babel-tangle-file \"${DOTFILES}/doom.org\")"
|
emacs --batch -l org --eval "(org-babel-tangle-file \"${DOTFILES}/doom.org\")"
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Sync
|
** Doom Install
|
||||||
|
|
||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
echo "==> Running doom sync"
|
echo "==> Installing Doom Emacs"
|
||||||
"${DOOM}" sync
|
git clone --depth 1 https://github.com/doomemacs/doomemacs ~/.config/emacs
|
||||||
|
"${DOOM}" install
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
* Introduction and Resources
|
* Introduction and Resources
|
||||||
@@ -360,7 +353,7 @@ Function that opens current pdf page as an SVG file with Inkscape.
|
|||||||
(setq filename (read-string "Enter file name:" (car (split-string (file-name-base buffer-file-name) "_"))))
|
(setq filename (read-string "Enter file name:" (car (split-string (file-name-base buffer-file-name) "_"))))
|
||||||
(setq filename (read-string "Enter file name:")))
|
(setq filename (read-string "Enter file name:")))
|
||||||
(setq filepath (concat "/tmp/" filename ".svg"))
|
(setq filepath (concat "/tmp/" filename ".svg"))
|
||||||
(shell-command (concat "pdftk " buffer-file-name " cat " (number-to-string (pdf-view-current-page)) " output /tmp/pdf_page.pdf"))
|
(shell-command (concat "qpdf --pages " buffer-file-name " " (number-to-string (pdf-view-current-page)) " -- " buffer-file-name " /tmp/pdf_page.pdf"))
|
||||||
(shell-command (concat "pdf2svg /tmp/pdf_page.pdf " filepath))
|
(shell-command (concat "pdf2svg /tmp/pdf_page.pdf " filepath))
|
||||||
(start-process "" nil "inkscape" filepath))
|
(start-process "" nil "inkscape" filepath))
|
||||||
|
|
||||||
@@ -3210,7 +3203,7 @@ Provides nice functions such as:
|
|||||||
;;nim ; python + lisp at the speed of c
|
;;nim ; python + lisp at the speed of c
|
||||||
;;nix ; I hereby declare "nix geht mehr!"
|
;;nix ; I hereby declare "nix geht mehr!"
|
||||||
;;ocaml ; an objective camel
|
;;ocaml ; an objective camel
|
||||||
(org +pretty +roam2 +hugo +noter) ; organize your plain life in plain text
|
(org +pretty +roam +hugo +noter) ; organize your plain life in plain text
|
||||||
;;php ; perl's insecure younger brother
|
;;php ; perl's insecure younger brother
|
||||||
;;plantuml ; diagrams for confusing people more
|
;;plantuml ; diagrams for confusing people more
|
||||||
;;graphviz ; diagrams for confusing yourself even more
|
;;graphviz ; diagrams for confusing yourself even more
|
||||||
|
|||||||
+117
-71
@@ -14,7 +14,7 @@ It tangles several install scripts:
|
|||||||
- =~/install-latex.sh= — LaTeX toolchain (texlive, biber)
|
- =~/install-latex.sh= — LaTeX toolchain (texlive, biber)
|
||||||
- =~/install-laptop.sh= — laptop-specific tools (tlp, powertop, thermald)
|
- =~/install-laptop.sh= — laptop-specific tools (tlp, powertop, thermald)
|
||||||
|
|
||||||
All scripts use =paru -S --needed= to be idempotent (safe to re-run).
|
All scripts use =paru -S --needed --noconfirm --noconfirm= to be idempotent (safe to re-run) and non-interactive.
|
||||||
|
|
||||||
* Prerequisites
|
* Prerequisites
|
||||||
** =git=
|
** =git=
|
||||||
@@ -50,8 +50,7 @@ set -euo pipefail
|
|||||||
DOTFILES="${HOME}/.config/literate-dotfiles"
|
DOTFILES="${HOME}/.config/literate-dotfiles"
|
||||||
|
|
||||||
tangle() {
|
tangle() {
|
||||||
emacsclient -e "(org-babel-tangle-file \"${DOTFILES}/$1\")" \
|
emacs --batch -l org --eval "(org-babel-tangle-file \"${DOTFILES}/$1\")"
|
||||||
|| emacs --batch -l org --eval "(org-babel-tangle-file \"${DOTFILES}/$1\")"
|
|
||||||
}
|
}
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
@@ -59,7 +58,7 @@ tangle() {
|
|||||||
|
|
||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
echo "==> Desktop packages"
|
echo "==> Desktop packages"
|
||||||
paru -S --needed \
|
paru -S --needed --noconfirm \
|
||||||
i3-wm \
|
i3-wm \
|
||||||
sxhkd \
|
sxhkd \
|
||||||
polybar \
|
polybar \
|
||||||
@@ -69,10 +68,8 @@ paru -S --needed \
|
|||||||
kitty \
|
kitty \
|
||||||
bash bash-completion \
|
bash bash-completion \
|
||||||
zoxide \
|
zoxide \
|
||||||
nerd-fonts-hack noto-fonts-emoji \
|
|
||||||
xorg-xrandr arandr \
|
xorg-xrandr arandr \
|
||||||
xautocfg \
|
xautocfg \
|
||||||
arc-gtk-theme xcursor-breeze \
|
|
||||||
feh xwallpaper
|
feh xwallpaper
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
@@ -108,13 +105,19 @@ i3-msg restart 2>/dev/null || echo " (i3 not running, config will apply on next
|
|||||||
|
|
||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
|
DOTFILES="${HOME}/.config/literate-dotfiles"
|
||||||
|
|
||||||
|
tangle() {
|
||||||
|
emacs --batch -l org --eval "(org-babel-tangle-file \"${DOTFILES}/$1\")"
|
||||||
|
}
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Shell and Terminal
|
** Shell and Terminal
|
||||||
|
|
||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
echo "==> Shell and Terminal"
|
echo "==> Shell and Terminal"
|
||||||
paru -S --needed \
|
paru -S --needed --noconfirm \
|
||||||
bash bash-completion zsh \
|
bash bash-completion zsh \
|
||||||
kitty \
|
kitty \
|
||||||
tmux
|
tmux
|
||||||
@@ -126,8 +129,10 @@ paru -S --needed \
|
|||||||
|
|
||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
echo "==> Fonts"
|
echo "==> Fonts"
|
||||||
paru -S --needed \
|
paru -S --needed --noconfirm \
|
||||||
nerd-fonts-hack \
|
ttf-hack-nerd \
|
||||||
|
ttf-sourcecodepro-nerd \
|
||||||
|
adobe-source-code-pro-fonts \
|
||||||
noto-fonts-emoji
|
noto-fonts-emoji
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
@@ -137,7 +142,7 @@ Default fonts: Monospace/Serif/Sans = =Hack Nerd Font=.
|
|||||||
|
|
||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
echo "==> Text Editors"
|
echo "==> Text Editors"
|
||||||
paru -S --needed \
|
paru -S --needed --noconfirm \
|
||||||
neovim python-pynvim nodejs-neovim \
|
neovim python-pynvim nodejs-neovim \
|
||||||
emacs \
|
emacs \
|
||||||
aspell aspell-en aspell-fr
|
aspell aspell-en aspell-fr
|
||||||
@@ -157,7 +162,7 @@ Emacs config: [[./doom.org][doom.org]]
|
|||||||
|
|
||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
echo "==> GnuPG and Pass"
|
echo "==> GnuPG and Pass"
|
||||||
paru -S --needed \
|
paru -S --needed --noconfirm \
|
||||||
gnupg gnome-keyring \
|
gnupg gnome-keyring \
|
||||||
pass rofi-pass pass-git-helper
|
pass rofi-pass pass-git-helper
|
||||||
#+end_src
|
#+end_src
|
||||||
@@ -192,7 +197,7 @@ ssh-add ~/.ssh/id_ed25519
|
|||||||
|
|
||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
echo "==> Window Manager and Desktop"
|
echo "==> Window Manager and Desktop"
|
||||||
paru -S --needed \
|
paru -S --needed --noconfirm \
|
||||||
i3-wm \
|
i3-wm \
|
||||||
sxhkd \
|
sxhkd \
|
||||||
polybar \
|
polybar \
|
||||||
@@ -213,7 +218,7 @@ paru -S --needed \
|
|||||||
|
|
||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
echo "==> File Manager"
|
echo "==> File Manager"
|
||||||
paru -S --needed yazi
|
paru -S --needed --noconfirm yazi
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
Yazi config: [[file:yazi.org][yazi.org]]
|
Yazi config: [[file:yazi.org][yazi.org]]
|
||||||
@@ -222,20 +227,20 @@ Yazi config: [[file:yazi.org][yazi.org]]
|
|||||||
|
|
||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
echo "==> Terminal Utilities"
|
echo "==> Terminal Utilities"
|
||||||
paru -S --needed \
|
paru -S --needed --noconfirm \
|
||||||
fd ripgrep fzf \
|
fd ripgrep fzf \
|
||||||
xclip xsel \
|
xclip xsel \
|
||||||
atool unzip \
|
atool unzip \
|
||||||
trash-cli \
|
trash-cli \
|
||||||
man-db \
|
man-db \
|
||||||
neofetch
|
fastfetch
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Browser
|
** Browser
|
||||||
|
|
||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
echo "==> Browser"
|
echo "==> Browser"
|
||||||
paru -S --needed \
|
paru -S --needed --noconfirm \
|
||||||
qutebrowser python-adblock pdfjs \
|
qutebrowser python-adblock pdfjs \
|
||||||
firefox-developer-edition passff-host
|
firefox-developer-edition passff-host
|
||||||
#+end_src
|
#+end_src
|
||||||
@@ -252,10 +257,11 @@ Spell checking for qutebrowser:
|
|||||||
|
|
||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
echo "==> Media"
|
echo "==> Media"
|
||||||
paru -S --needed \
|
paru -S --needed --noconfirm \
|
||||||
mpv \
|
mpv \
|
||||||
jellyfin-tui \
|
jellyfin-tui \
|
||||||
nsxiv \
|
nsxiv \
|
||||||
|
tesseract tesseract-data-eng tesseract-data-fra tesseract-data-osd \
|
||||||
zathura zathura-pdf-mupdf zathura-djvu zathura-ps zathura-cb \
|
zathura zathura-pdf-mupdf zathura-djvu zathura-ps zathura-cb \
|
||||||
pdfpc \
|
pdfpc \
|
||||||
gst-plugins-ugly gst-plugins-good gst-plugins-base-libs gst-plugins-base gst-plugins-bad gst-libav
|
gst-plugins-ugly gst-plugins-good gst-plugins-base-libs gst-plugins-base gst-plugins-bad gst-libav
|
||||||
@@ -263,12 +269,18 @@ paru -S --needed \
|
|||||||
|
|
||||||
** Sound (PipeWire)
|
** Sound (PipeWire)
|
||||||
|
|
||||||
|
Core PipeWire packages (required):
|
||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
echo "==> PipeWire"
|
echo "==> PipeWire"
|
||||||
paru -S --needed \
|
paru -S --needed --noconfirm \
|
||||||
pipewire pipewire-alsa pipewire-audio pipewire-jack pipewire-pulse \
|
pipewire pipewire-alsa pipewire-audio pipewire-jack pipewire-pulse \
|
||||||
wireplumber \
|
wireplumber
|
||||||
pwvucontrol
|
#+end_src
|
||||||
|
|
||||||
|
Optional GUI control (install manually when available):
|
||||||
|
#+begin_src bash :tangle no
|
||||||
|
echo "==> PipeWire GUI (optional)"
|
||||||
|
paru -S --needed --noconfirm pwvucontrol || echo "pwvucontrol failed, skipping"
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
Enable PipeWire services:
|
Enable PipeWire services:
|
||||||
@@ -282,8 +294,8 @@ systemctl --user enable --now wireplumber.service
|
|||||||
|
|
||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
echo "==> PDF and Image Utilities"
|
echo "==> PDF and Image Utilities"
|
||||||
paru -S --needed \
|
paru -S --needed --noconfirm \
|
||||||
pdf2svg pdftk pdfarranger \
|
pdf2svg qpdf pdfarranger \
|
||||||
imagemagick \
|
imagemagick \
|
||||||
maim flameshot \
|
maim flameshot \
|
||||||
unclutter \
|
unclutter \
|
||||||
@@ -294,7 +306,7 @@ paru -S --needed \
|
|||||||
|
|
||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
echo "==> Office"
|
echo "==> Office"
|
||||||
paru -S --needed \
|
paru -S --needed --noconfirm \
|
||||||
onlyoffice-bin \
|
onlyoffice-bin \
|
||||||
libreoffice-fresh libreoffice-fresh-fr \
|
libreoffice-fresh libreoffice-fresh-fr \
|
||||||
inkscape
|
inkscape
|
||||||
@@ -304,7 +316,7 @@ paru -S --needed \
|
|||||||
|
|
||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
echo "==> System Utilities"
|
echo "==> System Utilities"
|
||||||
paru -S --needed \
|
paru -S --needed --noconfirm \
|
||||||
udiskie \
|
udiskie \
|
||||||
blueman \
|
blueman \
|
||||||
sshfs \
|
sshfs \
|
||||||
@@ -327,34 +339,97 @@ Enable Syncthing:
|
|||||||
systemctl --user enable --now syncthing
|
systemctl --user enable --now syncthing
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** GTK Theme
|
|
||||||
|
|
||||||
#+begin_src bash
|
|
||||||
echo "==> GTK Theme"
|
|
||||||
paru -S --needed \
|
|
||||||
lxappearance \
|
|
||||||
arc-gtk-theme \
|
|
||||||
xcursor-breeze \
|
|
||||||
gtk2fontsel
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
** Misc Utilities
|
** Misc Utilities
|
||||||
|
|
||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
echo "==> Misc Utilities"
|
echo "==> Misc Utilities"
|
||||||
paru -S --needed \
|
paru -S --needed --noconfirm \
|
||||||
screenkey \
|
|
||||||
xwallpaper \
|
xwallpaper \
|
||||||
highlight-pointer-git \
|
highlight-pointer-git \
|
||||||
mpd
|
mpd
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
** SSH Keys for Tunnels
|
||||||
|
|
||||||
|
Use a single SSH key for all hosts (matches =~/.ssh/config=).
|
||||||
|
|
||||||
|
#+begin_src bash
|
||||||
|
KEY_FILE="$HOME/.ssh/id_ed25519"
|
||||||
|
HOMELAB_OK=1
|
||||||
|
ESRF_OK=1
|
||||||
|
|
||||||
|
# Generate main SSH key if it doesn't exist
|
||||||
|
if [ ! -f "${KEY_FILE}" ]; then
|
||||||
|
echo ""
|
||||||
|
echo "==> Generating main SSH key"
|
||||||
|
read -p "Generate new SSH key at ${KEY_FILE}? [y/N] " -n 1 -r
|
||||||
|
echo
|
||||||
|
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||||
|
ssh-keygen -t ed25519 -C "thomas@$(hostname)" -f "${KEY_FILE}" -N ""
|
||||||
|
else
|
||||||
|
echo "Skipping SSH key generation"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Deploy key to a remote host if needed
|
||||||
|
deploy_ssh_key() {
|
||||||
|
local host_name="$1"
|
||||||
|
local remote_host="$2"
|
||||||
|
local remote_port="${3:-22}"
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "==> Checking SSH key for ${host_name}"
|
||||||
|
|
||||||
|
# Check if we can connect without password
|
||||||
|
if ssh -o BatchMode=yes -o ConnectTimeout=5 -p "${remote_port}" "${remote_host}" exit 2>/dev/null; then
|
||||||
|
echo "SSH key for ${host_name} is already deployed ✓"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Prompt to deploy key
|
||||||
|
read -p "Deploy SSH key to ${remote_host}? [y/N] " -n 1 -r
|
||||||
|
echo
|
||||||
|
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||||
|
ssh-copy-id -i "${KEY_FILE}.pub" -p "${remote_port}" "${remote_host}"
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
echo "Skipping ${host_name} key deployment"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Setup homelab
|
||||||
|
deploy_ssh_key "homelab" "homelab" 22
|
||||||
|
HOMELAB_OK=$?
|
||||||
|
|
||||||
|
# Setup ESRF
|
||||||
|
deploy_ssh_key "esrf" "dehaeze@firewall.esrf.fr" 8022
|
||||||
|
ESRF_OK=$?
|
||||||
|
#+end_src
|
||||||
|
|
||||||
** Systemd Services
|
** Systemd Services
|
||||||
|
|
||||||
Enable custom systemd services (tangle [[file:systemd.org][systemd.org]] first):
|
#+begin_src bash
|
||||||
#+begin_src bash :tangle no
|
echo "==> Tangling systemd configs"
|
||||||
|
tangle "systemd.org"
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
Enable custom =systemd= services:
|
||||||
|
#+begin_src bash
|
||||||
|
echo "==> Enabling systemd services"
|
||||||
|
|
||||||
|
if [ $HOMELAB_OK -eq 0 ]; then
|
||||||
systemctl --user enable --now homelab-tunnel
|
systemctl --user enable --now homelab-tunnel
|
||||||
|
else
|
||||||
|
echo " Skipping homelab-tunnel (SSH key not configured)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $ESRF_OK -eq 0 ]; then
|
||||||
systemctl --user enable --now esrf-tunnel
|
systemctl --user enable --now esrf-tunnel
|
||||||
|
else
|
||||||
|
echo " Skipping esrf-tunnel (SSH key not configured)"
|
||||||
|
fi
|
||||||
|
|
||||||
systemctl --user enable --now syncthing
|
systemctl --user enable --now syncthing
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
@@ -387,7 +462,7 @@ set -euo pipefail
|
|||||||
|
|
||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
echo "==> Mail packages"
|
echo "==> Mail packages"
|
||||||
paru -S --needed \
|
paru -S --needed --noconfirm \
|
||||||
isync \
|
isync \
|
||||||
msmtp \
|
msmtp \
|
||||||
neomutt \
|
neomutt \
|
||||||
@@ -411,35 +486,6 @@ systemctl --user enable --now checkmail.timer
|
|||||||
systemctl --user enable --now syncmail.timer
|
systemctl --user enable --now syncmail.timer
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
* Calendar Install Script
|
|
||||||
:PROPERTIES:
|
|
||||||
:header-args:bash: :tangle scripts/install-calendar.sh :shebang "#!/bin/bash" :mkdirp yes
|
|
||||||
:END:
|
|
||||||
|
|
||||||
Calendar/contact documentation: [[file:calendar-contact.org][calendar-contact.org]]
|
|
||||||
|
|
||||||
#+begin_src bash
|
|
||||||
set -euo pipefail
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
** Packages
|
|
||||||
|
|
||||||
#+begin_src bash
|
|
||||||
echo "==> Calendar and contacts packages"
|
|
||||||
paru -S --needed \
|
|
||||||
vdirsyncer \
|
|
||||||
khal \
|
|
||||||
khard \
|
|
||||||
mu
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
** Systemd Timer
|
|
||||||
|
|
||||||
#+begin_src bash :tangle no
|
|
||||||
echo "==> Enabling vdirsyncer timer"
|
|
||||||
systemctl --user enable --now vdirsyncer.timer
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
* LaTeX Install Script
|
* LaTeX Install Script
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:header-args:bash: :tangle scripts/install-latex.sh :shebang "#!/bin/bash" :mkdirp yes
|
:header-args:bash: :tangle scripts/install-latex.sh :shebang "#!/bin/bash" :mkdirp yes
|
||||||
@@ -453,7 +499,7 @@ set -euo pipefail
|
|||||||
|
|
||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
echo "==> LaTeX packages"
|
echo "==> LaTeX packages"
|
||||||
paru -S --needed \
|
paru -S --needed --noconfirm \
|
||||||
texlive-most tllocalmgr-git \
|
texlive-most tllocalmgr-git \
|
||||||
biber
|
biber
|
||||||
#+end_src
|
#+end_src
|
||||||
@@ -474,7 +520,7 @@ set -euo pipefail
|
|||||||
|
|
||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
echo "==> Laptop power management"
|
echo "==> Laptop power management"
|
||||||
paru -S --needed \
|
paru -S --needed --noconfirm \
|
||||||
powertop \
|
powertop \
|
||||||
tlp \
|
tlp \
|
||||||
thermald
|
thermald
|
||||||
|
|||||||
@@ -1,9 +1,20 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
|
DOTFILES="${HOME}/.config/literate-dotfiles"
|
||||||
|
|
||||||
|
tangle() {
|
||||||
|
emacs --batch -l org --eval "(org-babel-tangle-file \"${DOTFILES}/$1\")"
|
||||||
|
}
|
||||||
|
|
||||||
echo "==> Calendar and contacts packages"
|
echo "==> Calendar and contacts packages"
|
||||||
paru -S --needed \
|
paru -S --needed --noconfirm \
|
||||||
vdirsyncer \
|
vdirsyncer \
|
||||||
khal \
|
khal \
|
||||||
khard \
|
khard
|
||||||
mu
|
|
||||||
|
echo "==> Tangling systemd configs for calendar"
|
||||||
|
tangle "systemd.org"
|
||||||
|
|
||||||
|
echo "==> Enabling vdirsyncer timer"
|
||||||
|
systemctl --user enable --now vdirsyncer.timer
|
||||||
|
|||||||
@@ -4,12 +4,11 @@ set -euo pipefail
|
|||||||
DOTFILES="${HOME}/.config/literate-dotfiles"
|
DOTFILES="${HOME}/.config/literate-dotfiles"
|
||||||
|
|
||||||
tangle() {
|
tangle() {
|
||||||
emacsclient -e "(org-babel-tangle-file \"${DOTFILES}/$1\")" \
|
emacs --batch -l org --eval "(org-babel-tangle-file \"${DOTFILES}/$1\")"
|
||||||
|| emacs --batch -l org --eval "(org-babel-tangle-file \"${DOTFILES}/$1\")"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "==> Desktop packages"
|
echo "==> Desktop packages"
|
||||||
paru -S --needed \
|
paru -S --needed --noconfirm \
|
||||||
i3-wm \
|
i3-wm \
|
||||||
sxhkd \
|
sxhkd \
|
||||||
polybar \
|
polybar \
|
||||||
@@ -19,10 +18,8 @@ paru -S --needed \
|
|||||||
kitty \
|
kitty \
|
||||||
bash bash-completion \
|
bash bash-completion \
|
||||||
zoxide \
|
zoxide \
|
||||||
nerd-fonts-hack noto-fonts-emoji \
|
|
||||||
xorg-xrandr arandr \
|
xorg-xrandr arandr \
|
||||||
xautocfg \
|
xautocfg \
|
||||||
arc-gtk-theme xcursor-breeze \
|
|
||||||
feh xwallpaper
|
feh xwallpaper
|
||||||
|
|
||||||
echo "==> Tangling desktop configs"
|
echo "==> Tangling desktop configs"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
echo "==> Laptop power management"
|
echo "==> Laptop power management"
|
||||||
paru -S --needed \
|
paru -S --needed --noconfirm \
|
||||||
powertop \
|
powertop \
|
||||||
tlp \
|
tlp \
|
||||||
thermald
|
thermald
|
||||||
|
|||||||
@@ -2,6 +2,6 @@
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
echo "==> LaTeX packages"
|
echo "==> LaTeX packages"
|
||||||
paru -S --needed \
|
paru -S --needed --noconfirm \
|
||||||
texlive-most tllocalmgr-git \
|
texlive-most tllocalmgr-git \
|
||||||
biber
|
biber
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
echo "==> Mail packages"
|
echo "==> Mail packages"
|
||||||
paru -S --needed \
|
paru -S --needed --noconfirm \
|
||||||
isync \
|
isync \
|
||||||
msmtp \
|
msmtp \
|
||||||
neomutt \
|
neomutt \
|
||||||
|
|||||||
+99
-28
@@ -1,30 +1,38 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
|
DOTFILES="${HOME}/.config/literate-dotfiles"
|
||||||
|
|
||||||
|
tangle() {
|
||||||
|
emacs --batch -l org --eval "(org-babel-tangle-file \"${DOTFILES}/$1\")"
|
||||||
|
}
|
||||||
|
|
||||||
echo "==> Shell and Terminal"
|
echo "==> Shell and Terminal"
|
||||||
paru -S --needed \
|
paru -S --needed --noconfirm \
|
||||||
bash bash-completion zsh \
|
bash bash-completion zsh \
|
||||||
kitty \
|
kitty \
|
||||||
tmux
|
tmux
|
||||||
|
|
||||||
echo "==> Fonts"
|
echo "==> Fonts"
|
||||||
paru -S --needed \
|
paru -S --needed --noconfirm \
|
||||||
nerd-fonts-hack \
|
ttf-hack-nerd \
|
||||||
|
ttf-sourcecodepro-nerd \
|
||||||
|
adobe-source-code-pro-fonts \
|
||||||
noto-fonts-emoji
|
noto-fonts-emoji
|
||||||
|
|
||||||
echo "==> Text Editors"
|
echo "==> Text Editors"
|
||||||
paru -S --needed \
|
paru -S --needed --noconfirm \
|
||||||
neovim python-pynvim \
|
neovim python-pynvim nodejs-neovim \
|
||||||
emacs \
|
emacs \
|
||||||
aspell aspell-en aspell-fr
|
aspell aspell-en aspell-fr
|
||||||
|
|
||||||
echo "==> GnuPG and Pass"
|
echo "==> GnuPG and Pass"
|
||||||
paru -S --needed \
|
paru -S --needed --noconfirm \
|
||||||
gnupg gnome-keyring \
|
gnupg gnome-keyring \
|
||||||
pass rofi-pass pass-git-helper
|
pass rofi-pass pass-git-helper
|
||||||
|
|
||||||
echo "==> Window Manager and Desktop"
|
echo "==> Window Manager and Desktop"
|
||||||
paru -S --needed \
|
paru -S --needed --noconfirm \
|
||||||
i3-wm \
|
i3-wm \
|
||||||
sxhkd \
|
sxhkd \
|
||||||
polybar \
|
polybar \
|
||||||
@@ -35,53 +43,53 @@ paru -S --needed \
|
|||||||
xorg-xrandr arandr
|
xorg-xrandr arandr
|
||||||
|
|
||||||
echo "==> File Manager"
|
echo "==> File Manager"
|
||||||
paru -S --needed yazi
|
paru -S --needed --noconfirm yazi
|
||||||
|
|
||||||
echo "==> Terminal Utilities"
|
echo "==> Terminal Utilities"
|
||||||
paru -S --needed \
|
paru -S --needed --noconfirm \
|
||||||
fd ripgrep fzf \
|
fd ripgrep fzf \
|
||||||
xclip xsel \
|
xclip xsel \
|
||||||
atool unzip \
|
atool unzip \
|
||||||
trash-cli \
|
trash-cli \
|
||||||
man-db \
|
man-db \
|
||||||
neofetch
|
fastfetch
|
||||||
|
|
||||||
echo "==> Browser"
|
echo "==> Browser"
|
||||||
paru -S --needed \
|
paru -S --needed --noconfirm \
|
||||||
qutebrowser python-adblock pdfjs \
|
qutebrowser python-adblock pdfjs \
|
||||||
firefox-developer-edition passff-host
|
firefox-developer-edition passff-host
|
||||||
|
|
||||||
echo "==> Media"
|
echo "==> Media"
|
||||||
paru -S --needed \
|
paru -S --needed --noconfirm \
|
||||||
mpv \
|
mpv \
|
||||||
jellyfin-tui \
|
jellyfin-tui \
|
||||||
nsxiv \
|
nsxiv \
|
||||||
|
tesseract tesseract-data-eng tesseract-data-fra tesseract-data-osd \
|
||||||
zathura zathura-pdf-mupdf zathura-djvu zathura-ps zathura-cb \
|
zathura zathura-pdf-mupdf zathura-djvu zathura-ps zathura-cb \
|
||||||
pdfpc \
|
pdfpc \
|
||||||
gst-plugins-ugly gst-plugins-good gst-plugins-base-libs gst-plugins-base gst-plugins-bad gst-libav
|
gst-plugins-ugly gst-plugins-good gst-plugins-base-libs gst-plugins-base gst-plugins-bad gst-libav
|
||||||
|
|
||||||
echo "==> PipeWire"
|
echo "==> PipeWire"
|
||||||
paru -S --needed \
|
paru -S --needed --noconfirm \
|
||||||
pipewire pipewire-alsa pipewire-audio pipewire-jack pipewire-pulse \
|
pipewire pipewire-alsa pipewire-audio pipewire-jack pipewire-pulse \
|
||||||
wireplumber \
|
wireplumber
|
||||||
pwvucontrol
|
|
||||||
|
|
||||||
echo "==> PDF and Image Utilities"
|
echo "==> PDF and Image Utilities"
|
||||||
paru -S --needed \
|
paru -S --needed --noconfirm \
|
||||||
pdf2svg pdftk pdfarranger \
|
pdf2svg qpdf pdfarranger \
|
||||||
imagemagick \
|
imagemagick \
|
||||||
maim flameshot \
|
maim flameshot \
|
||||||
unclutter \
|
unclutter \
|
||||||
poppler
|
poppler
|
||||||
|
|
||||||
echo "==> Office"
|
echo "==> Office"
|
||||||
paru -S --needed \
|
paru -S --needed --noconfirm \
|
||||||
onlyoffice-bin \
|
onlyoffice-bin \
|
||||||
libreoffice-fresh libreoffice-fresh-fr \
|
libreoffice-fresh libreoffice-fresh-fr \
|
||||||
inkscape
|
inkscape
|
||||||
|
|
||||||
echo "==> System Utilities"
|
echo "==> System Utilities"
|
||||||
paru -S --needed \
|
paru -S --needed --noconfirm \
|
||||||
udiskie \
|
udiskie \
|
||||||
blueman \
|
blueman \
|
||||||
sshfs \
|
sshfs \
|
||||||
@@ -98,16 +106,79 @@ paru -S --needed \
|
|||||||
yt-dlp \
|
yt-dlp \
|
||||||
python ipython python-pip
|
python ipython python-pip
|
||||||
|
|
||||||
echo "==> GTK Theme"
|
|
||||||
paru -S --needed \
|
|
||||||
lxappearance \
|
|
||||||
arc-gtk-theme \
|
|
||||||
xcursor-breeze \
|
|
||||||
gtk2fontsel
|
|
||||||
|
|
||||||
echo "==> Misc Utilities"
|
echo "==> Misc Utilities"
|
||||||
paru -S --needed \
|
paru -S --needed --noconfirm \
|
||||||
screenkey \
|
|
||||||
xwallpaper \
|
xwallpaper \
|
||||||
highlight-pointer-git \
|
highlight-pointer-git \
|
||||||
mpd
|
mpd
|
||||||
|
|
||||||
|
KEY_FILE="$HOME/.ssh/id_ed25519"
|
||||||
|
HOMELAB_OK=1
|
||||||
|
ESRF_OK=1
|
||||||
|
|
||||||
|
# Generate main SSH key if it doesn't exist
|
||||||
|
if [ ! -f "${KEY_FILE}" ]; then
|
||||||
|
echo ""
|
||||||
|
echo "==> Generating main SSH key"
|
||||||
|
read -p "Generate new SSH key at ${KEY_FILE}? [y/N] " -n 1 -r
|
||||||
|
echo
|
||||||
|
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||||
|
ssh-keygen -t ed25519 -C "thomas@$(hostname)" -f "${KEY_FILE}" -N ""
|
||||||
|
else
|
||||||
|
echo "Skipping SSH key generation"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Deploy key to a remote host if needed
|
||||||
|
deploy_ssh_key() {
|
||||||
|
local host_name="$1"
|
||||||
|
local remote_host="$2"
|
||||||
|
local remote_port="${3:-22}"
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "==> Checking SSH key for ${host_name}"
|
||||||
|
|
||||||
|
# Check if we can connect without password
|
||||||
|
if ssh -o BatchMode=yes -o ConnectTimeout=5 -p "${remote_port}" "${remote_host}" exit 2>/dev/null; then
|
||||||
|
echo "SSH key for ${host_name} is already deployed ✓"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Prompt to deploy key
|
||||||
|
read -p "Deploy SSH key to ${remote_host}? [y/N] " -n 1 -r
|
||||||
|
echo
|
||||||
|
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||||
|
ssh-copy-id -i "${KEY_FILE}.pub" -p "${remote_port}" "${remote_host}"
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
echo "Skipping ${host_name} key deployment"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Setup homelab
|
||||||
|
deploy_ssh_key "homelab" "homelab" 22
|
||||||
|
HOMELAB_OK=$?
|
||||||
|
|
||||||
|
# Setup ESRF
|
||||||
|
deploy_ssh_key "esrf" "dehaeze@firewall.esrf.fr" 8022
|
||||||
|
ESRF_OK=$?
|
||||||
|
|
||||||
|
echo "==> Tangling systemd configs"
|
||||||
|
tangle "systemd.org"
|
||||||
|
|
||||||
|
echo "==> Enabling systemd services"
|
||||||
|
|
||||||
|
if [ $HOMELAB_OK -eq 0 ]; then
|
||||||
|
systemctl --user enable --now homelab-tunnel
|
||||||
|
else
|
||||||
|
echo " Skipping homelab-tunnel (SSH key not configured)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $ESRF_OK -eq 0 ]; then
|
||||||
|
systemctl --user enable --now esrf-tunnel
|
||||||
|
else
|
||||||
|
echo " Skipping esrf-tunnel (SSH key not configured)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
systemctl --user enable --now syncthing
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ DOTFILES="${HOME}/.config/literate-dotfiles"
|
|||||||
|
|
||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
echo "==> Neovim packages"
|
echo "==> Neovim packages"
|
||||||
paru -S --needed neovim python-pynvim nodejs-neovim
|
paru -S --needed --noconfirm neovim python-pynvim nodejs-neovim
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** vim-plug
|
** vim-plug
|
||||||
@@ -36,8 +36,7 @@ Tangle =vim.org= to generate =~/.config/nvim/init.vim=:
|
|||||||
|
|
||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
echo "==> Tangling vim.org"
|
echo "==> Tangling vim.org"
|
||||||
emacsclient -e "(org-babel-tangle-file \"${DOTFILES}/vim.org\")" \
|
emacs --batch -l org --eval "(org-babel-tangle-file \"${DOTFILES}/vim.org\")"
|
||||||
|| emacs --batch -l org --eval "(org-babel-tangle-file \"${DOTFILES}/vim.org\")"
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Install Plugins
|
** Install Plugins
|
||||||
|
|||||||
+1
-1
@@ -99,7 +99,7 @@ tmpfile=/tmp/pdf_page.pdf
|
|||||||
# Ideally would get the page from Zathura...
|
# Ideally would get the page from Zathura...
|
||||||
# pagenum=$(rofi -dmenu -p "Page Number")
|
# pagenum=$(rofi -dmenu -p "Page Number")
|
||||||
|
|
||||||
pdftk "$1" cat $2 output "$tmpfile.pdf" && \
|
qpdf --pages "$1" "$2" -- "$1" "$tmpfile.pdf" && \
|
||||||
pdf2svg "$tmpfile.pdf" "$tmpfile.svg" && \
|
pdf2svg "$tmpfile.pdf" "$tmpfile.svg" && \
|
||||||
inkscape "$tmpfile.svg"
|
inkscape "$tmpfile.svg"
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|||||||
Reference in New Issue
Block a user