An open API service indexing awesome lists of open source software.

https://github.com/wdenton/conforguration

Moved to Codeberg
https://github.com/wdenton/conforguration

codeberg

Last synced: 4 months ago
JSON representation

Moved to Codeberg

Awesome Lists containing this project

README

          

#+TITLE: Conforguration README
#+AUTHOR: William Denton
#+EMAIL: william@williamdenton.org

* Conforguration

Use the power of [[http://orgmode.org/][Org]] to manage accounts and install software the way I like it done.

Conforguration contains:

+ all my non-private "dot files" ([[https://en.wikipedia.org/wiki/Run_commands][run command files]], containing configuration instructions for different programs)
+ scripts to install (from source) Emacs, R, Ruby and Tor

The dot files and scripts can be used locally and on remote machines. It is easy to push everything from the local machine to a remote one from this Org file.

I made this to suit my tastes and work the way I want. There may be some things in my dot files that you like, in which case you're free to copy them, but watch out! This is not meant for widespread general use!

* How does it work?

Everything is in [[file:conforguration.org][conforguration.org]]. Tangling that file (by running =M-x org-babel-tangle= or =C-c C-v t=) will generate all of the dot files and scripts.

Installing Conforguration locally copies files into =~/conforg/=:

+ dot files to =~/conforg/dotfiles/=
+ scripts to =~/conforg/scripts/=

The same files can easily be pushed to remote machines.

There are two types of dot files: "mine" (most of them) or "imported" (a few copied verbatim from elsewhere). Symbolic links are made from $HOME to =~/conforg/dotfiles/=.

The scripts can be run locally or on remote machines. For either local or remote installations or updates, you can use =C-c C-c= on the shell blocks to execute them or you can run the scripts at the command line on the given machine. (If it takes twenty minutes to compile something on a remote machine, you might find it easier to run that script over there instead of from inside Emacs here.)

* Usage

Assume Conforguration will be in =~/src/conforguration/=.

** Requirements

This all assumes your shell is [[https://www.gnu.org/software/bash/][Bash]].

All that is needed to get it is Git. On a Debian, Ubuntu or related system, run this:

#+begin_src shell :eval no
sudo apt install git rsync
#+end_src

** Installation

First, get Conforguration. To clone it with your Git account, run this:

#+BEGIN_SRC shell
git clone git@github.com:wdenton/conforguration.git ~/src/conforguration/
#+END_SRC

Or if you don't want to use a GitHub account:

#+BEGIN_SRC shell
git clone https://github.com/wdenton/conforguration.git ~/src/conforguration/
#+END_SRC

Set up =/usr/local/src/= and =~/conforg/=. This is only necessary once.

#+BEGIN_SRC shell
~/src/conforguration/conforg/scripts/initialize.sh
#+END_SRC

Install the dot files and scripts in =~/conforg/=, and refresh bash to see the effects.

#+BEGIN_SRC shell
~/src/conforguration/install/install.sh
source ~/.bashrc
#+END_SRC

Now you're running under Conforguration!

** Installing Emacs

This installs [[https://www.gnu.org/software/emacs/][Emacs]] and [[https://orgmode.org/][Org]] from source.

For this to work in Ubuntu you'll need to have enabled source code repositories for packages in the APT configuration. You can do this with the GUI Software Updater tool (in the Ubuntu Software tab, enable the source code option) or in a shell (edit =/etc/apt/sources.list= and uncomment all of the =deb-src= lines). Then update all the packages, for example with =sudo apt update=.

#+BEGIN_SRC shell
~/conforg/scripts/emacs-install-requirements.sh
~/conforg/scripts/emacs-install-personal.sh
#+END_SRC

To get my personal Emacs configuration, run the following. Warning: this will overwrite all sorts of VERY IMPORTANT files, so don't do this unless you're me, or you're on a new bare system and want to try it out.

#+begin_src shell
cd
git clone git@github.com:wdenton/.emacs.d.git
#+end_src

Then run =emacs=. A few dozen packages should be downloaded and installed and when that's done your Emacs will look exactly like mine!

If something goes wrong, you can run everything in =init.el= by hand to install all of the packages. Run ~emacs~ (or ~emacs -nw~ if you can only use a terminal), then type ~C-x C-f ~/.emacs/init.el~ to load the file, then run ~M-x eval-buffer~ to execute everything in it at once. Then quit Emacs and restart it, perhaps twice. Then everything should be good.

Whenever you want to upgrade Emacs and Org (packages need to be upgraded inside Emacs; my ridiculous keystroke for that is =C-x l p U x=), run:

#+begin_src shell
~/conforg/scripts/emacs-update.sh
#+end_src

** Installing R

You can install [[https://www.r-project.org/][R]] for personal use (where it runs out of =/usr/local/src/=) or system-wide. The version number is set in [[file:conforguration.org][conforguration.org]].

#+BEGIN_SRC shell
~/conforg/scripts/r-install-requirements.sh
~/conforg/scripts/r-install-personal.sh
source ~/.bashrc
#+END_SRC

Run =~/conforg/scripts/r-install-system.sh= to install R into =/usr/local/bin/=.

** Installing Ruby

You can install [[https://www.ruby-lang.org/en/][Ruby]] for personal use (where it runs out of =/usr/local/src/=) or system-wide. The version number is set in [[file:conforguration.org][conforguration.org]].

To install a personal version with [[https://github.com/rbenv/rbenv][Rbenv]]:

#+BEGIN_SRC shell
~/conforg/scripts/ruby-install-requirements.sh
~/conforg/scripts/ruby-rbenv.sh
source ~/.bashrc
~/conforg/scripts/ruby-install-personal.sh
#+END_SRC

System-wide:

#+BEGIN_SRC shell
~/conforg/scripts/ruby-install-requirements.sh
~/conforg/scripts/ruby-install-system.sh
#+END_SRC

Whenever you want to upgrade Rbenv, just run the same script again; if Rbenv is installed it will now upgrade it.

#+BEGIN_SRC shell
~/conforg/scripts/ruby-rbenv.sh
#+END_SRC

* Why?

Because [[https://www.ansible.com/][Ansible]] and similar configuration management tools aren't done in Org.

* What next?

I don't know, but if you're interested, have at it.

There are a lot of dot files in [[https://github.com/webpro/awesome-dotfiles][awesome-dotfiles]], and it seems [[https://github.com/aldrichtr/tangld][tangld]] is a similar project to this. There will be things to be learned from any related projects.

* License

GPL v3. See COPYING for details.