rio: use XDG config for both linux and darwin

`rio` now uses the same config location for both Linux and macOS:

> MacOS and Linux configuration file path is `~/.config/rio/config.toml`.

Ref: https://raphamorim.io/rio/docs/configuration-file
This commit is contained in:
David Sánchez 2024-03-08 13:18:28 +00:00 committed by GitHub
parent 417015af0d
commit 9a3a5b4402
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 22 deletions

View file

@ -1,13 +1,6 @@
{ config, pkgs, ... }:
let
inherit (pkgs.stdenv.hostPlatform) isDarwin;
path = if isDarwin then
"Library/Application Support/rio/config.toml"
else
".config/rio/config.toml";
expected = pkgs.writeText "rio-expected.toml" ''
cursor = "_"
padding-x = 0
@ -26,7 +19,7 @@ in {
};
nmt.script = ''
assertFileExists home-files/"${path}"
assertFileContent home-files/"${path}" '${expected}'
assertFileExists home-files/.config/rio/config.toml
assertFileContent home-files/.config/rio/config.toml '${expected}'
'';
}