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 # Files irrelevant to windows
"fontconfig", "fontconfig",
"systemd", "systemd",
"firejail",
{{/if}} {{/if}}
] ]

@ -10,7 +10,11 @@ config.font = wezterm.font_with_fallback {
'FiraMono', 'FiraMono',
'Jetbrains Mono', 'Jetbrains Mono',
} }
{{#if (eq system.hostname "deepthought")}}
config.font_size = 12
{{else}}
config.font_size = 10 config.font_size = 10
{{/if}}
config.color_scheme = 'Dracula' config.color_scheme = 'Dracula'
config.window_background_gradient = { config.window_background_gradient = {
orientation = 'Vertical', 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] [user]
email = trivernis@protonmail.com email = trivernis@protonmail.com
name = trivernis name = trivernis
@ -51,3 +106,4 @@
program = {{dirs.data}}/scripts/gpg-pinentry-loopback.bash program = {{dirs.data}}/scripts/gpg-pinentry-loopback.bash
[push] [push]
autoSetupRemote = true autoSetupRemote = true
{{/if}}

@ -1,10 +1,16 @@
#!/bin/nu #!/bin/nu
$env.BORG_REPO = '/run/media/trivernis/Backup'
let repo = '/run/media/trivernis/Backup/borg'
$env.BORG_REPO = $repo
let BACKUP_PATHS = ([ let BACKUP_PATHS = ([
~/Documents ~/Documents
~/Videos ~/Videos
~/Pictures/ ~/Pictures/
~/Music ~/Music
~/Phone
~/.config ~/.config
~/.zshrc ~/.zshrc
~/.local ~/.local
@ -18,18 +24,29 @@ let BACKUP_PATHS = ([
] | path expand ) ] | path expand )
if (pgrep borg | length) > 0 { if (pgrep borg | length) > 0 {
echo "Borg is running" print "Borg is running"
exit exit
} }
borg break-lock 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 (borg create
--progress --progress
--warning --warning
--filter AME --filter AME
--compression zstd --compression zstd
--exclude-caches --exclude-caches
--exclude-if-present '.borgexclude'
--exclude-if-present 'Code Cache'
--exclude '*/.cache' --exclude '*/.cache'
--exclude '*/Rust/*/target' --exclude '*/Rust/*/target'
--exclude '*/target/debug' --exclude '*/target/debug'
@ -39,6 +56,11 @@ echo "Creating archive"
--exclude '*/dynmap/web/tiles' --exclude '*/dynmap/web/tiles'
--exclude '*/work/*decompile' --exclude '*/work/*decompile'
--exclude '*/PortableGit*' --exclude '*/PortableGit*'
--exclude '*/Cache'
--exclude '*/GpuCache'
--exclude '*/Code Cache'
--exclude '*/logs'
--exclude '*/.config/syncthing'
--exclude '*.pyc' --exclude '*.pyc'
--exclude '*/Java/*/build' --exclude '*/Java/*/build'
--exclude '*/Java/*/out/artifacts' --exclude '*/Java/*/out/artifacts'
@ -47,12 +69,17 @@ echo "Creating archive"
--exclude '*/Kotlin/*/out' --exclude '*/Kotlin/*/out'
--exclude '*/Kotlin/*/build' --exclude '*/Kotlin/*/build'
--exclude '*/.local/share/Steam' --exclude '*/.local/share/Steam'
--exclude '/mnt/Massdata/omenrescue'
--exclude '/mnt/Massdata/hydrus.enc.tar.zst'
--exclude '/mnt/Massdata/fakesys*.iso'
--list --list
--stats --stats
'::{hostname}-{now}' '::{hostname}-{now}'
$BACKUP_PATHS $BACKUP_PATHS
) )
echo "Deleting old files"
print "Deleting old files"
(borg prune (borg prune
--progress --progress
--list --list
@ -62,7 +89,8 @@ echo "Deleting old files"
--keep-weekly 2 --keep-weekly 2
--keep-monthly 1 --keep-monthly 1
) )
echo "Running check for five minutes" print "Running check for five minutes"
(borg check (borg check
--progress --progress
--repository-only --repository-only

Loading…
Cancel
Save