1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2025-01-12 03:59:49 +01:00
home-manager/tests/modules/programs/bacon/bacon.nix
Chris Pick 59a4c43e9b
bacon: fix configuration file location on Darwin
bacon reads its preferences from a different directory on Darwin.
Fix the path to read out of:
~/Library/Application\ Support/org.dystroy.bacon/prefs.toml
Linux behavior should be unchanged.
2025-01-01 13:51:47 +01:00

29 lines
710 B
Nix

{ pkgs, ... }:
let
configDir = if pkgs.stdenv.isDarwin then
"Library/Application Support/org.dystroy.bacon"
else
".config/bacon";
in {
programs.bacon = {
enable = true;
settings = {
jobs = {
ta = {
command = [ "cargo" "test" "--all-features" "--color" "always" ];
need_stdout = true;
};
};
export = {
enabled = true;
path = ".bacon-locations";
line_format = "{kind} {path}:{line}:{column} {message}";
};
};
};
test.stubs.bacon = { };
nmt.script = ''
assertFileExists 'home-files/${configDir}/prefs.toml'
assertFileContent 'home-files/${configDir}/prefs.toml' ${./expected.toml}
'';
}