aboutsummaryrefslogtreecommitdiff
path: root/tests/modules/services/pbgopy/service.nix
blob: 2212143949ab6a4266fe1b60875eb5e13507c2dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{ config, pkgs, ... }: {
  config = {
    services.pbgopy.enable = true;

    nixpkgs.overlays = [
      (self: super: {
        pbgopy = pkgs.writeScriptBin "dummy-pbgopy" "" // {
          outPath = "@pbgopy@";
        };
      })
    ];

    nmt.script = ''
      serviceFile=home-files/.config/systemd/user/pbgopy.service

      assertFileExists $serviceFile

      assertFileContains $serviceFile \
        'ExecStart=@pbgopy@/bin/pbgopy serve --ttl 24h'
    '';
  };
}