Skip to content

Commit

Permalink
docs: improve the config file location docs to be per platform
Browse files Browse the repository at this point in the history
  • Loading branch information
ripytide committed Nov 9, 2024
1 parent b963d0c commit 97f3d1a
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 13 deletions.
22 changes: 15 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,19 @@ additional backends are welcome!
| `pipx` | `[pipx]` | |
| `cargo` | `[cargo]` | |
| `rustup` | `[rustup]` | |
| `winget` | `[winget]` | |
| `winget` | `[winget]` | |
| `xbps` | `[xbps]` | |

## Config

```toml
# The metapac config.toml file is expected in the
# XDG_CONFIG_HOME/metapac directory (usually ~/.config/metapac/config.toml)
# unless using the --config-dir cli option.
# metapac's config.toml file (like this one) should be placed in the following location
# dependent on the operating system as specified in the `dirs` crate:
# | Platform | Value | Example |
# | -------- | ----------------------------------------------------- | ------------------------------------------------------------ |
# | Linux | $XDG_CONFIG_HOME or $HOME/.config/metapac/config.toml | /home/alice/.config/metapac/config.toml |
# | macOS | $HOME/Library/Application Support/metapac/config.toml | /Users/Alice/Library/Application Support/metapac/config.toml |
# | Windows | {FOLDERID_RoamingAppData}\metapac\config.toml | C:\Users\Alice\AppData\Roaming\metapac\config.toml |

# To decide which group files are relevant for the current machine
# metapac uses the machine's hostname in the hostname_groups table in
Expand Down Expand Up @@ -115,9 +119,13 @@ server = ["example_group"]
## Group Files

```toml
# Group files (like this one) should be placed in the
# XDG_CONFIG_HOME/metapac directory (usually ~/.config/metapac/config.toml)
# unless using the --config-dir cli option.
# metapac's group files (like this one) should be placed in the following location
# dependent on the operating system as specified in the `dirs` crate:
# | Platform | Value | Example |
# | -------- | ----------------------------------------- | -------------------------------------------------------- |
# | Linux | $XDG_CONFIG_HOME or $HOME/.config/groups/ | /home/alice/.config/metapac/groups/ |
# | macOS | $HOME/Library/Application Support/groups/ | /Users/Alice/Library/Application Support/metapac/groups/ |
# | Windows | {FOLDERID_RoamingAppData}\groups\ | C:\Users\Alice\AppData\Roaming\metapac\groups\ |
#
# The packages for each backend in group files can come in two formats, short-form
# and long-form:
Expand Down
10 changes: 7 additions & 3 deletions config.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# The metapac config.toml file is expected in the
# XDG_CONFIG_HOME/metapac directory (usually ~/.config/metapac/config.toml)
# unless using the --config-dir cli option.
# metapac's config.toml file (like this one) should be placed in the following location
# dependent on the operating system as specified in the `dirs` crate:
# | Platform | Value | Example |
# | -------- | ----------------------------------------------------- | ------------------------------------------------------------ |
# | Linux | $XDG_CONFIG_HOME or $HOME/.config/metapac/config.toml | /home/alice/.config/metapac/config.toml |
# | macOS | $HOME/Library/Application Support/metapac/config.toml | /Users/Alice/Library/Application Support/metapac/config.toml |
# | Windows | {FOLDERID_RoamingAppData}\metapac\config.toml | C:\Users\Alice\AppData\Roaming\metapac\config.toml |

# To decide which group files are relevant for the current machine
# metapac uses the machine's hostname in the hostname_groups table in
Expand Down
10 changes: 7 additions & 3 deletions groups/example_group.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Group files (like this one) should be placed in the
# XDG_CONFIG_HOME/metapac directory (usually ~/.config/metapac/config.toml)
# unless using the --config-dir cli option.
# metapac's group files (like this one) should be placed in the following location
# dependent on the operating system as specified in the `dirs` crate:
# | Platform | Value | Example |
# | -------- | ----------------------------------------- | -------------------------------------------------------- |
# | Linux | $XDG_CONFIG_HOME or $HOME/.config/groups/ | /home/alice/.config/metapac/groups/ |
# | macOS | $HOME/Library/Application Support/groups/ | /Users/Alice/Library/Application Support/metapac/groups/ |
# | Windows | {FOLDERID_RoamingAppData}\groups\ | C:\Users\Alice\AppData\Roaming\metapac\groups\ |
#
# The packages for each backend in group files can come in two formats, short-form
# and long-form:
Expand Down

0 comments on commit 97f3d1a

Please sign in to comment.