#+title: dotfiles management #+PROPERTY: header-args :mkdirp yes #+auto_tangle: t * git #+begin_src conf :tangle ~/.gitconfig [user] name = cashmere email = cashmere@autistici.org useConfigOnly = true signingkey = B877C0AC3B080FBB! [init] defaultBranch = master [commit] gpgsign = true [gpg] format = openpgp program = gpg [pull] rebase = true [push] autoSetupRemote = true default = current [fetch] prune = true pruneTags = true [diff] algorithm = histogram [merge] conflictstyle = zdiff3 [alias] dft = -c diff.external=difft diff dlog = -c diff.external=difft log -p --ext-diff dshow = -c diff.external=difft show --ext-diff [rebase] autosquash = true autostash = true [core] autocrlf = input [remote "origin"] gcrypt-participants = B877C0AC3B080FBB gcrypt-signingkey = B877C0AC3B080FBB [wt] basedir = .git/wt copyignored = true copymodified = true #+end_src * .env #+begin_src sh :tangle ~/.env # Common environment for login shells and X session EDITOR=vi PAGER=less export EDITOR PAGER PASSWORD_STORE_DIR=$HOME/pass export PASSWORD_STORE_DIR # Launch gpg-agent and expose its SSH socket gpgconf --launch gpg-agent export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) #+end_src * .profile #+begin_src sh :tangle ~/.profile # # .profile - POSIX Shell startup script for login shells # # see also sh(1), environ(7). # # set ENV to a file invoked each time sh is started for interactive use. ENV=$HOME/.shrc; export ENV # Let sh(1) know it's at home, despite /home being a symlink. if [ "$PWD" != "$HOME" ] && [ "$PWD" -ef "$HOME" ] ; then cd ; fi # Query terminal size; useful for serial lines. if [ -x /usr/bin/resizewin ] ; then /usr/bin/resizewin -z ; fi # Display a random cookie on each login. if [ -x /usr/bin/fortune ] ; then /usr/bin/fortune freebsd-tips ; fi # Shared environment (GPG, editor, password-store) . "$HOME/.env" # Start xonsh for interactive login shells on a tty if [ -n "$PS1" ] && [ -x /usr/local/bin/xonsh ]; then exec /usr/local/bin/xonsh fi #+end_src * .xinitrc #+begin_src sh :tangle ~/.xinitrc . "$HOME/.env" export GPG_TTY=$(tty) exec i3 #+end_src * .xonshrc #+begin_src python :tangle ~/.xonshrc import subprocess, shutil $GPG_TTY = $(tty).strip() subprocess.run(["gpg-connect-agent", "updatestartuptty", "/bye"], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) if shutil.which("atuin"): running = subprocess.run(["pgrep", "-x", "atuin"], capture_output=True).returncode == 0 if not running: subprocess.Popen(["atuin", "daemon", "start"], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, start_new_session=True) execx($(atuin init xonsh)) execx($(zoxide init xonsh), 'exec', __xonsh__.ctx, filename='zoxide') #+end_src * atuin #+begin_src toml :tangle ~/.config/atuin/config.toml auto_sync = true sync_address = "https://atuin.cashmere.rs" sync_frequency = "1m" [daemon] enabled = true systemd_socket = false [dotfiles] enabled = true #+end_src * ssh ** =authorized_keys= #+begin_src conf :tangle ~/.ssh/authorized_keys ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILOwBidfdZzcSEIPSRT0C8U9U55WSES1ugqAKE+nvgQ9 (none) #+end_src * gpg setup ** TODO gpg-agent.conf ** TODO sshcontrol * Tasks ** Services *** TODO [#C] Unlock disk encryption over SSH *** Navidrome *** yggdrasil