mirror of
https://github.com/nix-community/home-manager
synced 2024-12-02 16:09:46 +01:00
swayidle: fix systemd service
swayidle executes commands using "sh -c" and so its PATH must contain a shell. This adds such PATH entry to the environment of the systemd service. Fixes #2811.
This commit is contained in:
parent
6311f4adc3
commit
43ea4c5123
2 changed files with 5 additions and 0 deletions
|
@ -108,6 +108,8 @@ in {
|
||||||
|
|
||||||
Service = {
|
Service = {
|
||||||
Type = "simple";
|
Type = "simple";
|
||||||
|
# swayidle executes commands using "sh -c", so the PATH needs to contain a shell.
|
||||||
|
Environment = [ "PATH=${makeBinPath [ pkgs.bash ]}" ];
|
||||||
ExecStart =
|
ExecStart =
|
||||||
"${cfg.package}/bin/swayidle -w ${concatStringsSep " " args}";
|
"${cfg.package}/bin/swayidle -w ${concatStringsSep " " args}";
|
||||||
};
|
};
|
||||||
|
|
|
@ -47,6 +47,9 @@
|
||||||
|
|
||||||
assertFileExists $serviceFile
|
assertFileExists $serviceFile
|
||||||
assertFileRegex $serviceFile 'ExecStart=.*/bin/swayidle ${expectedArgs}'
|
assertFileRegex $serviceFile 'ExecStart=.*/bin/swayidle ${expectedArgs}'
|
||||||
|
assertFileRegex $serviceFile 'Environment=.*PATH=${
|
||||||
|
lib.makeBinPath [ pkgs.bash ]
|
||||||
|
}'
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue