1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-24 12:09:46 +01:00
home-manager/tests/modules/programs/waybar/settings-with-attrs.nix

30 lines
711 B
Nix
Raw Normal View History

{ 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}
'';
};
}