Skip to content

clement-deltel/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

629 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dotfiles

Personal dotfiles managed with chezmoi and doppler.

Table of Contents

1. Pre-requisites

I store the below secrets in Doppler:

  • AWS SSO account details
  • Azure DevOps account details
  • git user name and email
  • kubeconfig and some custom kubernetes aliases
  • SSH keys: RSA and ED25519
  • wakapi API key and URL

I store the sensitive files for my Windows machine in an AWS S3 bucket.

2. Linux

2.1 Install

  1. Export required environment variables:
export GITHUB_USERNAME=clement-deltel
# Machine configuration. Options: pro, perso
export MACHINE=pro
# Linux distribution family. Options: arch, debian, nixos, redhat
export FAMILY=debian
# Update with your Doppler CLI token
export DOPPLER_TOKEN=""
  1. Install dependencies:
# Debian-like Systems
sudo apt update -y && sudo apt install -y curl
# RedHat-like Systems
sudo yum update -y && sudo yum install -y curl
# Arch
# NixOS
  1. Run installation script:
curl -fLSs https://raw.githubusercontent.com/${GITHUB_USERNAME}/dotfiles/refs/heads/main/docker/linux/${FAMILY}/install.sh | bash
  1. After pulling and configuring the dotfiles, chezmoi run a script installing ansible, and then running playbooks.
  2. Ansible playbooks automatically install and configure these apps.
  3. Clear sensitive information:
unset DOPPLER_TOKEN

2.2 Shell

Zsh is my default shell, for which I use plugins.

Here is my theme: robbyrussell

Here are some useful Linux system commands:

  • Built-ins
    • dig - DNS lookup utility.
    • lshw - list hardware.
    • lsof - list open files.
    • rsync - remote (and local) file-copying tool.
    • shred - overwrite a file to hide its contents, and optionally delete it.
    • stat - display file or file system status.
    • systemd-analyze - analyze and debug system manager.
    • tcpdump - dump traffic on a network.
    • watch - execute a program periodically, showing output fullscreen.
  • More Utils
    • errno - number of last error.
    • ifdata - get network interface info without parsing ifconfig output.
    • vidir - edit directory.
    • vipe - edit pipe.
    • zrun - automatically uncompress arguments to command.

2.3 Update

Run the command below to refresh the configuration after an update on the repository:

chezmoi update
# or the alias
cmu

2.4 Development

  1. Export required environment variables and build Docker image:
export GITHUB_USERNAME=clement-deltel
# Machine configuration. Options: pro, perso
export MACHINE=pro
# Set image parameters
export FAMILY=debian
export IMAGE=ubuntu:24.04
# See all options and more details at https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
export TIMEZONE=Etc/GMT

# Update with your Doppler CLI token
export DOPPLER_TOKEN=""

# Docker build and then run
# Use option --progress=plain to see steps in more details
docker build --build-arg GITHUB_USERNAME --build-arg MACHINE --build-arg IMAGE --build-arg TIMEZONE --build-arg DOPPLER_TOKEN --file docker/linux/${FAMILY}/Dockerfile --tag ${IMAGE}-dotfiles-dev --target development docker/linux/${FAMILY}/

unset DOPPLER_TOKEN
  1. Run a container:
docker run --interactive --name dotfiles-dev --tty --rm --volume ~/.local/share/chezmoi:/home/linux/.local/share/chezmoi ${IMAGE}-dotfiles-dev

2.5 Test

  1. Install Docker to test this setup. The following images have been tested so far:
  • Debian-like Systems
    • ubuntu:22.04
    • ubuntu:24.04
  1. Export required environment variables and build Docker image:
export GITHUB_USERNAME=clement-deltel
# Machine configuration. Options: pro, perso
export MACHINE=pro
# Set image parameters
export FAMILY=debian
export IMAGE=ubuntu:24.04
# See all options and more details at https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
export TIMEZONE=Etc/GMT

# Update with your Doppler CLI token
export DOPPLER_TOKEN=""

# Docker build and then run
# Use option --progress=plain to see steps in more details
docker build --build-arg GITHUB_USERNAME --build-arg MACHINE --build-arg IMAGE --build-arg TIMEZONE --build-arg DOPPLER_TOKEN --file docker/linux/${FAMILY}/Dockerfile --tag ${IMAGE}-dotfiles --target production docker/linux/${FAMILY}/

unset DOPPLER_TOKEN
  1. Run a container:
docker run --interactive --name dotfiles --tty --rm ${IMAGE}-dotfiles

To be tested:

  • Debian-like Systems
    • debian:12:10
    • ubuntu:24.04
  • RedHat-like Systems
    • quay.io/centos/centos:10
    • fedora:42
  • ArchLinux
    • archlinux:base-20250302.0.316047
  • NixOS
    • nixos/nix:2.27.1
docker run --interactive --name dotfiles --tty --rm <image> bash

2.5 Containers

If needed, run this extra playbook to pull quite handy base images:

# Pull Docker images: archlinux, centos, debian, fedora, mongodb, nixos, postgis, postgres, rabbitmq, redis, ubuntu
ansible-playbook --become --connection local --inventory "localhost," --tags init ~/ansible/orchestration/images.yml

Here is the list of containerized tools that I use:

  • Faster Whisper - faster whisper transcription with ctranslate2. I use more specifically the image provided by linuxserver.

3. Microsoft Windows

3.1 Install

  1. Export required environment variables:
$Env:GITHUB_USERNAME=clement-deltel
# Machine configuration. Options: pro, perso
$Env:MACHINE=pro
# Update with your Doppler CLI token
$Env:$DOPPLER_TOKEN=""
  1. Run installation script:
curl -fLSs https://raw.githubusercontent.com/clement-deltel/dotfiles/refs/heads/main/docker/microsoft/install.sh | powershell
  1. After pulling and configuring the dotfiles, chezmoi run several powershell scripts, executing the steps below:

  2. Chocolatey install and configure these apps.

  3. Winget install and configure these apps.

  4. chezmoi also restore some files from backups stored in AWS S3:

    • Google Chrome
    • Outlook Signatures
    • Windows Explorer - Quick Access
    • Windows Start Menu
    • Windows Subsystem for Linux (WSL)
    • Windows Taskbar
  5. Finally, install the softwares requiring manual effort.

  6. Clean sensitive information:

$Env:DOPPLER_TOKEN=$null

3.2 Test

Install Docker to test this setup.

Then, build an image:

$Env:GITHUB_USERNAME=clement-deltel
# Machine configuration. Options: pro, perso
$Env:MACHINE=pro
# Update with your Doppler CLI token
$Env:$DOPPLER_TOKEN=""

# Docker build and then run
# Use option --progress=plain to see steps in more details
docker build --build-arg GITHUB_USERNAME --build-arg MACHINE --build-arg DOPPLER_TOKEN --file docker/microsoft/Dockerfile --tag dotfiles docker/microsoft/

$Env:DOPPLER_TOKEN=$null

And run a container:

docker run --interactive --name dotfiles --tty --rm dotfiles

To be tested:

docker run --interactive --name dotfiles --tty --rm mcr.microsoft.com/windows/nanoserver:ltsc2022 powershell

4. Browser

I am still figuring out a way to install these extensions programmatically.

5. Visual Studio Code

About

Personal dotfiles managed with chezmoi and doppler.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors