depot/third_party/home-manager/tests/modules/programs/waybar/deprecated-modules-option.nix
Default email b9675abb90 Project import generated by Copybara.
GitOrigin-RevId: 781d25b315def05cd7ede3765226c54216f0b1fe
2021-12-02 21:30:34 -08:00

43 lines
1.1 KiB
Nix

{ config, lib, pkgs, ... }:
with lib;
{
config = {
home.stateVersion = "22.05";
programs.waybar = {
package = config.lib.test.mkStubPackage { outPath = "@waybar@"; };
enable = true;
settings = [{
modules-center = [ "test" ];
modules = { "test" = { }; };
}];
};
test.asserts.assertions.expected = [''
The `programs.waybar.settings.[].modules` option has been removed.
It is now possible to declare modules in the configuration without nesting them under the `modules` option.
''];
nmt.script = ''
assertPathNotExists home-files/.config/waybar/style.css
assertFileContent \
home-files/.config/waybar/config \
${
builtins.toFile "waybar-deprecated-modules-option.json" ''
[
{
"modules-center": [
"test"
],
"modules-left": [],
"modules-right": [],
"test": {}
}
]
''
}
'';
};
}