3 KiB
Getting started
The Python requirements are all in requirements.txt
, so before starting you need to issue the following command:
$ pip install -r requirements.txt --user
without using sudo. Using sudo with pip is a bad idea because it will interfere with your distribution's package manager.
If you're on a fresh install, you won't have pip
installed, so you'll need:
$ sudo pacman -S python-pip
or
$ sudo apt install python3-pip
The authentication details are stored in secrets
. Therefore, you have a template secrets.template
that you need to copy and rename:
$ cp secrets{.template,}
Modify the resulting file, and then run ./install.py
with needed flags (./install.py -h
is your friend).
About the files in the repo
-
borg_backup.sh
Borg backup script. Used by a pacman hook to backup my system, but it can also be run manually. -
configs.yml
Lists the things to install, which includes programs, symlinks, git clones, shell commands... -
dotfiles/
The actual dotfiles. They are symlinked to the location that the system expects to find them. -
firefox_addons.txt
I like to install my Firefox add-ons manually in the Firefox add-on manager, so this file just reminds me what to install and includes the urls to each add-on. -
install.py
Installs everything usingconfigs.yml
. This is the file to actually run. -
rsync_backup.sh
rsync backup script. Used by a systemd timer to backup my system, but it can also be run manually. -
secrets.template
Contains environment variables for authentication and personnalization. Use it to create a file namedsecrets
. -
shellcheck_binary_fix.sh
When running this on ARM, pacman there was no shellcheck package, so this script installs the pre-compiled binary instead. If your package manager finds shellcheck, this script won't run. -
todo
Never seems to remain empty...
YML commands
configs.yml
contains instructions as keys, which trigger commands.
Here is a brief explanation of the implemented commands:
-
clone
Perform agit clone
. With-f
, remove and clone. With-u
, perform agit pull
. Branch can also be specified. -
copy
Copy a file. With-f
, overwrite existing. -
download
Download a file with a URL. With-f
, overwrite existing. -
install
Use the package manager to install a package. Specific packages for Debian-based or Arch-based distros can be set. -
include
Include another config file (also yml). -
run
Pass a line of text to a subshell. A condition can be added to launch the command. -
depend
Install another part of the config file before. -
symlink
Make a symlink. -
symlink_dir
Make a symlink to a directory. -
append
Append text to the end of a file. Will only append if the content isn't already in the file. -
write
Write text to a file, overwriting if it exists.
Thanks
The idea for the architecture was taken from Dimitri Merejkowsky's GitHub.