Open nikitabobko opened 10 months ago
That can be achieved with using something like yadm
to manage one's dotfiles
I don't like symlinks. I manage my dotfiles with pure git git -c status.showUntrackedFiles=no --git-dir=$HOME/.dotfiles --work-tree=$HOME "$@"
, that's why I want to have a built-in support for hostname-specific configs
But maybe it's a bad idea, it opens a Pandora's box of other possible conditions like architecture, notch vs no-notch (but they must covered by hostname, so maybe it's not a problem after all)
I've not decided yet
Just wanted to provide an alternative :) Were your first thoughts for the whole config file to be duplicated (but some settings being specific to the host) or to have a main aerospace.toml
and include()
the hostname-specific settings?
Given that we have ${XDG_CONFIG_HOME}/aerospace/ directory dedicated for configuration, maybe we can do all these things there? We can let aerospace.toml be either a regular config or a "link" indicating which config should be looked at next. The format of "link" will be easy to differentiate from a regular config.
For example:
-- .config/aerospace
|-- aerospace.toml
|-- home_mac.toml
|-- x86.toml
|-- random.toml
and aerospace.toml:
[[link]]
filename = "home_mac"
hostname = "home_mac"
[[link]]
filename = "x86"
arch = "x86_64"
[[link]]
filename = "random"
arch = "arm64"
hostname = "good"
where we choose the first matched config.
I'd like to be able to include other files, as I share base dotfiles via git, and usually have gitignored local files that change configuration depending on the host which aren't shared (but sometimes symlinked if I want to keep them in git as well).
It would be cool to have hostname specific configurations in case when users use different computers
Suggestions:
~/.aerospace.toml
- fallback~/.aerospace-$HOSTNAME.toml
- hostname specific config