mirror of
https://github.com/nix-community/home-manager
synced 2024-11-27 05:29:46 +01:00
tests: clean up tests
- Move all module tests to their own directories. - Avoid duplication of `// import`.
This commit is contained in:
parent
fba87f8998
commit
de8033747c
17 changed files with 54 additions and 36 deletions
|
@ -11,44 +11,44 @@ let
|
||||||
sha256 = "1qr1shhapjn4nnd4k6hml69ri8vgz4l8lakjll5hc516shs9a9nn";
|
sha256 = "1qr1shhapjn4nnd4k6hml69ri8vgz4l8lakjll5hc516shs9a9nn";
|
||||||
};
|
};
|
||||||
|
|
||||||
modules = import ../modules/modules.nix { inherit lib pkgs; check = false; };
|
modules = import ../modules/modules.nix {
|
||||||
|
inherit lib pkgs;
|
||||||
|
check = false;
|
||||||
|
};
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
import nmt {
|
import nmt {
|
||||||
inherit lib pkgs modules;
|
inherit lib pkgs modules;
|
||||||
testedAttrPath = [ "home" "activationPackage" ];
|
testedAttrPath = [ "home" "activationPackage" ];
|
||||||
tests = {
|
tests = builtins.foldl' (a: b: a // (import b)) { } ([
|
||||||
browserpass = ./modules/programs/browserpass.nix;
|
./lib/types
|
||||||
mbsync = ./modules/programs/mbsync.nix;
|
./modules/files
|
||||||
texlive-minimal = ./modules/programs/texlive-minimal.nix;
|
./modules/home-environment
|
||||||
xresources = ./modules/xresources.nix;
|
./modules/misc/fontconfig
|
||||||
}
|
./modules/programs/alacritty
|
||||||
// pkgs.lib.optionalAttrs pkgs.stdenv.hostPlatform.isLinux (
|
./modules/programs/bash
|
||||||
{
|
./modules/programs/browserpass
|
||||||
getmail = ./modules/programs/getmail.nix;
|
./modules/programs/git
|
||||||
i3-keybindings = ./modules/services/window-managers/i3-keybindings.nix;
|
./modules/programs/gpg
|
||||||
}
|
./modules/programs/mbsync
|
||||||
// import ./modules/misc/pam
|
./modules/programs/neomutt
|
||||||
// import ./modules/misc/xdg
|
./modules/programs/newsboat
|
||||||
// import ./modules/misc/xsession
|
./modules/programs/readline
|
||||||
// import ./modules/programs/firefox
|
./modules/programs/ssh
|
||||||
// import ./modules/programs/neomutt
|
./modules/programs/texlive
|
||||||
// import ./modules/programs/rofi
|
./modules/programs/tmux
|
||||||
// import ./modules/services/sxhkd
|
./modules/programs/zsh
|
||||||
// import ./modules/systemd
|
./modules/xresources
|
||||||
)
|
] ++ lib.optionals pkgs.stdenv.hostPlatform.isLinux [
|
||||||
// import ./lib/types
|
./modules/misc/pam
|
||||||
// import ./modules/files
|
./modules/misc/xdg
|
||||||
// import ./modules/home-environment
|
./modules/misc/xsession
|
||||||
// import ./modules/misc/fontconfig
|
./modules/programs/firefox
|
||||||
// import ./modules/programs/alacritty
|
./modules/programs/getmail
|
||||||
// import ./modules/programs/bash
|
./modules/programs/rofi
|
||||||
// import ./modules/programs/git
|
./modules/services/sxhkd
|
||||||
// import ./modules/programs/gpg
|
./modules/services/window-managers/i3
|
||||||
// import ./modules/programs/newsboat
|
./modules/systemd
|
||||||
// import ./modules/programs/readline
|
]);
|
||||||
// import ./modules/programs/ssh
|
|
||||||
// import ./modules/programs/tmux
|
|
||||||
// import ./modules/programs/zsh;
|
|
||||||
}
|
}
|
||||||
|
|
3
tests/modules/programs/browserpass/default.nix
Normal file
3
tests/modules/programs/browserpass/default.nix
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
browserpass = ./browserpass.nix;
|
||||||
|
}
|
3
tests/modules/programs/getmail/default.nix
Normal file
3
tests/modules/programs/getmail/default.nix
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
getmail = ./getmail.nix;
|
||||||
|
}
|
|
@ -3,7 +3,7 @@
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ ../accounts/email-test-accounts.nix ];
|
imports = [ ../../accounts/email-test-accounts.nix ];
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
home.username = "hm-user";
|
home.username = "hm-user";
|
3
tests/modules/programs/mbsync/default.nix
Normal file
3
tests/modules/programs/mbsync/default.nix
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
mbsync = ./mbsync.nix;
|
||||||
|
}
|
|
@ -3,7 +3,7 @@
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ ../accounts/email-test-accounts.nix ];
|
imports = [ ../../accounts/email-test-accounts.nix ];
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
home.username = "hm-user";
|
home.username = "hm-user";
|
3
tests/modules/programs/texlive/default.nix
Normal file
3
tests/modules/programs/texlive/default.nix
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
texlive-minimal = ./texlive-minimal.nix;
|
||||||
|
}
|
3
tests/modules/services/window-managers/i3/default.nix
Normal file
3
tests/modules/services/window-managers/i3/default.nix
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
i3-keybindings = ./i3-keybindings.nix;
|
||||||
|
}
|
3
tests/modules/xresources/default.nix
Normal file
3
tests/modules/xresources/default.nix
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
xresources = ./xresources.nix;
|
||||||
|
}
|
Loading…
Reference in a new issue