Home config program for linuxboxes
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Whit Huntley 52a3d8d102
fixed table, not final
3 months ago
dfc created the init.sh script 3 months ago
LICENSE Not sure if this is legal but oh well 3 months ago
README.md fixed table, not final 3 months ago
init.sh created the init.sh script 3 months ago

README.md

dotfiles

Easily customizable user config tool for linuxboxes.


About

Pilfer this repo!

This repo contains all the config I use to get my machines working, it is never complete and may have bugs but I greatly encourage you to steal some ideas from here with that in mind.

It is my personal philosophy that nobody has written their own config, but simply modified someone else's; mutating down and down the generations. This itself is largely inspired by rwxrob's dotfiles and I would be honored if someone based theirs on mine. I hope this is useful to someone.

dotfiles is my home configuration tool for all the Linux machines I use. It provides various degrees of customization ranging from remote servers in which I only have to install a few packages and keys to setting up the brunt of my main workstation. It has been designed to be run on a wide away of Linux distros and has been designed to be more future-proof and resiliant so as not to require as freqent bodging as my previous home config tool.

To start, simply fetch and run the init.sh; this will run the necessary checks to setup a minimal environment for dfc (or dotfiles controller) to be run.

Usage

First setup

The absolute bare-minimum environment to start the process is an internet connection, a POSIX compliant shell, and curl. A version of init.sh is required as well. Simply run the following command:

curl https://git.dotfile.sh/colm/dotfiles/raw/branch/master/init.sh | sh

This will install dfc for the current user. Note that installing the program for root is disabled by default and will cause the program to exit with code 240. To override this, set the environment variable force_root_install to true.

Once this is done, a new dfc command will be installed in ~/.local/bin (created if doesn't exist), the config files will be placed in ~/.local/share/dotfiles (also created if it doesn't already exist) and appropriate updates will be made to ~/.profile or ~/.bash_profile to add it to $PATH.

dfc

Variable Possible Values Default Description
dotfiles_repo any HTTP git repo https://git.dotfile.sh/colm/dotfiles Sets the dotfile repo, this is my thing but if you make a fork of it make sure to change the dotfiles_repo variable.
install_env true, false true Installs the packages necessary to run dfc. These are: git, and sudo; golang will also be installed if dfc_source is set to local. If set to false the system will list missing packages and exit with return code 240.
additional_packages packages in the systems package manager None Additional packages to be instaled. Note that dfc is also configured to install packages, this is in case there are some lower level packages not installed.
add_user_sudo true, false true Adds the user dfc_user to the
sudoers group if they aren't already.

Once this is done, a new dfc command will be installed in ~/.local/bin (created if doesn't exist), the config files will be placed in ~/.local/share/dotfiles (also created if it doesn't already exist) and appropriate updates will be made to ~/.profile or ~/.bash_profile to add it to $PATH.

dfc

the dotfiles controller program is responsible for the actual heavy lifting. Once a minimal environment has been setup for it then it can take over. dfc --help provides a list of commands and dfc --help "${option}" will provide further documentation still. Documentation has been listed below:

init

init varies according to config, this is how I have configured it.

init runs a series of dfc commands as outlined in initlevels.json.

Usage: dfc --init ${level}

  • minimal
    • installs SSH authorized_keys
    • attempts to install vim
    • appends ipv6 to ssh config
      • if no ipv6 address is available, adds ipv4 to ssh config
  • server
    • installs SSH authorized_keys
    • attempts to install vim, bash, python3, go, npm, tmux,
    • appends server ipv6 to ssh config
      • if no ipv6 address is available, adds ipv4 to ssh config
    • installs bashrc
    • installs vimrc
    • installs further user commands
  • desktop
    • installs SSH authorized_keys
    • attempts to install vim, bash, xclip,
  • full

EOF