depot/third_party/home-manager/tests/modules/programs/waybar/settings-with-attrs.nix
Default email 2eafb8192e Project import generated by Copybara.
GitOrigin-RevId: 176e455371a8371586e8a3ff0d56ee9f3ca2324e
2023-01-10 02:35:00 -07:00

29 lines
711 B
Nix

{ config, lib, pkgs, ... }:
with lib;
{
config = {
home.stateVersion = "21.11";
programs.waybar = {
package = config.lib.test.mkStubPackage { outPath = "@waybar@"; };
enable = true;
settings = let
settingsComplex = (import ./settings-complex.nix {
inherit config lib pkgs;
}).config.programs.waybar.settings;
in {
mainBar = builtins.head settingsComplex;
secondaryBar = builtins.elemAt settingsComplex 1;
};
};
nmt.script = ''
assertPathNotExists home-files/.config/waybar/style.css
assertFileContent \
home-files/.config/waybar/config \
${./settings-complex-expected.json}
'';
};
}