Merge branch 'default' of git.spa5.dev:flexo/Dotfiles into default

This commit is contained in:
2021-08-31 11:24:22 +02:00
7 changed files with 37 additions and 9 deletions

View File

@@ -46,7 +46,16 @@ if [[ $1 == 'prune' ]]; then
info "Pruning snapshots..." info "Pruning snapshots..."
$HOME/.local/bin/restic --cache-dir ${CACHE_DIR} -r ${RESTIC_REPOSITORY} prune --max-unused 0 $HOME/.local/bin/restic --cache-dir ${CACHE_DIR} -r ${RESTIC_REPOSITORY} prune --max-unused 0
info "Done" info "Done"
info "Checking repository..."
$HOME/.local/bin/restic -r ${RESTIC_REPOSITORY} check
info "Done"
else else
if ! eval which snapper 2> /dev/null; then
# fallback
BACKUP_PATHS="/home/flexo"
fi
info "Starting backup..." info "Starting backup..."
$HOME/.local/bin/restic --cache-dir ${CACHE_DIR} -r ${RESTIC_REPOSITORY} backup ${BACKUP_PATHS} \ $HOME/.local/bin/restic --cache-dir ${CACHE_DIR} -r ${RESTIC_REPOSITORY} backup ${BACKUP_PATHS} \
--exclude-file ${EXCLUDES_FILE} --exclude-file ${EXCLUDES_FILE}

View File

@@ -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

View File

@@ -0,0 +1,10 @@
[Unit]
Description=flatpak Automatic Update Trigger
Documentation=man:flatpak(1)
[Timer]
OnBootSec=1h
OnUnitInactiveSec=1d
[Install]
WantedBy=timers.target

View File

@@ -1,10 +1,8 @@
[Unit] [Unit]
Description=restic backup Description=restic Backup
Documentation=man:restic(1)
[Service] [Service]
Type=oneshot Type=simple
ExecStartPre=/usr/bin/nm-online -q ExecStartPre=/bin/sh -c 'until ping -c1 google.com; do sleep 1; done;'
ExecStart=%h/.bin/restic-backup ExecStart=%h/.dotfiles/bin/restic-backup
[Install]
WantedBy=multi-user.target

View File

@@ -1,5 +1,6 @@
[Unit] [Unit]
Description=restic backup Description=restic Backup Trigger
Documentation=man:restic(1)
[Timer] [Timer]
Persistent=true Persistent=true

View File

@@ -3,7 +3,9 @@ HISTSIZE=500000
SAVEHIST=$HISTSIZE SAVEHIST=$HISTSIZE
export GOPATH="$HOME/.go" 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:$PATH"
[[ "`uname`" == 'Darwin' ]] && PATH="/opt/homebrew/bin:$PATH"
if [[ -x /usr/bin/nvim ]]; then if [[ -x /usr/bin/nvim ]]; then
export EDITOR=nvim export EDITOR=nvim