mirror of
https://github.com/nix-community/home-manager
synced 2024-12-18 00:53:27 +00:00
9d53afb709
This adds a "test.asserts" module that currently just provides a convenient way to assert on the content of warnings. By default all tests will assert that no warnings are given.
35 lines
990 B
Nix
35 lines
990 B
Nix
{ 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;
|
|
"hm@example.com".notmuch.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}
|
|
'';
|
|
};
|
|
}
|