aboutsummaryrefslogtreecommitdiff
path: root/home-manager/tests/modules/systemd/services.nix
blob: ea9b2b4fb874dc1a093d49b7a90a0faa3b4d7440 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{ config, lib, pkgs, ... }:

with lib;

{
  config = {
    systemd.user.services."test-service@" = {
      Unit = {
        Description = "A basic test service";
      };

      Service = {
        ExecStart = ''/some/exec/start/command --with-arguments "%i"'';
      };
    };

    nmt.script = ''
      serviceFile=home-files/.config/systemd/user/test-service@.service
      assertFileExists $serviceFile
      assertFileContent $serviceFile ${./services-expected.conf}
    '';
  };
}