Coder Social home page Coder Social logo

marcus-crane / dotfiles Goto Github PK

View Code? Open in Web Editor NEW
30.0 3.0 0.0 3.12 MB

My dotfiles

Home Page: https://dotfiles.utf9k.net

License: MIT License

Shell 40.48% Python 0.29% Emacs Lisp 29.53% Perl 8.28% Lua 17.35% TypeScript 4.08%
dotfiles zsh literate-configuration chezmoi templates shellcheck github-actions gnupg ssh git

dotfiles's Introduction

dotfiles

View my dotfiles in literate form at dotfiles.utf9k.net

This repository contains my dotfiles which are shared between my home and work machines which consist of both macOS and Linux devices.

I have more macOS devices than Linux but I aspire to keep the installation as seamless as possible between the two.

In saying that, this repository definitely has some sharp edges so while you're welcome to take whatever from it, do note that there are no guarantees of anything working or being easy to use.

Chezmoi is my dotfile manager which both manages files as well as runs some pre and post-installation scripts to install dependencies, programming languages and libraries that I use day to day.

I have a wonky (read: gross) language manager abstraction visible in .chezmoidata.yaml which selectively installs different language runtimes depending on whether the machine is used for home or work.

Currently I use mise to manage languages and previously used asdf for quite a few years.

My shell of choice is zsh, with oh-my-zsh although from time to time I flip between OMZ and raw zsh as I don't really use many features from it.

Installation

On a fresh machine, it's supposed to be possible to both install chezmoi and my dotfiles in one go like so:

sh -c "$(curl -fsLS get.chezmoi.io)" -- init --apply marcus-crane

I say supposed to because I don't set up machines from scratch very often, and each time I do, there's usually some bootstrapping problem like hard references to chezmoi that don't resolve, because it isn't installed yet where my shell scripts expect it to be.

As mentioned, there's no guarantee that this repo will be easy to set up, as it's not intended for others to be running day to day.

A note on tangling files

You may notice that some configuration files are seemingly missing with .md files in their place.

This is because a few, and in time most of, my config files are kept as "literate configuration".

In short, all of the surrounding commentary is stripped and the correct file is generated off of the source code blocks.

In order to "tangle" them into a proper config, I use lugh, a hacky custom made tool for tangling markdown that I made one day to play with crystal. It's just sort of stuck around so I haven't had any reason to deprecate it but there are probably better tool for this sort of thing.

I have used Emacs org-tangle for this job and it's nice but it's also quite a bit of overhead to get it running. Generally on a new machine, compiling Emacs can take quite some time.

Anyway, lugh should be installed automatically as part of the initial chezmoi apply so with that, you can "tangle" the file you're interested in like so:

lugh -f <file>

A working example would be:

lugh -f zshrc.md
# Wrote /Users/marcus/.local/share/chezmoi/dot_zshrc.tmpl

Instead of anything fancy, I just "tangle" the contents into a file that chezmoi expects and since it's a .tmpl file, it can also make use of chezmoi's built in variables.

Extras to be manually installed

dotfiles's People

Contributors

marcus-crane avatar renovate-bot avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

dotfiles's Issues

Set up a pre-preinstall script

There are some prerequisites that need to happen before chezmoi init can be done, such as installing Homebrew, wget, XCode command tools

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

This repository currently has no open or pending branches.

Detected dependencies

bun
package.json
  • vitepress ^1.0.0-rc.45
  • typescript ^5.0.0
github-actions
.github/workflows/deploy.yml
  • actions/checkout v4
  • oven-sh/setup-bun v1
  • cloudflare/pages-action v1
  • mshick/add-pr-comment v2
  • ubuntu 22.04
.github/workflows/shellcheck.yml
  • actions/checkout v4

  • Check this box to trigger a request for Renovate to run again on this repository

Suggestion: use `onepasswordDocument` to simplify `~/.ssh/config`

Hi, I saw your tweet about using 1Password and specifically these lines:

https://github.com/marcus-crane/dotfiles/blob/main/dot_ssh/config.tmpl#L12-L16

chezmoi has a onepasswordDocument template function which I use and might allow you to simplify your code. In my case, I keep my work-specific SSH config in a 1Password Document and insert it into ~/.ssh/config directly.

Hope this helps, and of course close the issue if it's not relevant.

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.