2025-01-25 05:44:26 +00:00
|
|
|
{
|
|
|
|
symlinkJoin,
|
|
|
|
waybar,
|
|
|
|
makeWrapper,
|
|
|
|
runCommand,
|
|
|
|
sass,
|
|
|
|
}: let
|
|
|
|
styleCss =
|
|
|
|
runCommand "style.css" {
|
|
|
|
nativeBuildInputs = [sass];
|
|
|
|
} ''
|
|
|
|
sass ${./configs/waybar/style.scss} > $out
|
|
|
|
'';
|
|
|
|
in
|
|
|
|
symlinkJoin {
|
|
|
|
name = "waybar";
|
|
|
|
paths = [
|
|
|
|
waybar
|
|
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
|
|
makeWrapper
|
|
|
|
];
|
|
|
|
postBuild = ''
|
|
|
|
wrapProgram $out/bin/waybar \
|
|
|
|
--add-flags "--config" \
|
|
|
|
--add-flags "${./configs/waybar/config.jsonc}" \
|
|
|
|
--add-flags "--style" \
|
|
|
|
--add-flags "${styleCss}"
|
|
|
|
|
2025-01-25 18:20:07 +00:00
|
|
|
mv $out/lib/systemd/user/waybar.service $out/lib/systemd/user/.waybar-wrapped.service
|
|
|
|
substitute $out/lib/systemd/user/.waybar-wrapped.service $out/lib/systemd/user/waybar.service \
|
2025-01-25 05:44:26 +00:00
|
|
|
--replace-fail ${waybar}/bin/waybar $out/bin/waybar
|
|
|
|
'';
|
|
|
|
meta = {
|
|
|
|
inherit (waybar.meta) mainProgram;
|
|
|
|
};
|
|
|
|
}
|