diff --git a/.bin/.e b/.bin/.e index d7e721a..8ef310e 100755 --- a/.bin/.e +++ b/.bin/.e @@ -5,8 +5,8 @@ declare -A mapper=( [".t"]="$HOME/.bin/.t" ["alacritty"]="$HOME/.config/alacritty/alacritty.toml" ["autoinstall.conf"]="$HOME/.config/autoinstall.conf" + ["autorestic"]="$HOME/.config/autorestic/.autorestic.yml" ["autostart.toml"]="$HOME/.config/autostart.toml" - ["backup"]="$HOME/.bin/host-backup-$(cat /proc/sys/kernel/hostname)" ["bash"]="$HOME/.bashrc" ["bspwm"]="$HOME/.config/bspwm/bspwmrc" ["completions"]="$HOME/.config/completionsrc" diff --git a/.bin/host-backup b/.bin/host-backup deleted file mode 100755 index 1486aa5..0000000 --- a/.bin/host-backup +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env sh - -set -e - -_hostname="$(cat /proc/sys/kernel/hostname)" -_host_backup_file="host-backup-$_hostname" -if [ -x "$( which "$_host_backup_file")" ] -then - # shellcheck disable=SC1090 - . "$_host_backup_file" -else - echo "No host-backup file found: $_host_backup_file" - exit 1 -fi - -if [ -z "$1" ] -then - host_backup_run - sleep 3 - exit 0 -fi - -case "$1" in - "_forget") - host-backup forget --prune --group-by "host" \ - --keep-last 14 \ - --keep-daily 60 \ - --keep-weekly 24 \ - --keep-monthly 36 \ - --keep-yearly 10 - ;; - *) - restic "$@" - ;; -esac - diff --git a/.bin/host-mode##hostname.portalo b/.bin/host-mode##hostname.portalo deleted file mode 100755 index 464e9b0..0000000 --- a/.bin/host-mode##hostname.portalo +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env bash - -modes="monitor-std -monitor-single -monitor-single-sec -zellij" - -portalo_mode_monitor () { - echo "Loading portalo monitor layout ${1:-std}" - yadm config --unset-all local.class monitor-* - - if [ -n "$1" ]; then - yadm config --add local.class "$1" - fi - - swaymsg reload -} - -portalo_mode_zellij () { - layout_dir="$HOME/.config/zellij/layouts" - layouts=$(\ls -1 "$layout_dir") - layout=$(echo "$layouts" | $DMENU -p "layout") - if [ -n "$layout" ]; then - $TERMINAL -e zellij --layout="$layout_dir/$layout" - fi -} - -if [ -z "$1" ]; then - mode=$(echo "$modes" | $DMENU -p "mode") -else - mode=$1 -fi - -case $mode in - "monitor-std") portalo_mode_monitor ;; - "monitor-"*) portalo_mode_monitor "$mode" ;; - "zellij") portalo_mode_zellij ;; - *) echo "'$mode' is not a valid mode (single, std)" ;; -esac diff --git a/.bin/menu-shutdown b/.bin/menu-shutdown index 1d3b473..43f7df2 100755 --- a/.bin/menu-shutdown +++ b/.bin/menu-shutdown @@ -9,7 +9,7 @@ autostart" action=$(echo "$actions" | $DMENU) _menu_shutdown_backup() { - alacritty -e "host-backup" + alacritty -e sh -c "autorestic backup -av && sleep 3" } if [ -z "$action" ]; then diff --git a/.config/home-manager/home.nix##hostname.portalo,user.serguzim b/.config/home-manager/home.nix##hostname.portalo,user.serguzim index 4dcc442..8e74115 100644 --- a/.config/home-manager/home.nix##hostname.portalo,user.serguzim +++ b/.config/home-manager/home.nix##hostname.portalo,user.serguzim @@ -13,6 +13,7 @@ ]; home.packages = with pkgs; [ + autorestic cargo # rust #ckb-next # corsair hardware control #rustdesk # remote desktop tool # disabled for nightly from aur diff --git a/.config/yadm/encrypt b/.config/yadm/encrypt index 3e45726..75041ab 100644 --- a/.config/yadm/encrypt +++ b/.config/yadm/encrypt @@ -1,4 +1,5 @@ .bin/host-backup-portalo +.config/autorestic/.autorestic.yml##hostname.portalo,default .config/env.d/99-secrets .config/projectsrc .config/rclone/rclone.conf