Compare commits

...

3 Commits

5 changed files with 120 additions and 38 deletions

View File

@ -102,9 +102,10 @@
- [ ] add LUKS Nuke support https://www.kali.org/tutorials/nuke-kali-linux-luks/ - [ ] add LUKS Nuke support https://www.kali.org/tutorials/nuke-kali-linux-luks/
- [ ] OPTIONAL add PowerShell https://www.kali.org/tutorials/installing-powershell-on-kali-linux/ - [ ] OPTIONAL add PowerShell https://www.kali.org/tutorials/installing-powershell-on-kali-linux/
** TODO [0/4] ** TODO [0/5]
- [ ] explain setup, ideas, practises - [ ] explain setup, ideas, practises
- [ ] add HOWTO - [ ] add HOWTO
- [ ] seperate sources.list setup for server/desktop/laptop - [ ] seperate sources.list setup for server/desktop/laptop
- [ ] Check new bootable USB solution: https://ventoy.net/en/index.html
- [ ] move to ansible for easier modularization of setup - [ ] move to ansible for easier modularization of setup

View File

@ -0,0 +1,10 @@
[Unit]
Description=My auto backup to WD Passport
Requires=media-wdpassport2tb.mount
After=media-wdpassport2tb.mount
[Service]
ExecStart=/home/fschl/dotfiles/scripts/show_local_backup.sh
[Install]
WantedBy=media-wdpassport2tb.mount

View File

@ -0,0 +1,11 @@
[Unit]
Description=Restart Syncthing after resume
Documentation=man:syncthing(1)
After=sleep.target
[Service]
Type=oneshot
ExecStart=-/usr/bin/pkill -HUP -x syncthing
[Install]
WantedBy=sleep.target

View File

@ -0,0 +1,24 @@
[Unit]
Description=Syncthing - Open Source Continuous File Synchronization for %I
Documentation=man:syncthing(1)
After=network.target
StartLimitIntervalSec=60
StartLimitBurst=4
[Service]
User=%i
ExecStart=/usr/bin/syncthing serve --no-browser --no-restart --logflags=0
Restart=on-failure
RestartSec=1
SuccessExitStatus=3 4
RestartForceExitStatus=3 4
# Hardening
ProtectSystem=full
PrivateTmp=true
SystemCallArchitectures=native
MemoryDenyWriteExecute=true
NoNewPrivileges=true
[Install]
WantedBy=multi-user.target

View File

