Giter Club home page Giter Club logo

dotfiles's Introduction

dotfiles

GitHub branch checks state GitHub Repo stars GitHub

Ansible-based dotfile setup for macOS systems that is really simple and easy to understand.

iTerm Visual Studio Code

Features

  • Dotfile wrapper based on Ansible, that takes care of...
    • bash/zsh configuration files
    • Homebrew and Cask packages
    • Mac App Store apps
    • Node npm packages
    • Ruby gem packages
    • Python pip packages
    • macOS defaults (plist settings)
  • Docker host cleanup/prune
  • Vundle VIm plugin manager
  • Fish-like auto autosuggestions in ZSH (zsh-autosuggestions plugin)
  • Several additional, preconfigured ZSH plugins (using zplug):
  • Configured GnuPG including gpg-agent and enabled commit signatures in git
  • One Dark Pro themes for iTerm and VSCode (even though VSCode is currently controlled by the built-in sync)
  • Commented code, so you know what is actually going on (Not anymore, to be honest...)

Installation

  1. Make sure to uprade Pip Homebrew before installing Ansible:

    sudo pip3 install --upgrade pip
    pip3 install ansible
  2. Fork this repository:

    git clone https://github.com/frdmn/dotfiles ~/.dotfiles
  3. Copy and adjust the default configuration file:

    cp ~/.dotfiles/config.defaults.yml ~/.dotfiles/config.yml
    vi ~/.dotfiles/config.yml
  4. Run the dotfile wrapper with the --bootstrap switch to initially install and setup the dotfiles and its components:

    ~/.dotfiles/dotfiles --bootstrap

Available commands

# (Re-)apply dotfile related tasks
$ dotfiles

# (Re-)apply dotfile and bootstrap related tasks (by default only "dotfiles" will be execated when not specifying --botstrap)
$ dotfiles --bootstrap

# Apply a specific tag/task
$ dotfiles <tag>

Information

Explanation of the directories:

./files/
└── This directory contains all optional files that are not related to
    Ansible roles in specific. For example: dotfile source files, iTerm
    configuration files, etc.

./files/dotfiles/
└── This folder contains all the source dotfiles.

./files/iterm2/
└── This folder contains the iTerm 2 plist configuration.

./roles/
└── In this directory you will find all available Ansible roles that I
    currently use within this project.

./roles/{rolename}/tasks/main.yml
└── This is the actual Ansible tasks that uses the variable (defaults)
    file and proceeds with the role specific function.

./ansible.cfg
└── Ansible configuration file that is applied when executing the
    dotfile wrapper / playbook.

./config.defaults.yml
└── This file contains variables to work with in the actual Ansible
    tasks like package names/lists, configuration options, etc.

./config.yml
└── This (optional) file can be used to override the defaults (above)
    as as desired, not tracked by git.

./dotfiles
└── Basically the base wrapper that I use to install and update the
    dotfiles as well as interact with the `ansible-playbook` command.

./dotfiles.yml
└── The main Ansible playbook.

./hosts
└── The inventory file for Ansible, for now it only contains the
    localhost machine

./requirements.yml
└── Ansible role and collection dependencies which are somehow in use by
    this playbook.

License

MIT

Version

2.0

dotfiles's People

Contributors

frdmn avatar rnarian 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

Watchers

 avatar  avatar  avatar

dotfiles's Issues

Bash setup!

I don't really use bash at the moment so it's not that incentive for me to work on this 😁

Dedicated folder for tab completions

I don't like the current use of the configs/zsh/functions/ folder which only contains tab completion files

Maybe also make sure tab completions exist for Bash and ZSH.

missing: cask virtualbox4330101610

[...]
ok: cask vagrant-manager
ok: cask virtualbox
missing: cask virtualbox4330101610
Warning: A Cask for virtualbox4330101610 (!) is already installed. Add the "--force" option to force re-install.
verifying : cask virtualbox4330101610
*  failed
missing
brew-cask provides a friendly homebrew-style CLI workflow for the
administration of Mac applications distributed as binaries.

Commands:

    audit      verifies installability of Casks
    cat        dump raw source of the given Cask to the standard output
    cleanup    cleans up cached downloads and tracker symlinks
    create     creates the given Cask and opens it in an editor
    doctor     checks for configuration issues
    edit       edits the given Cask
    fetch      downloads remote application files to local cache
    home       opens the homepage of the given Cask
    info       displays information about the given Cask
    install    installs the given Cask
    list       with no args, lists installed Casks; given installed Casks, lists staged files
    search     searches all known Casks
    uninstall  uninstalls the given Cask
    update     a synonym for 'brew update'
    zap        zaps all files associated with the given Cask

