1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2024-12-14 11:57:55 +00:00

volnoti: use cfg.package instead of pkgs

This commit is contained in:
Tomodachi94 2024-08-10 14:13:51 -07:00 committed by Robert Helgesson
parent f9fd45c512
commit 98bf8de65d
No known key found for this signature in database
GPG key ID: 96E745BD17AA17ED
4 changed files with 34 additions and 1 deletions

View file

@ -37,7 +37,7 @@ in {
Install = { WantedBy = [ "graphical-session.target" ]; };
Service = { ExecStart = "${pkgs.volnoti}/bin/volnoti -v -n"; };
Service = { ExecStart = "${lib.getExe cfg.package} -v -n"; };
};
};
}

View file

@ -287,6 +287,7 @@ in import nmtSrc {
./modules/services/trayscale
./modules/services/twmn
./modules/services/udiskie
./modules/services/volnoti
./modules/services/window-managers/bspwm
./modules/services/window-managers/herbstluftwm
./modules/services/window-managers/hyprland

View file

@ -0,0 +1 @@
{ volnoti-package-option = ./package-option.nix; }

View file

@ -0,0 +1,31 @@
{ config, ... }:
{
services.volnoti = {
enable = true;
package = config.lib.test.mkStubPackage {
name = "volnoti";
outPath = "@volnoti@";
};
};
test.stubs.volnoti = { };
nmt.script = ''
serviceFile=home-files/.config/systemd/user/volnoti.service
assertFileExists $serviceFile
assertFileContent $serviceFile \
${
builtins.toFile "expected-volnoti.service" ''
[Install]
WantedBy=graphical-session.target
[Service]
ExecStart=@volnoti@/bin/volnoti -v -n
[Unit]
Description=volnoti
''
}
'';
}