Fix config for deepthought

main
trivernis 10 months ago
parent d4c1285810
commit f1f7d9572c
Signed by: Trivernis
GPG Key ID: 7E6D18B61C8D2F4B

@ -9,6 +9,7 @@ ignored = [
# Files irrelevant to windows
"fontconfig",
"systemd",
"firejail",
{{/if}}
]

@ -10,7 +10,11 @@ config.font = wezterm.font_with_fallback {
'FiraMono',
'Jetbrains Mono',
}
{{#if (eq system.hostname "deepthought")}}
config.font_size = 12
{{else}}
config.font_size = 10
{{/if}}
config.color_scheme = 'Dracula'
config.window_background_gradient = {
orientation = 'Vertical',

@ -1,3 +1,58 @@
{{#if (eq system.hostname "deepthought")}}
[user]
email = trivernis@protonmail.com
name = trivernis
signingkey = 6EBCBA37E8CFF6A9
[credential "https://git.trivernis.net"]
username = Trivernis
[credential "https://github.com"]
username = Trivernis
[credential]
helper = store
[commit]
gpgSign = true
[tag]
forceSignAnnotated = true
[filter "lfs"]
process = git-lfs filter-process
required = true
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
[alias]
c = commit -s
commit = commit -s
[core]
editor = hx
pager = delta
[interactive]
diffFilter = delta --color-only
[add.interactive]
useBuiltin = false # required for git 2.37.0
[delta]
navigate = true # use n and N to move between diff sections
light = false # set to true if you're in a terminal w/ a light background color (e.g. the default macOS terminal)
[merge]
conflictstyle = diff3
tool = vimdiff
[diff]
colorMoved = default
rebase = false
[init]
defaultBranch = main
[mergetool]
prompt = false
[pull]
rebase = false
[gpg]
program = /home/trivernis/.local/share/scripts/gpg-pinentry-loopback.bash
[push]
autoSetupRemote = true
{{else}}
[user]
email = trivernis@protonmail.com
name = trivernis
@ -51,3 +106,4 @@
program = {{dirs.data}}/scripts/gpg-pinentry-loopback.bash
[push]
autoSetupRemote = true
{{/if}}

@ -1,10 +1,16 @@
#!/bin/nu
$env.BORG_REPO = '/run/media/trivernis/Backup'
let repo = '/run/media/trivernis/Backup/borg'
$env.BORG_REPO = $repo
let BACKUP_PATHS = ([
~/Documents
~/Videos
~/Pictures/
~/Music
~/Phone
~/.config
~/.zshrc
~/.local
@ -18,18 +24,29 @@ let BACKUP_PATHS = ([
] | path expand )
if (pgrep borg | length) > 0 {
echo "Borg is running"
print "Borg is running"
exit
}
borg break-lock
echo "Creating archive"
let occ = df $repo --output=pcent | split row "\n" | get 1 | str replace "%" "" | into float
if $occ > 95 {
print "Over 95% of disk space is used! Compacting..."
borg compact $repo --progress --threshold 5 -v
}
print "Creating archive"
(borg create
--progress
--warning
--filter AME
--compression zstd
--exclude-caches
--exclude-if-present '.borgexclude'
--exclude-if-present 'Code Cache'
--exclude '*/.cache'
--exclude '*/Rust/*/target'
--exclude '*/target/debug'
@ -39,6 +56,11 @@ echo "Creating archive"
--exclude '*/dynmap/web/tiles'
--exclude '*/work/*decompile'
--exclude '*/PortableGit*'
--exclude '*/Cache'
--exclude '*/GpuCache'
--exclude '*/Code Cache'
--exclude '*/logs'
--exclude '*/.config/syncthing'
--exclude '*.pyc'
--exclude '*/Java/*/build'
--exclude '*/Java/*/out/artifacts'
@ -47,12 +69,17 @@ echo "Creating archive"
--exclude '*/Kotlin/*/out'
--exclude '*/Kotlin/*/build'
--exclude '*/.local/share/Steam'
--exclude '/mnt/Massdata/omenrescue'
--exclude '/mnt/Massdata/hydrus.enc.tar.zst'
--exclude '/mnt/Massdata/fakesys*.iso'
--list
--stats
'::{hostname}-{now}'
$BACKUP_PATHS
)
echo "Deleting old files"
print "Deleting old files"
(borg prune
--progress
--list
@ -62,9 +89,10 @@ echo "Deleting old files"
--keep-weekly 2
--keep-monthly 1
)
echo "Running check for five minutes"
print "Running check for five minutes"
(borg check
--progress
--repository-only
--max-duration 300
)
)

Loading…
Cancel
Save