~whynothugo/dotfiles

🏡 Configuration files and other dotfiles for my everyday laptop.
lock-and-sleep: properly handle all edge cases
nvim: update cmp-treesitter
webcam: sample script to view webcam

refs

main
browse  log 

clone

read-only
https://git.sr.ht/~whynothugo/dotfiles
read/write
git@git.sr.ht:~whynothugo/dotfiles

You can also use your local clone with git send-email.

#~/.dotfiles

Source | Issues | Patches | Chat

"A man and his tools make a man and his trade". -Vita Sackville-West

This repository contains all configuration files for my desktop setup. The entire system configuration is defined in a declarative way, so recreating it and rolling back and forth can be done with confidence.

There's a few sets of files here:

#Dotfiles

Files in .dotfiles are user-specific configuration for applications. This includes compositor setup, neovim configuration, terminal theme, and settings for a lot of other applications. Symlinks are placed in the home directory pointing to the files inside this repository, so it's easy to track any changes using just git.

I use my own rust-based tool (see src/) to keep this repository in sync with my actual dotfiles using symlinks. It can be executed quickly with cargo run. It won't overwrite any existing files by default.

It gets the job done, and builds to a static binary, which makes bootstrapping simpler. homesick used to work, but it's given me issues with major ruby updates over the years. A binary-compiled homesick clone would be great.

#Ansible

The ansible directory contains ansible playbooks to configure dconf-based applications and install flatpaks I use. Due to how ansible handles sudo, it can't be used for anything system wide. There's also bootstrapping issues in trying to use it to configure pristine systems, so the scope of what ansible handles will likely continue being rather narrow.

#Packages

packages contains a few meta-packages that install all desired packages and system-wide configuration files. See packages/README.md for details.

#Goals of this repo

  • Keep configurations in sync across devices.
  • Keep a versioned history of my configurations.
  • Quickly bootstrap new configure new machines (physical or virtual).
  • Roll back breaking setup or configuration changes.

#Tools I use

  • sway: desktop compositor
  • waybar: system status bar
  • neovim: code editor (using LSP, tree-sitter, and quite a few plugins)
  • zsh: shell and main working environment (it's designed for interactive use)
  • foot: very fast terminal emulator in C with great defaults
  • gammastep: screen colour temperature based on sunrise and sundown
  • darkman: automatic dark mode based on sundown and sunrise

I try to upstream any fixes, tweaks and improvements whenever possible, and limit this repository to customisations and very opinionated settings only.

#Neovim setup

This neovim setup is a major part of my IDE, the other component being foot, zsh, fzf, fd, ag, grep, and many other useful command line tools. All of these tools are pulled in via my whynothugo-desktop meta-package. On other platforms, they need to be installed via the distribution's package manager.

Plugins are managed via git submodules (pending: write a blog article on this).

Language servers also need to be installed via the system package manager (e.g.: pacman on Arch, brew on Darwin, etc). This means that, while the neovim setup is portable across distributions, language servers need to be installed via a distribution specific mechanism.

For distributions that's don't package LSPs (or have very old versions), perhaps https://github.com/williamboman/mason.nvim is a solution.

#Documentation

I try to keep things relatively well documented. Some settings or overrides require attention only once every couple of years (e.g.: Firefox style overrides), and keeping comments around lets me figure out what existing code does, and where I got it from.

git blame and git log $FILE are generally be rather useful too.

#Bootstrapping a new system

rustup can be configured to use the system compiler by default:

rustup toolchain link system /usr
rustup default system

Source: https://rust-lang.github.io/rustup/installation/package-managers.html

#Bootstrapping a desktop environment

Need to initialise himitsu:

himitsu-init

Also need to initialise nixpkgs:

nix-channel --add https://nixos.org/channels/nixpkgs-unstable
nix-channel --update

#LICENCE

Copyright 2012-2022, Hugo Osvaldo Barrera hugo@whynothugo.nl

This repository is licensed under the ISC licence. See LICENCE for details.