mirror of
https://github.com/nix-community/home-manager
synced 2024-11-17 16:49:45 +01:00
polybar: use writeShellScriptBin
This commit is contained in:
parent
86af599a18
commit
41356ac267
1 changed files with 5 additions and 7 deletions
|
@ -27,12 +27,6 @@ let
|
||||||
configFile = pkgs.writeText "polybar.conf"
|
configFile = pkgs.writeText "polybar.conf"
|
||||||
(toPolybarIni cfg.config + "\n" + cfg.extraConfig);
|
(toPolybarIni cfg.config + "\n" + cfg.extraConfig);
|
||||||
|
|
||||||
script = ''
|
|
||||||
#!${pkgs.stdenv.shell}
|
|
||||||
|
|
||||||
${cfg.script}
|
|
||||||
'';
|
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -130,7 +124,11 @@ in
|
||||||
Service = {
|
Service = {
|
||||||
Type = "forking";
|
Type = "forking";
|
||||||
Environment = "PATH=${cfg.package}/bin:/run/wrappers/bin";
|
Environment = "PATH=${cfg.package}/bin:/run/wrappers/bin";
|
||||||
ExecStart = ''${pkgs.writeScriptBin "polybar-start" script}/bin/polybar-start'';
|
ExecStart =
|
||||||
|
let
|
||||||
|
scriptPkg = pkgs.writeShellScriptBin "polybar-start" cfg.script;
|
||||||
|
in
|
||||||
|
"${scriptPkg}/bin/polybar-start";
|
||||||
};
|
};
|
||||||
|
|
||||||
Install = {
|
Install = {
|
||||||
|
|
Loading…
Reference in a new issue