mirror of
https://github.com/nix-community/home-manager
synced 2024-11-30 06:59:45 +01:00
65700a4fd1
The old trigger would actually never cause a restart since the path doesn't change. With this change the trigger is now using the actual configuration path in the Nix store, which depends on the content.
21 lines
534 B
Nix
21 lines
534 B
Nix
{ config, pkgs, ... }:
|
|
|
|
{
|
|
config = {
|
|
services.polybar = {
|
|
enable = true;
|
|
package = config.lib.test.mkStubPackage { };
|
|
script = "polybar bar &";
|
|
};
|
|
|
|
nmt.script = ''
|
|
serviceFile=home-files/.config/systemd/user/polybar.service
|
|
|
|
assertFileExists $serviceFile
|
|
assertFileNotRegex $serviceFile 'X-Restart-Triggers=/nix/store/.*-polybar.conf$'
|
|
assertFileRegex $serviceFile 'ExecStart=.*/bin/polybar-start'
|
|
|
|
assertPathNotExists home-files/.config/polybar/config.ini
|
|
'';
|
|
};
|
|
}
|