mirror of
https://github.com/nix-community/home-manager.git
synced 2026-12-06 04:40:17 +00:00
The config path on Darwin contains a space ("Library/Application
Support"), and the NMT helpers received it unquoted, so the shell split
it and the example test looked for "home-files/Library/Application".
The empty-config test passed only because the split path never exists.
The jujutsu integration test also used the Darwin path for jj, but the
jujutsu module always writes to the XDG config directory.
23 lines
502 B
Nix
23 lines
502 B
Nix
{ pkgs, ... }:
|
|
let
|
|
config = ''
|
|
pub fn config() {
|
|
keybind("c", global::confirm);
|
|
}
|
|
'';
|
|
configDir = if pkgs.stdenv.hostPlatform.isDarwin then "Library/Application Support" else ".config";
|
|
in
|
|
{
|
|
programs.oyui = {
|
|
enable = true;
|
|
package = null;
|
|
inherit config;
|
|
};
|
|
|
|
nmt.script = ''
|
|
assertFileExists 'home-files/${configDir}/oyui/config.rn'
|
|
assertFileContent 'home-files/${configDir}/oyui/config.rn' \
|
|
${builtins.toFile "expected-config.rn" config}
|
|
'';
|
|
}
|