1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-21 17:59:39 +01:00
home-manager/tests/modules/programs/sketchybar/sketchybar-invalid-lua-config.nix
Austin Horstman e4b0102f69 sketchybar: use finalpackage wrapper
Use finalPackage pattern with wrapper so that people who don't use the
service can benefit from the other options.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-05-24 19:54:43 -05:00

28 lines
647 B
Nix

{ config, ... }:
{
programs.sketchybar = {
enable = true;
package = config.lib.test.mkStubPackage {
name = "sketchybar";
buildScript = ''
mkdir -p $out/bin
touch $out/bin/sketchybar
chmod 755 $out/bin/sketchybar
'';
};
# Test case for lua configuration without sbarLuaPackage
configType = "lua";
sbarLuaPackage = null;
config = ''
-- Basic lua config
local sbar = require("sbarlua")
sbar.bar:set({ height = 30 })
'';
};
test.asserts.assertions.expected = [
"When configType is set to \"lua\", service.sbarLuaPackage must be specified"
];
}