@ -190,6 +190,56 @@ install_latex() {
--no-install-recommends --no-install-recommends
} }
install_workstation_apps() {
DEBIAN_FRONTEND=noninteractive
# TODO add non-free to apt/sources.list
apt update
apt install -y \
alsa-utils \
aspell \
aspell-de \
aspell-en \
cups-browsed \
emacs \
firefox-esr \
firmware-iwlwifi \
firmware-linux-nonfree \
firmware-realtek \
fonts-font-awesome \
fonts-noto \
fonts-noto-cjk \
gimp \
keepassxc \
libnotify-bin \
libnotify-dev \
libreoffice-calc \
libreoffice-impress \
libreoffice-l10n-de \
libreoffice-l10n-en-gb \
libreoffice-writer \
ntfs-3g \
nmap \
pulseaudio \
slim \
thunderbird \
thunderbird-l10n-de \
thunderbird-l10n-en-gb \
vlc \
--no-install-recommends
TARGET="/home/$USERNAME/.emacs.d"
git clone https://github.com/syl20bnr/spacemacs "${TARGET}"
# rm -rf "${TARGET}"/private/snippets
# git clone https://github.com/AndreaCrotti/yasnippet-snippets "${TARGET}"/private/yas-snippets
# ln -s "${TARGET}"/private/yas-snips/snippets "${TARGET}"/private/snippets/
}
install_sway() {
echo ".... TODO ;-) ..."
}
install_i3() { install_i3() {
echo "update and installing i3wm and some tools..." echo "update and installing i3wm and some tools..."
@ -206,52 +256,25 @@ install_i3() {
DEBIAN_FRONTEND=noninteractive DEBIAN_FRONTEND=noninteractive
# TODO add non-free to apt/sources.list # TODO add non-free to apt/sources.list
apt update apt update
apt install -y \ apt install -y \
alsa-utils \
aspell \
aspell-de \
aspell-en \
cups-browsed \
emacs \
feh \ feh \
firefox-esr \
firmware-iwlwifi \
firmware-linux-nonfree \
firmware-realtek \
fonts-font-awesome \
fonts-noto \
fonts-noto-cjk \
fswebcam \ fswebcam \
gimp \
i3 \ i3 \
i3lock \ i3lock \
i3lock-fancy \ i3lock-fancy \
i3status \ i3status \
keepassxc \
libnotify-bin \ libnotify-bin \
libnotify-dev \ libnotify-dev \
libreoffice-calc \
libreoffice-impress \
libreoffice-l10n-de \
libreoffice-l10n-en-gb \
libreoffice-writer \
network-manager-gnome \ network-manager-gnome \
network-manager-vpnc \ network-manager-vpnc \
network-manager-vpnc-gnome \ network-manager-vpnc-gnome \
notify-osd \ notify-osd \
ntfs-3g \
nmap \
pulseaudio \
remmina \ remmina \
rxvt-unicode-256color \ rxvt-unicode-256color \
scrot \ scrot \
shotwell \ shotwell \
slim \ slim \
thunderbird \
thunderbird-l10n-de \
thunderbird-l10n-en-gb \
vlc \ vlc \
xorg \ xorg \
--no-install-recommends --no-install-recommends
@ -262,6 +285,12 @@ install_i3() {
Exec=/usr/lib/notification-daemon/notification-daemon Exec=/usr/lib/notification-daemon/notification-daemon
EOF EOF
echo "... setting capslock to control"
sed -i "s/^XKBOPTIONS=.*/XKBOPTIONS=\"ctrl:nocaps\"/" /etc/default/keyboard
}
install_syncthing() {
# install Syncthing via https://apt.syncthing.net/ # install Syncthing via https://apt.syncthing.net/
# Add the release PGP keys: # Add the release PGP keys:
curl -s https://syncthing.net/release-key.txt | sudo apt-key add - curl -s https://syncthing.net/release-key.txt | sudo apt-key add -
@ -280,16 +309,14 @@ EOF
apt autoclean apt autoclean
apt clean apt clean
TARGET="/home/$USERNAME/.emacs.d" echo "enable and start the syncthing per-user service for ${USERNAME}"
git clone https://github.com/syl20bnr/spacemacs "${TARGET}" cp ../etc/systemd/system/syncth* /etc/systemd/system/
# rm -rf "${TARGET}"/private/snippets user=${USERNAME}
# git clone https://github.com/AndreaCrotti/yasnippet-snippets "${TARGET}"/private/yas-snippets sudo systemctl daemon-reload
# ln -s "${TARGET}"/private/yas-snips/snippets "${TARGET}"/private/snippets/ sudo systemctl enable syncthing@${USERNAME}
sudo systemctl start syncthing@${USERNAME}.service
systemctl status syncthing@${USERNAME}.service
no_suspend
echo "... setting capslock to control"
sed -i "s/^XKBOPTIONS=.*/XKBOPTIONS=\"ctrl:nocaps\"/" /etc/default/keyboard
} }
install_vscodium() { install_vscodium() {
@ -412,11 +439,15 @@ install_golang() {
) )
} }
install_rust() {
echo ".... TODO ! rustup.sh ... "
}
main() { main() {
local cmd=$1 local cmd=$1
if [[ -z "$cmd" ]]; then if [[ -z "$cmd" ]]; then
echo "Usage: \n base (includes docker+compose)| desktop | server | dotfiles | vscode | latex | update-docker | go" echo "Usage: \n base (incl docker+compose)| desktop | server | dotfiles | vscode | latex | update-docker | go | rust"
fi fi
case "$cmd" in case "$cmd" in
@ -437,7 +468,9 @@ main() {
base_applications base_applications
install_docker install_docker
install_compose install_compose
install_syncthing
install_i3 install_i3
install_workstation_apps
if [ -f "./get_private_stuff.sh" ]; then if [ -f "./get_private_stuff.sh" ]; then
source get_private_stuff.sh source get_private_stuff.sh
fi fi
@ -455,6 +488,9 @@ main() {
go) go)
install_golang install_golang
;; ;;
rust)
install_rust
;;
esac esac
} }