1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-05 02:39:45 +01:00
home-manager/tests/modules/programs/waybar/deprecated-modules-option.nix
Nicolas Berbiche 7c320a5325
waybar: make module a freeform module, remove warnings
The `style` option now also accepts a path instead of a text
configuration.

Keeping up with new Waybar options is annoying, so make the module a
freeform module.

The `modules` option will be removed in release 22.05.

The logic to generate warnings for modules and everything was
removed. I don't want to maintain the code that generates these
warnings anymore.
2021-11-29 20:52:06 -05: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": {}
}
]
''
}
'';
};
}