2024-03-05 23:37:33 +00:00
|
|
|
# We're basically reimplmenting parts from the home-manager test suite here
|
|
|
|
# just with our own modules included.
|
|
|
|
{ pkgs ? import <nixpkgs> { }
|
|
|
|
, homeManagerSrc ? <home-manager>
|
|
|
|
, enableBig ? true
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
nmt = pkgs.nix-lib-nmt;
|
|
|
|
lib = import "${homeManagerSrc}/modules/lib/stdlib-extended.nix" pkgs.lib;
|
|
|
|
homeManagerModules = import "${homeManagerSrc}/modules/modules.nix" {
|
|
|
|
inherit pkgs lib;
|
|
|
|
check = false;
|
|
|
|
};
|
|
|
|
modules = homeManagerModules ++ [
|
|
|
|
../../../modules/home-manager
|
|
|
|
../../../modules/home-manager/_private
|
|
|
|
|
|
|
|
# Copied over from home-manager test suite.
|
|
|
|
{
|
|
|
|
# Bypass <nixpkgs> reference inside modules/modules.nix to make the test
|
|
|
|
# suite more pure.
|
|
|
|
_module.args.pkgsPath = pkgs.path;
|
|
|
|
|
|
|
|
# Fix impurities. Without these some of the user's environment
|
|
|
|
# will leak into the tests through `builtins.getEnv`.
|
|
|
|
xdg.enable = true;
|
|
|
|
home = {
|
|
|
|
username = "hm-user";
|
|
|
|
homeDirectory = "/home/hm-user";
|
|
|
|
stateVersion = lib.mkDefault "18.09";
|
|
|
|
};
|
|
|
|
|
|
|
|
# Avoid including documentation since this will cause
|
|
|
|
# unnecessary rebuilds of the tests.
|
|
|
|
manual.manpages.enable = lib.mkDefault false;
|
|
|
|
|
|
|
|
imports = [
|
|
|
|
"${homeManagerSrc}/tests/asserts.nix"
|
|
|
|
"${homeManagerSrc}/tests/big-test.nix"
|
|
|
|
"${homeManagerSrc}/tests/stubs.nix"
|
|
|
|
];
|
|
|
|
|
|
|
|
test.enableBig = enableBig;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
inherit (pkgs.stdenv.hostPlatform) isDarwin isLinux;
|
|
|
|
in
|
|
|
|
import nmt {
|
|
|
|
inherit pkgs lib modules;
|
|
|
|
testedAttrPath = [ "home" "activationPackage" ];
|
2024-03-08 02:08:55 +00:00
|
|
|
tests = builtins.foldl' (a: b: a // (import b)) { } ([
|
2024-03-05 23:37:33 +00:00
|
|
|
./programs/neovide
|
2024-03-06 12:28:21 +00:00
|
|
|
./programs/pipewire
|
2024-03-06 12:23:05 +00:00
|
|
|
./programs/pop-launcher
|
2024-03-08 02:08:55 +00:00
|
|
|
]
|
|
|
|
++ lib.optionals isLinux [
|
2024-03-09 03:24:20 +00:00
|
|
|
./services/archivebox
|
2024-03-08 02:12:40 +00:00
|
|
|
./services/matcha
|
2024-03-08 02:08:55 +00:00
|
|
|
./services/plover
|
2024-03-09 03:05:27 +00:00
|
|
|
./services/yt-dlp
|
2024-03-08 02:08:55 +00:00
|
|
|
]);
|
2024-03-05 23:37:33 +00:00
|
|
|
}
|