feat(wrappers): start wrapping configs
thanks to @fdncred for the ls function with nushell
This commit is contained in:
parent
d757d6b432
commit
c4a290ae63
13 changed files with 136 additions and 26 deletions
37
hosts/python/wrappers/waybar/default.nix
Normal file
37
hosts/python/wrappers/waybar/default.nix
Normal file
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
symlinkJoin,
|
||||
waybar,
|
||||
makeWrapper,
|
||||
runCommand,
|
||||
sass,
|
||||
}: let
|
||||
styleCss =
|
||||
runCommand "style.css" {
|
||||
nativeBuildInputs = [sass];
|
||||
} ''
|
||||
sass ${./style.scss} > $out
|
||||
'';
|
||||
in
|
||||
symlinkJoin {
|
||||
name = "waybar";
|
||||
paths = [
|
||||
waybar
|
||||
];
|
||||
nativeBuildInputs = [
|
||||
makeWrapper
|
||||
];
|
||||
postBuild = ''
|
||||
wrapProgram $out/bin/waybar \
|
||||
--add-flags "--config" \
|
||||
--add-flags "${./config.jsonc}" \
|
||||
--add-flags "--style" \
|
||||
--add-flags "${styleCss}"
|
||||
|
||||
rm $out/lib/systemd/user/waybar.service
|
||||
substitute ${waybar}/lib/systemd/user/waybar.service $out/lib/systemd/user/waybar.service \
|
||||
--replace-fail ${waybar}/bin/waybar $out/bin/waybar \
|
||||
'';
|
||||
meta = {
|
||||
inherit (waybar.meta) mainProgram;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue