mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 19:46:05 +01:00
tests/arrpc: add service module test coverage
- Add custom-target.nix test for custom systemd target configuration Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
This commit is contained in:
parent
1ed730a977
commit
0f9fae161d
3 changed files with 28 additions and 0 deletions
10
tests/modules/services/arrpc/custom-target-expected.service
Normal file
10
tests/modules/services/arrpc/custom-target-expected.service
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
[Install]
|
||||
WantedBy=sway-session.target
|
||||
|
||||
[Service]
|
||||
ExecStart=@arrpc@/bin/arrpc
|
||||
Restart=always
|
||||
|
||||
[Unit]
|
||||
Description=Discord Rich Presence for browsers, and some custom clients
|
||||
PartOf=graphical-session.target
|
||||
14
tests/modules/services/arrpc/custom-target.nix
Normal file
14
tests/modules/services/arrpc/custom-target.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
config = {
|
||||
services.arrpc = {
|
||||
enable = true;
|
||||
systemdTarget = "sway-session.target";
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertFileContent \
|
||||
home-files/.config/systemd/user/arRPC.service \
|
||||
${./custom-target-expected.service}
|
||||
'';
|
||||
};
|
||||
}
|
||||
4
tests/modules/services/arrpc/default.nix
Normal file
4
tests/modules/services/arrpc/default.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{ lib, pkgs, ... }:
|
||||
lib.optionalAttrs pkgs.stdenv.hostPlatform.isLinux {
|
||||
arrpc-custom-target = ./custom-target.nix;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue