fork/home-manager

git clone https://git.julia.blue/fork/home-manager

Nicolas Berbichewaybar: make module a freeform module, remove warnings7c320a53

master
1.1 KiB43 linesraw
1{ config, lib, pkgs, ... }:
2
3with lib;
4
5{
6  config = {
7    home.stateVersion = "22.05";
8
9    programs.waybar = {
10      package = config.lib.test.mkStubPackage { outPath = "@waybar@"; };
11      enable = true;
12      settings = [{
13        modules-center = [ "test" ];
14        modules = { "test" = { }; };
15      }];
16    };
17
18    test.asserts.assertions.expected = [''
19      The `programs.waybar.settings.[].modules` option has been removed.
20      It is now possible to declare modules in the configuration without nesting them under the `modules` option.
21    ''];
22
23    nmt.script = ''
24      assertPathNotExists home-files/.config/waybar/style.css
25      assertFileContent \
26        home-files/.config/waybar/config \
27          ${
28            builtins.toFile "waybar-deprecated-modules-option.json" ''
29              [
30                {
31                  "modules-center": [
32                    "test"
33                  ],
34                  "modules-left": [],
35                  "modules-right": [],
36                  "test": {}
37                }
38              ]
39            ''
40          }
41    '';
42  };
43}