Coder Social home page Coder Social logo

ribugent / dotfiles Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 428 KB

Gerard Ribugent - Dotfiles

License: GNU General Public License v3.0

Shell 81.85% Ruby 18.15%
arch-linux chezmoi dotfiles fish git linux oh-my-fish pass gradle jenv plenv pyenv yay

dotfiles's Introduction

Gerard Ribugent - Dotfiles

There's no place like ๐Ÿก

This repository contains all the dotfiles I use on my work computer, which currently supports Arch Linux and macOS

All the files are managed using chezmoi, but the secrets and sensitive information are stored using pass

Prerequisites

Bootstrapping

  1. Install needed software

  2. Import my gpg keys

  3. Clone password store

    [email protected]:ribugent/$SECRETS.git ~/.password-store
  4. Create ~/.config/chezmoi/chezmoi.toml and fill it with the information

    [diff]
    command = "delta"
    args = ["--pager=never"]
    
    [data.git]
    name = "<your name>"
    
    [data.git.work]
    email = "<work email>"
    signkey = "<work gpg sign key>"
    remotePrefix = "<work git remote prefix>"
    
    [data.git.personal]
    email = "<personal email>"
    signkey = "<personal gpg sign key>"
    remotePrefix = "<personal git remote prefix>"
    
    [date.noisetorch]
    device_unit = "<microphone device unit>"
    device_name = "<microphone device name>"
  5. Finally apply

    chezmoi init --apply [email protected]:ribugent/dotfiles.git

Included configuration

Fish shell

Drop-in files for $PATH management:

Set some default env variables in order to:

  • (Linux only) Disable ugly GTK+ options
  • (Linux only) Default(terminal) editor to vim
  • (Linux only) Set $BROWSER to use xdg-open
  • Enable colors on man pages
  • Aliases

Currently, I'm using oh-my-fish. The repo includes:

  • Installs it automatically
  • Trigger install when the packages list is updated
  • Sets my favorite theme

Git

  • Setups globally my work information
  • Setup specific dirs to use my personal information
  • Enables company git hooks software only in specific dir
  • Enables verbose doing commits
  • Customize diff tool
  • Customize colours
  • main as a default branch on init
  • Use gitdelta as (terminal) diff viewer
  • Use git-interactive-rebase-tool as interactive rebase tool

GnuPG

Set pinentry-qt as the default pinentry program in Linux and set $GPG_TTY environment variable to allow pinentry-curses working in macOS.

Gradle

Disable ram consuming gradle daemon... I have 16GB of RAM, but it's not enough sometimes.

Jenv

โ„น๏ธ Linux Only

Automatically register and refresh jdk versions using systemd user units

Ssh

Basic ssh configuration with known hosts and rendering work sensitive hosts from the secret store using a template.

Arch Linux system

โ„น๏ธ Arch Linux Only

Installing automatically packages and optional package dependencies using yay, the lists can be found in [1] and [2].

Some drop-in configuration system files are installed using makepkg:

  • SDDM
    • Enable HiDPI in Wayland
    • Disable listening tcp connections in xorg
    • Plasma Desktop settings
  • Kernel parameters
    • Hardening
      • Restrict dmesg to root only
      • Disable kexec syscall
      • Restrict pointers in proc filesystem
    • Set swappiness to 20
  • Reflector: Options for selecting the mirrors
  • Faillock: block accounts after 5 consecutive authentication failures
  • Systemd resolved
    • Disables default DNS servers
    • Enable stub listener to be integrated with Docker (this solve issues DNS resolutions with custom domains on VPN connections)
  • xorg: Enforce 1080p resolution on my Dell XPS 13 laptop with 4k screen

macOS system

โ„น๏ธ macOS Only

  • Installing automatically packages from a Brewfile
  • GNU coreutils and recent version of curl in $PATH
  • Fix keybindings for Home/End keys using a regular keyboard
  • Quarantine bit auto-removal from few specific apps
  • Setup qtpass to find out git and gpg utlities from brew
  • Enable uptimed and locate services
  • Enable fingerprint for sudo

ClamAV

โ„น๏ธ Linux Only

  • Installs ClamAV
  • Enables update signatures services
  • Tune up the daemon configuration
  • Set up daily scanning and reporting via notification

Firewalld

โ„น๏ธ Linux Only

Enable the firewalld by default, and integrate the docker interface to the specified zone.

Yakuake

โ„น๏ธ Linux Only

Set up dropdown terminal with Fira Code nerdfonts

iTerm2

โ„น๏ธ macOS Only

Set up dropdown terminal with Fira Code nerdfonts

Yay

โ„น๏ธ Linux Only

Setup system java, perl and python versions to avoid issues when building packages. Third-party account settings

Third-party services setup

  • Increase AWS S3 concurrent requests
  • Docker registries
  • npm private registry
  • Databricks service

Password store structure

For those who want to reuse these dotfiles, this requires the following structure:

Password Store
โ”œโ”€โ”€ aws
โ”‚ย ย  โ”œโ”€โ”€ accountId -> password
โ”‚ย ย  โ””โ”€โ”€ region    -> password
โ”œโ”€โ”€ databricks
โ”‚ย ย  โ”œโ”€โ”€ prod    -> password(api key), fields(host)
โ”‚ย ย  โ””โ”€โ”€ staging -> password(api key), fields(host)
โ”œโ”€โ”€ docker
โ”‚ย ย  โ”œโ”€โ”€ dockerRegistry -> password(token)
โ”‚ย ย  โ””โ”€โ”€ githubRegistry -> password(token)
โ”œโ”€โ”€ npm
โ”‚ย ย  โ””โ”€โ”€ github -> password(token)
โ””โ”€โ”€ ssh
    โ”œโ”€โ”€ hosts -> raw(json array equivalent of ssh regular config, see how is rendered in .chezmoitemplates/ssh_config_host )
    โ””โ”€โ”€ keys
        โ”œโ”€โ”€ arch-aur -> raw(ssh key)
        โ”œโ”€โ”€ github   -> raw(ssh key)
        โ””โ”€โ”€ work     -> raw(ssh key)

Every entry details how is stored the info, as password, password with fields or just raw; in brackets some clarifications are specified.

dotfiles's People

Contributors

ribugent avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.