My framework for my configuration/dot files.
- Install Nix
- Make sure these programs are installed:
- Zsh
- GnuPG
- xclip (optional?)
- git
- Ex:
sudo apt install zsh gnupg xclip git
- Create a
/data
directory (TODO: Ability to have it somewhere else?)sudo mkdir /data
sudo chown $USER:$USER /data
- Place/clone this repository at
/data/configuration
.git clone https://github.com/iguessthislldo/configuration
nix-env -if default.nix
(TODO: use better way to do this)git submodule init && git submodule update
bash install_data.sh
to do the initial setup, clearing existing default stuff in the home directory and repeating the command as necessary until it's able to finish.- Set Zsh as the default shell, for example:
chsh -s /usr/bin/zsh
- At this point now or later we can either run
zsh
manually or relogin to have it take its place as the default shell. - If copying from an existing
/data
on a source system:- To copy files using SSH:
- Make sure an SSH server is installed and running on the source system.
- Run
bash install_data.sh import HOST
whereHOST
on the destination system.
- To copy files manually:
- Run
bash install_data.sh export
on the source system. - Copy
/data/configuration/export.txz
to/data/export.txz
on the destination system. - Run
bash install_data.sh import
on destination system.
- Run
bash install_data.sh
one final time to have it take up the imported files.
- To copy files using SSH:
- Set terminal font if desired.
- Run
(cd ~/cfg/git && bash setup.sh)
to setup Git. - Run scripts in
misc-setup
as needed.
data
: Used for$DATA
, Linked as$HOME\dat
configuration
: Used for$CONFIG
, Linked as$HOME/cfg
install_data.sh
sh
bin
fonts
ssh
vim
git
tmux
vim
gnupg
This doesn't include sh/rc.d/50_aliases.sh
or aliases added by oh-my-zsh in
sh/rc.d/00_oh-my-zsh.zsh
.
Usage: u [COUNT]
Move up COUNT number of directories, like cd (../)*COUNT
. COUNT is 1 by
default.
Usage: e [ARGS...]
Python script that passes arguments through to $EDITOR
.
If the $EDITOR
has vi
in the name, then it assumes it's vi-compatible and
will change arguments of the form FILENAME:NUMBER
to FILENAME +NUMBER
.
Set predefined git commit identity information for a repository.
See gitid -h
for usage.
TODO: Info on how to setup identities
Create copies of a template directory, optionally automatically replacing macros and executing scripts.
See new -h
for usage.
TODO: More info, like how to setup templates
Usage: makej [ARGS...]
Run make
with ARGS
, but also pass -j
and the number of CPU cores plus 1.
Command checks the current directory and all of its parents for setenv.sh
,
and starts an instance of the current shell with that setenv.sh
sourced.
Command checks the current directory and all of its parents for a Python virtualenv, and starts an instance of the current shell with that virtualenv activated.
Recursively check the current directory and all of its parents for a file with an execute permission on it and executes it.
Usage: args [ARGS...]
Simple python script that lists the arguments it was passed. Use to see how the shell is passing arguments to a program.
Usage: h DAYS
Print the shell history for the given number of days ago, which can be 0 for today.
NOTE: Only works with zsh