aboutsummaryrefslogtreecommitdiff
path: root/home-manager/tests/modules/services/lieer/lieer-service.nix
blob: 03dcdc749b19fa9d6c32d28985227a6307671f06 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{ config, lib, pkgs, ... }:

with lib;

{
  imports = [ ../../accounts/email-test-accounts.nix ];

  config = {
    services.lieer.enable = true;

    accounts.email.accounts = {
      "hm@example.com".lieer.enable = true;
      "hm@example.com".lieer.sync.enable = true;
    };

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

    nmt.script = ''
      assertFileExists home-files/.config/systemd/user/lieer-hm-example-com.service
      assertFileExists home-files/.config/systemd/user/lieer-hm-example-com.timer

      assertFileContent home-files/.config/systemd/user/lieer-hm-example-com.service \
                        ${./lieer-service-expected.service}
      assertFileContent home-files/.config/systemd/user/lieer-hm-example-com.timer \
                        ${./lieer-service-expected.timer}
    '';
  };
}