1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-23 03:29:45 +01:00

tests: clean up tests

- Move all module tests to their own directories.

- Avoid duplication of `// import`.
This commit is contained in:
Robert Helgesson 2020-01-26 12:00:03 +01:00
parent fba87f8998
commit de8033747c
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
17 changed files with 54 additions and 36 deletions

View file

@ -11,44 +11,44 @@ let
sha256 = "1qr1shhapjn4nnd4k6hml69ri8vgz4l8lakjll5hc516shs9a9nn";
};
modules = import ../modules/modules.nix { inherit lib pkgs; check = false; };
modules = import ../modules/modules.nix {
inherit lib pkgs;
check = false;
};
in
import nmt {
inherit lib pkgs modules;
testedAttrPath = [ "home" "activationPackage" ];
tests = {
browserpass = ./modules/programs/browserpass.nix;
mbsync = ./modules/programs/mbsync.nix;
texlive-minimal = ./modules/programs/texlive-minimal.nix;
xresources = ./modules/xresources.nix;
}
// pkgs.lib.optionalAttrs pkgs.stdenv.hostPlatform.isLinux (
{
getmail = ./modules/programs/getmail.nix;
i3-keybindings = ./modules/services/window-managers/i3-keybindings.nix;
}
// import ./modules/misc/pam
// import ./modules/misc/xdg
// import ./modules/misc/xsession
// import ./modules/programs/firefox
// import ./modules/programs/neomutt
// import ./modules/programs/rofi
// import ./modules/services/sxhkd
// import ./modules/systemd
)
// import ./lib/types
// import ./modules/files
// import ./modules/home-environment
// import ./modules/misc/fontconfig
// import ./modules/programs/alacritty
// import ./modules/programs/bash
// import ./modules/programs/git
// import ./modules/programs/gpg
// import ./modules/programs/newsboat
// import ./modules/programs/readline
// import ./modules/programs/ssh
// import ./modules/programs/tmux
// import ./modules/programs/zsh;
tests = builtins.foldl' (a: b: a // (import b)) { } ([
./lib/types
./modules/files
./modules/home-environment
./modules/misc/fontconfig
./modules/programs/alacritty
./modules/programs/bash
./modules/programs/browserpass
./modules/programs/git
./modules/programs/gpg
./modules/programs/mbsync
./modules/programs/neomutt
./modules/programs/newsboat
./modules/programs/readline
./modules/programs/ssh
./modules/programs/texlive
./modules/programs/tmux
./modules/programs/zsh
./modules/xresources
] ++ lib.optionals pkgs.stdenv.hostPlatform.isLinux [
./modules/misc/pam
./modules/misc/xdg
./modules/misc/xsession
./modules/programs/firefox
./modules/programs/getmail
./modules/programs/rofi
./modules/services/sxhkd
./modules/services/window-managers/i3
./modules/systemd
]);
}

View file

@ -0,0 +1,3 @@
{
browserpass = ./browserpass.nix;
}

View file

@ -0,0 +1,3 @@
{
getmail = ./getmail.nix;
}

View file

@ -3,7 +3,7 @@
with lib;
{
imports = [ ../accounts/email-test-accounts.nix ];
imports = [ ../../accounts/email-test-accounts.nix ];
config = {
home.username = "hm-user";

View file

@ -0,0 +1,3 @@
{
mbsync = ./mbsync.nix;
}

View file

@ -3,7 +3,7 @@
with lib;
{
imports = [ ../accounts/email-test-accounts.nix ];
imports = [ ../../accounts/email-test-accounts.nix ];
config = {
home.username = "hm-user";

View file

@ -0,0 +1,3 @@
{
texlive-minimal = ./texlive-minimal.nix;
}

View file

@ -0,0 +1,3 @@
{
i3-keybindings = ./i3-keybindings.nix;
}

View file

@ -0,0 +1,3 @@
{
xresources = ./xresources.nix;
}