Adds Malachite config
parent
bd03668597
commit
9c67a4204a
@ -0,0 +1,51 @@
|
||||
---
|
||||
title: Getting Started With Malachite
|
||||
weight: 20
|
||||
---
|
||||
|
||||
Baby's first Malachite repository!
|
||||
|
||||
### What you need to know
|
||||
|
||||
Malachite is:
|
||||
- A pacman repository manager
|
||||
- A workspace manager
|
||||
- ~~Awesome~~
|
||||
|
||||
Malachite isn't:
|
||||
- The end-all solution for all pacman repositories
|
||||
- Perfect
|
||||
|
||||
|
||||
### With that out of the way
|
||||
|
||||
Hi! My name is Michal, and I wrote this tool pretty much on my own for [Crystal Linux](https://getcryst.al);
|
||||
but it is not at all exclusive to Crystal. This tool should and will work on and for any pacman-based
|
||||
distribution (so long as it packages all of Malachite's dependencies, of course).
|
||||
|
||||
Throughout this tutorial, I'll explain each little feature of Malachite in what I hope to be bite-sized and
|
||||
programmatic chunks.
|
||||
|
||||
Without further ado, let's begin with the first, most important question:
|
||||
|
||||
|
||||
### Modes
|
||||
|
||||
What mode are you using malachite in?
|
||||
|
||||
Currently, malachite supports 2 modes:
|
||||
|
||||
#### Repository Mode
|
||||
- Allows the user to configure and manage a remote (or local) pacman-based package repository
|
||||
- Allows for customisability in repository name, signing preferences, signing key etc.
|
||||
- Allows for basic levels of automation, by using features such as build_on_update
|
||||
|
||||
#### Workspace Mode
|
||||
- The most basic functionality of Malachite
|
||||
- Just clones git directories into a "Workspace" directory for easier management
|
||||
- Allows for basic pulling operations to keep your repositories up-to-date
|
||||
|
||||
These modes essentially dictate everything about how Malachite functions, so much so that I now need to
|
||||
split this page off before it gets too long!
|
||||
|
||||
For more info, get started with the [Common Features](common-features) page!
|
@ -0,0 +1,44 @@
|
||||
---
|
||||
title: Repository Mode
|
||||
---
|
||||
|
||||
PacManage your repositories in style!
|
||||
|
||||
### Repository Config
|
||||
|
||||
As opposed to the rather barren Workspace mode, the Repository mode config is rather fleshed out;
|
||||
and we have a few options to choose from.
|
||||
|
||||
Let's take an example section from a Repository mode config,
|
||||
|
||||
```toml
|
||||
[mode.repository]
|
||||
name = "example"
|
||||
build_on_update = true
|
||||
|
||||
[mode.repository.signing]
|
||||
enabled = true
|
||||
key = "you@example.org"
|
||||
on_gen = true
|
||||
```
|
||||
|
||||
### Basic Repository Config
|
||||
|
||||
To start with, there are 2 main config keys to Repository mode:
|
||||
- `name`: Defines what pacman calls your repository.
|
||||
- `build_on_update`: In conjunction with `smart_pull`, defines whether to rebuild packages automatically when an update is detected.
|
||||
|
||||
### Signing
|
||||
|
||||
Malachite also supports, and encourages, the signing of packages.
|
||||
GPG Signing packages ensures that the user receives exactly what you packaged, without any chance of tampering.
|
||||
|
||||
Calling back to the example above, we can see 3 config keys:
|
||||
|
||||
- `enabled`: Defines whether to sign packages (heavily encouraged).
|
||||
- `key`: Defines the GPG key ID to use for signing.
|
||||
- `on_gen`: Defines whether to sign packages when they are built, or all at once on repository generation (this is also recommended).
|
||||
|
||||
---
|
||||
|
||||
You can return to [Getting Started](getting-started) page here!
|
@ -0,0 +1,34 @@
|
||||
---
|
||||
title: Workspace Mode
|
||||
---
|
||||
|
||||
You'll never have to work(space) another day in your life!
|
||||
|
||||
### Workspace Config
|
||||
|
||||
Taking an example section from the Workspace mode config,
|
||||
|
||||
```toml
|
||||
[mode.workspace]
|
||||
git_info = true
|
||||
colorblind = true
|
||||
```
|
||||
|
||||
Currently, Workspace mode only has 2 options, both pertaining to the display of information. (`mlc info`)
|
||||
|
||||
The first key is `git_info`, which is a boolean value. If it is true, the git information will be displayed alongside repository information.
|
||||
|
||||
This information will be formatted as so: `D Pl Ps <Latest Commit Hash>`
|
||||
|
||||
The key for the values is as follows:
|
||||
- D: Whether the repository is dirty or not (unstaged changes)
|
||||
- Pl: Whether there are unpulled changes at the remote
|
||||
- Ps: Whether there are unpushed changes in your local repository
|
||||
|
||||
These will be typically displayed in either Green (Clean) or Red (Dirty)
|
||||
|
||||
However, if `colorblind` is set to true, the colors will instead be set to Blue (Clean) or Dark Red (Dirty), to be more discernible to colorblind users.
|
||||
|
||||
---
|
||||
|
||||
You can return to [Getting Started](getting-started) page here!
|
Loading…
Reference in New Issue