mirror of
https://github.com/nix-community/home-manager.git
synced 2026-10-03 12:09:19 +00:00
Forward converted values to the complete settings path so the standard changed-option warning identifies the destination key. Preserve legacy reads, priorities, defaults, and shadowed conversions. Point mpdris2 at Library.music_dir directly and cover nested paths, literal dotted keys, and the affected callers in warning tests. The contributor guidelines now describe `to` as the settings path that contains `key` instead of the settings root.
36 lines
955 B
Nix
36 lines
955 B
Nix
{ lib, options, ... }:
|
|
{
|
|
programs.rofi = {
|
|
enable = true;
|
|
location = "center";
|
|
xoffset = 0;
|
|
yoffset = 0;
|
|
};
|
|
|
|
test.asserts.warnings.expected = [
|
|
"The option `programs.rofi.location' defined in ${lib.showFiles options.programs.rofi.location.files} has been changed to `programs.rofi.settings.location' that has a different type. Please read `programs.rofi.settings.location' documentation and update your configuration accordingly."
|
|
]
|
|
++
|
|
map
|
|
(
|
|
name:
|
|
"The option `programs.rofi.${name}' defined in ${
|
|
lib.showFiles options.programs.rofi.${name}.files
|
|
} has been renamed to `programs.rofi.settings.${name}'."
|
|
)
|
|
[
|
|
"yoffset"
|
|
"xoffset"
|
|
];
|
|
|
|
nmt.script = ''
|
|
assertFileContent home-files/.config/rofi/config.rasi ${builtins.toFile "expected.rasi" ''
|
|
configuration {
|
|
location: 0;
|
|
xoffset: 0;
|
|
yoffset: 0;
|
|
}
|
|
''}
|
|
'';
|
|
}
|