diff --git a/.config/shell/init_dotfiles.sh b/.config/shell/init_dotfiles.sh index bfb4117..729ccd9 100755 --- a/.config/shell/init_dotfiles.sh +++ b/.config/shell/init_dotfiles.sh @@ -21,6 +21,7 @@ git clone --bare git@git.webartifex.biz:alexander/dotfiles.git "$HOME/.dotfiles" # Backup old dotfiles rm -rf "$HOME/.dotfiles.bak" >/dev/null mkdir -p $HOME/.dotfiles.bak/.config/{bat,flameshot,git,Nextcloud,pop-system-updater,psql,pypoetry,shell} && \ +mkdir -p $HOME/.dotfiles.bak/.mackup && \ mkdir -p $HOME/.dotfiles.bak/.vim/{after/ftplugin,backup,swap,undo} && \ mkdir -p $HOME/.dotfiles.bak/.ssh && \ /usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME checkout 2>&1 | egrep "\s+\." | awk {'print $1'} | \ diff --git a/.mackup.cfg b/.mackup.cfg new file mode 100644 index 0000000..da9e588 --- /dev/null +++ b/.mackup.cfg @@ -0,0 +1,24 @@ +[storage] +engine = file_system +path = nextcloud/getraenkemarkt +directory = mackup + +[applications_to_ignore] + +# Do not sync configuration files that are kept in `git` +# See: https://gitlab.webartifex.biz/alexander/dotfiles +bash +bat +git +flameshot +mackup +p10k +pgsql +poetry +ssh +vim +wget +zsh + +# Somehow, libreoffice cannot start with some other machine's configuration +libreoffice diff --git a/.mackup/README.md b/.mackup/README.md new file mode 100644 index 0000000..3ae9283 --- /dev/null +++ b/.mackup/README.md @@ -0,0 +1,7 @@ +# Custom Configuration for `mackup` + +This folder contains various **config** files + to include all kinds of files in the [`mackup backup`](https://github.com/lra/mackup). +Their format is described [here](https://github.com/lra/mackup/tree/master/doc#add-support-for-an-application-or-almost-any-file-or-directory). + +`mackup` is used to synchronize (dot) files the general public should *not* see. diff --git a/.mackup/anyconnect.cfg b/.mackup/anyconnect.cfg new file mode 100644 index 0000000..729f0de --- /dev/null +++ b/.mackup/anyconnect.cfg @@ -0,0 +1,5 @@ +[application] +name = Cisco's AnyConnect + +[configuration_files] +.anyconnect diff --git a/.mackup/histories.cfg b/.mackup/histories.cfg new file mode 100644 index 0000000..786c5ad --- /dev/null +++ b/.mackup/histories.cfg @@ -0,0 +1,13 @@ +[application] +name = various history files + +[configuration_files] +.bash_history +.lesshst +.python_history +.tig_history +.zsh_history + +[xdg_configuration_files] +# `~/.config/psql` is set in `~/.psqlrc` for all history files +psql diff --git a/.mackup/nautilus.cfg b/.mackup/nautilus.cfg new file mode 100644 index 0000000..c6c1e5b --- /dev/null +++ b/.mackup/nautilus.cfg @@ -0,0 +1,5 @@ +[application] +name = GNOME Files a.k.a. Nautilus + +[xdg_configuration_files] +gtk-3.0/bookmarks diff --git a/.mackup/ssh_non-public.cfg b/.mackup/ssh_non-public.cfg new file mode 100644 index 0000000..9e0dbd8 --- /dev/null +++ b/.mackup/ssh_non-public.cfg @@ -0,0 +1,7 @@ +[application] +name = non-public SSH (config) files + +[configuration_files] +.ssh/config +.ssh/known_hosts +.ssh/known_hosts.old diff --git a/.psqlrc b/.psqlrc index af0d26d..f2073cd 100644 --- a/.psqlrc +++ b/.psqlrc @@ -20,6 +20,10 @@ -- Use the best text editor in the world \set EDITOR vi +-- Use separate history files per database +-- and keep them in one folder for easier sync with `mackup` +\set HISTFILE ~/.config/psql/.psql_history- :DBNAME + -- Don't store the same SQL statement repeatedly \set HISTCONTROL ignoredups diff --git a/README.md b/README.md index 1d262f1..40e9ca0 100644 --- a/README.md +++ b/README.md @@ -41,3 +41,10 @@ Additionally, two `virtualenv`s, "interactive" and "utils", are also created: - "utils" hosts globally available utilities. Use `pyenv local ...` to specify a particular Python binary for a project. + + +### Non-public Dotfiles + +After setting up the Python environments (i.e., the "utils"), + running `mackup restore` symlinks further dotfiles into `~/`. +This only works for this project's maintainer.