From 1790f6719be555c5d5249f43944155ceb6d2c75e Mon Sep 17 00:00:00 2001 From: Marco Date: Tue, 31 Aug 2021 11:03:48 +0200 Subject: [PATCH 1/5] update restic --- {restic/.bin => bin}/restic-backup | 9 +++++++++ restic/.config/systemd/user/restic-backup.service | 12 +++++------- restic/.config/systemd/user/restic-backup.timer | 3 ++- 3 files changed, 16 insertions(+), 8 deletions(-) rename {restic/.bin => bin}/restic-backup (89%) diff --git a/restic/.bin/restic-backup b/bin/restic-backup similarity index 89% rename from restic/.bin/restic-backup rename to bin/restic-backup index 61696d4..a30f0cf 100755 --- a/restic/.bin/restic-backup +++ b/bin/restic-backup @@ -46,7 +46,16 @@ if [[ $1 == 'prune' ]]; then info "Pruning snapshots..." $HOME/.local/bin/restic --cache-dir ${CACHE_DIR} -r ${RESTIC_REPOSITORY} prune --max-unused 0 info "Done" + + info "Checking repository..." + $HOME/.local/bin/restic -r ${RESTIC_REPOSITORY} check + info "Done" else + if ! eval which snapper 2> /dev/null; then + # fallback + BACKUP_PATHS="/home/flexo" + fi + info "Starting backup..." $HOME/.local/bin/restic --cache-dir ${CACHE_DIR} -r ${RESTIC_REPOSITORY} backup ${BACKUP_PATHS} \ --exclude-file ${EXCLUDES_FILE} diff --git a/restic/.config/systemd/user/restic-backup.service b/restic/.config/systemd/user/restic-backup.service index a6a22f1..b15bd7b 100644 --- a/restic/.config/systemd/user/restic-backup.service +++ b/restic/.config/systemd/user/restic-backup.service @@ -1,10 +1,8 @@ [Unit] -Description=restic backup +Description=restic Backup +Documentation=man:restic(1) [Service] -Type=oneshot -ExecStartPre=/usr/bin/nm-online -q -ExecStart=%h/.bin/restic-backup - -[Install] -WantedBy=multi-user.target +Type=simple +ExecStartPre=/bin/sh -c 'until ping -c1 google.com; do sleep 1; done;' +ExecStart=%h/.dotfiles/bin/restic-backup diff --git a/restic/.config/systemd/user/restic-backup.timer b/restic/.config/systemd/user/restic-backup.timer index defa16e..cfebebe 100644 --- a/restic/.config/systemd/user/restic-backup.timer +++ b/restic/.config/systemd/user/restic-backup.timer @@ -1,5 +1,6 @@ [Unit] -Description=restic backup +Description=restic Backup Trigger +Documentation=man:restic(1) [Timer] Persistent=true From 82e056aee7f01b1bcfcb3e9ccc72527733942135 Mon Sep 17 00:00:00 2001 From: Marco Date: Tue, 31 Aug 2021 11:06:57 +0200 Subject: [PATCH 2/5] rename toolbox --- bin/{toolbox.sh => toolbox-recreate} | 2 ++ 1 file changed, 2 insertions(+) rename bin/{toolbox.sh => toolbox-recreate} (95%) diff --git a/bin/toolbox.sh b/bin/toolbox-recreate similarity index 95% rename from bin/toolbox.sh rename to bin/toolbox-recreate index 439e7e2..42069dc 100644 --- a/bin/toolbox.sh +++ b/bin/toolbox-recreate @@ -31,6 +31,8 @@ packages=( ## header packages for compiling 'pulseaudio-libs-devel' 'libxcb-devel' 'ncurses-devel' 'dbus-devel' 'libgit2-devel' 'libssh2-devel' 'openssl-devel' 'ncurses-static' 'glibc-static' 'readline-static' + ## python + 'python-requests' 'python-PyMySQL' 'python-psycopg2' ## huami-token 'python3-pytest' 'python3-requests' 'python3-rich' ) From 944315bac1b1d63ae58545eac7e22b1384d03f0e Mon Sep 17 00:00:00 2001 From: Marco Date: Tue, 31 Aug 2021 11:07:52 +0200 Subject: [PATCH 3/5] track flatpak update timer --- flatpak/.config/systemd/user/flatpak-automatic.service | 8 ++++++++ flatpak/.config/systemd/user/flatpak-automatic.timer | 10 ++++++++++ 2 files changed, 18 insertions(+) create mode 100644 flatpak/.config/systemd/user/flatpak-automatic.service create mode 100644 flatpak/.config/systemd/user/flatpak-automatic.timer diff --git a/flatpak/.config/systemd/user/flatpak-automatic.service b/flatpak/.config/systemd/user/flatpak-automatic.service new file mode 100644 index 0000000..b4154c0 --- /dev/null +++ b/flatpak/.config/systemd/user/flatpak-automatic.service @@ -0,0 +1,8 @@ +[Unit] +Description=flatpak Automatic Update +Documentation=man:flatpak(1) + +[Service] +Type=simple +ExecStartPre=/bin/sh -c 'until ping -c1 google.com; do sleep 1; done;' +ExecStart=/usr/bin/flatpak update -y diff --git a/flatpak/.config/systemd/user/flatpak-automatic.timer b/flatpak/.config/systemd/user/flatpak-automatic.timer new file mode 100644 index 0000000..0c1ca53 --- /dev/null +++ b/flatpak/.config/systemd/user/flatpak-automatic.timer @@ -0,0 +1,10 @@ +[Unit] +Description=flatpak Automatic Update Trigger +Documentation=man:flatpak(1) + +[Timer] +OnBootSec=1h +OnUnitInactiveSec=1d + +[Install] +WantedBy=timers.target From 5d7b9c8637f8df8031649145750d9ac4f23ad8ae Mon Sep 17 00:00:00 2001 From: Marco Date: Tue, 31 Aug 2021 11:18:13 +0200 Subject: [PATCH 4/5] update PATH --- zsh/.zshenv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zsh/.zshenv b/zsh/.zshenv index d2fdf60..6b24b61 100644 --- a/zsh/.zshenv +++ b/zsh/.zshenv @@ -3,7 +3,7 @@ HISTSIZE=500000 SAVEHIST=$HISTSIZE export GOPATH="$HOME/.go" -export PATH="$HOME/.cargo/bin:$HOME/.gem/bin:$GOPATH/bin:$HOME/.local/bin:/opt/homebrew/bin:$PATH" +export PATH="$HOME/.cargo/bin:$HOME/.gem/bin:$GOPATH/bin:$HOME/.dotfiles/bin:$HOME/.local/bin" if [[ -x /usr/bin/nvim ]]; then export EDITOR=nvim From 4b5a73fc61ed2c5588093c20bf6aad22c2e34dd1 Mon Sep 17 00:00:00 2001 From: Marco Date: Tue, 31 Aug 2021 11:20:39 +0200 Subject: [PATCH 5/5] homebrew path for macos --- zsh/.zshenv | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/zsh/.zshenv b/zsh/.zshenv index 6b24b61..40bf7ff 100644 --- a/zsh/.zshenv +++ b/zsh/.zshenv @@ -3,7 +3,9 @@ HISTSIZE=500000 SAVEHIST=$HISTSIZE export GOPATH="$HOME/.go" -export PATH="$HOME/.cargo/bin:$HOME/.gem/bin:$GOPATH/bin:$HOME/.dotfiles/bin:$HOME/.local/bin" +export PATH="$HOME/.cargo/bin:$HOME/.gem/bin:$GOPATH/bin:$HOME/.dotfiles/bin:$HOME/.local/bin:$PATH" + +[[ "`uname`" == 'Darwin' ]] && PATH="/opt/homebrew/bin:$PATH" if [[ -x /usr/bin/nvim ]]; then export EDITOR=nvim