37 lines
789 B
Nix
37 lines
789 B
Nix
![]() |
{
|
||
|
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}"
|
||
|
|
||
|
substitute ${waybar}/lib/systemd/user/waybar.service $out/lib/systemd/user/waybar-wrapped.service \
|
||
|
--replace-fail ${waybar}/bin/waybar $out/bin/waybar
|
||
|
'';
|
||
|
meta = {
|
||
|
inherit (waybar.meta) mainProgram;
|
||
|
};
|
||
|
}
|