See also "man brew-cask"
ok: cask vlc
ok: cask wireshark
[...]

CI: test Docker installation and Ansible role usage once again

Currently disabled because I couldn't get Docker setup working on the macos GitHub Actions infrastructure...

- name: Remove Docker from brew role defaults
run: sed -ie '/docker/d' ./roles/brew/defaults/main.yml

run: ansible-playbook dotfiles.yml --skip-tags "mas,docker" --syntax-check

run: ansible-playbook dotfiles.yml --skip-tags "mas,docker"

ansible-playbook dotfiles.yml --skip-tags "mas,docker" | tee -a ${idempotence}

ansible: check if tag exists before running

~ ❯ dotfiles doesntexist
Executing playbook dotfiles.yml

- Set up local workstation on hosts: local -
Gathering Facts...
  localhost ok

- Play recap -
  localhost                  : ok=1    changed=0    unreachable=0    failed=0    rescued=0    ignored=0

NPM package processing fails each time

npm ERR! extraneous: [email protected] /Users/jonas/.npm-packages/lib/node_modules/generator-frdmn-bootstrap/node_modules/mocha
npm ERR! addLocal Could not install /private/var/folders/w8/7kxbcq6d5k57r18y0sbsbmfr0000gn/T/npm.5087/package
ok: npm npm
npm ERR! extraneous: [email protected] /Users/jonas/.npm-packages/lib/node_modules/generator-frdmn-bootstrap/node_modules/mocha
npm ERR! addLocal Could not install /private/var/folders/w8/7kxbcq6d5k57r18y0sbsbmfr0000gn/T/npm.5087/package
ok: npm bower
npm ERR! extraneous: [email protected] /Users/jonas/.npm-packages/lib/node_modules/generator-frdmn-bootstrap/node_modules/mocha
npm ERR! addLocal Could not install /private/var/folders/w8/7kxbcq6d5k57r18y0sbsbmfr0000gn/T/npm.5087/package
ok: npm common-readme
npm ERR! extraneous: [email protected] /Users/jonas/.npm-packages/lib/node_modules/generator-frdmn-bootstrap/node_modules/mocha
npm ERR! addLocal Could not install /private/var/folders/w8/7kxbcq6d5k57r18y0sbsbmfr0000gn/T/npm.5087/package
ok: npm diff-so-fancy
npm ERR! extraneous: [email protected] /Users/jonas/.npm-packages/lib/node_modules/generator-frdmn-bootstrap/node_modules/mocha
npm ERR! addLocal Could not install /private/var/folders/w8/7kxbcq6d5k57r18y0sbsbmfr0000gn/T/npm.5087/package
outdated: npm gifify

ansible: certain tasks always end up with "changed" state

[dotfiles] Get list of files to symlink...
  localhost done
[dotfiles] Store list of files into variable...
  localhost done | stdout: ansible.cfg
gitconfig
gitignore
hushlogin
jshintrc
tmux.conf
vimrc
zsh_aliases
zsh_functions
zshenv
zshrc

[...]

[dotfiles] Download git-shift and set executable bit...
  localhost done | msg: OK (13368 bytes)
[dotfiles] Add commit-signage for git-shift...
  localhost done | msg: 1 replacements made
[dotfiles] Download Vundle (vi bundle manager)...
  localhost done
[dotfiles] Setup and install Vundle...
  localhost done

[...]

[bootstrap] Create file to indicate successful bootstrap...
  localhost done
- Play recap -
  localhost                  : ok=36   changed=7    unreachable=0    failed=0    rescued=0    ignored=0

full-log.txt

zsh: $PATH not complete in new shell window compared to manual invoked shell

~ ❯ echo $PATH
/opt/homebrew/Cellar/zplug/2.4.2/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Wireshark.app/Contents/MacOS:/Users/jonas/Library/Python/3.8/bin:/opt/homebrew/bin:/opt/homebrew/sbin

~ ❯ zsh

~ ❯ echo $PATH
/opt/homebrew/Cellar/zplug/2.4.2/bin:/opt/homebrew/opt/zplug/bin:/Users/jonas/Library/Python/3.8/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Wireshark.app/Contents/MacOS

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.