mirror of
https://github.com/nix-community/home-manager
synced 2024-12-21 10:33:25 +00:00
3db6036775
Co-authored-by: Bruno Inec <binec@scaleway.com>
67 lines
1.7 KiB
Nix
67 lines
1.7 KiB
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
{
|
|
config = {
|
|
home.stateVersion = "21.11";
|
|
|
|
programs.waybar = {
|
|
package = config.lib.test.mkStubPackage { outPath = "@waybar@"; };
|
|
enable = true;
|
|
settings = [
|
|
{
|
|
layer = "top";
|
|
position = "top";
|
|
height = 30;
|
|
output = [ "DP-1" ];
|
|
modules-left = [ "sway/workspaces" "sway/mode" "custom/my-module" ];
|
|
modules-center = [ "sway/window" ];
|
|
modules-right = [
|
|
"idle_inhibitor"
|
|
"pulseaudio"
|
|
"network"
|
|
"cpu"
|
|
"memory"
|
|
"backlight"
|
|
"tray"
|
|
"battery#bat1"
|
|
"battery#bat2"
|
|
"clock"
|
|
];
|
|
|
|
modules = {
|
|
"sway/workspaces" = {
|
|
disable-scroll = true;
|
|
all-outputs = true;
|
|
};
|
|
"sway/mode" = { tooltip = false; };
|
|
"sway/window" = { max-length = 120; };
|
|
"idle_inhibitor" = { format = "{icon}"; };
|
|
"custom/my-module" = {
|
|
format = "hello from {}";
|
|
exec = let
|
|
dummyScript =
|
|
config.lib.test.mkStubPackage { outPath = "@dummy@"; };
|
|
in "${dummyScript}/bin/dummy";
|
|
};
|
|
};
|
|
}
|
|
{
|
|
position = "bottom";
|
|
output = [ "!DP-1" ];
|
|
modules-left = [ "sway/mode" ];
|
|
modules-center = [ "clock" ];
|
|
modules = { "sway/mode" = { tooltip = true; }; };
|
|
}
|
|
];
|
|
};
|
|
|
|
nmt.script = ''
|
|
assertPathNotExists home-files/.config/waybar/style.css
|
|
assertFileContent \
|
|
home-files/.config/waybar/config \
|
|
${./settings-complex-expected.json}
|
|
'';
|
|
};
|
|
}
|