Riyyi
b10711686f
|
3 years ago | |
---|---|---|
cmake | 3 years ago | |
doc | 3 years ago | |
src | 3 years ago | |
test | 3 years ago | |
.clang-format | 3 years ago | |
.gitignore | 3 years ago | |
CMakeLists.txt | 3 years ago | |
LICENSE | 3 years ago | |
README.org | 3 years ago | |
compile_commands.json | 3 years ago |
README.org
Manafiles
Config file and package tracking utility.
- Manage dotfiles and system config files.
- Selectively comment and uncomment depending on machine configuration.
- Store a list of all installed packages.
- Install packages from a stored list.
Getting started
Installation
If you are using Arch Linux, you can install the AUR package manafiles-git.
Alternatively, you will have to build from source.
Configuration
Install the example configuration
During installation, manafiles will install the example config to:
/usr/share/doc/manafiles/examples/manafiles.json
From there you can copy it to anywhere in the working directory,
the config file is searched recursively.
$HOME/<dotfiles>/<anywhere>
Exclude paths
Everything in this list will get excluded when pushing config files from the working directory to the system.
Currently three types of file matching are supported:
file
full name of the file matchesdirectory
full name of the directory matchesendsWith
end of the path matches
The excluded paths from the example config:
"excludePaths" : {
".git": "directory",
".md": "endsWith",
"packages": "file",
"README.org": "endsWith",
"screenshot.png": "file"
}
System config files
Directories in this list will be pushed to the root /
of the system, instead of $HOME
.
The system directories from the example config:
"systemDirectories": [
"/boot",
"/etc",
"/usr/share"
]
Usage
Selectively comment and uncomment
Config files can be pushed from the working directory to the system like so:
$ manafiles -Fs
When pushing files to the system, manafiles recognizes special blocks and comments or uncomments them depending on the machine's configuration. Such a block looks like this:
# >>> distro=arch hostname=arch-desktop user=anon
export PATH="$PATH:$HOME/.local/bin"
# <<<
This block uses all of the supported configurations, distro
, hostname
and
user
. These can be used in any combination and order.
If all of the given configurations match, manafiles will make sure that the contents of the block are uncommented. If any of them do not match, then manafiles will make sure that the contents of the block are commented.
Building
Build dependencies
Build compilation
$ mkdir build
$ cd build
$ cmake ..
$ make
Build installation
$ sudo make install