volnoti: use cfg.package instead of pkgs
This commit is contained in:
parent
f9fd45c512
commit
98bf8de65d
4 changed files with 34 additions and 1 deletions
|
@ -37,7 +37,7 @@ in {
|
||||||
|
|
||||||
Install = { WantedBy = [ "graphical-session.target" ]; };
|
Install = { WantedBy = [ "graphical-session.target" ]; };
|
||||||
|
|
||||||
Service = { ExecStart = "${pkgs.volnoti}/bin/volnoti -v -n"; };
|
Service = { ExecStart = "${lib.getExe cfg.package} -v -n"; };
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -287,6 +287,7 @@ in import nmtSrc {
|
||||||
./modules/services/trayscale
|
./modules/services/trayscale
|
||||||
./modules/services/twmn
|
./modules/services/twmn
|
||||||
./modules/services/udiskie
|
./modules/services/udiskie
|
||||||
|
./modules/services/volnoti
|
||||||
./modules/services/window-managers/bspwm
|
./modules/services/window-managers/bspwm
|
||||||
./modules/services/window-managers/herbstluftwm
|
./modules/services/window-managers/herbstluftwm
|
||||||
./modules/services/window-managers/hyprland
|
./modules/services/window-managers/hyprland
|
||||||
|
|
1
tests/modules/services/volnoti/default.nix
Normal file
1
tests/modules/services/volnoti/default.nix
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{ volnoti-package-option = ./package-option.nix; }
|
31
tests/modules/services/volnoti/package-option.nix
Normal file
31
tests/modules/services/volnoti/package-option.nix
Normal 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
|
||||||
|
''
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
}
|
Loading…
Reference in a new issue