home-manager/tests/default.nix

152 lines
4.3 KiB
Nix
Raw Normal View History

2021-01-29 16:43:49 +00:00
{ pkgs ? import <nixpkgs> {}, enableBig ? true }:
2018-12-10 23:51:48 +00:00
let
lib = import ../modules/lib/stdlib-extended.nix pkgs.lib;
2018-12-10 23:51:48 +00:00
nmt = pkgs.fetchFromGitLab {
owner = "rycee";
repo = "nmt";
2021-06-27 12:20:13 +00:00
rev = "89924d8e6e0fcf866a11324d32c6bcaa89cda506";
sha256 = "02wzrbmpdpgig58a1rhz8sb0p2rvbapnlcmhi4d4bi8w9md6pmdl";
2018-12-10 23:51:48 +00:00
};
modules = import ../modules/modules.nix {
inherit lib pkgs;
check = false;
} ++ [
{
# 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";
home.homeDirectory = "/home/hm-user";
# Avoid including documentation since this will cause
# unnecessary rebuilds of the tests.
manual.manpages.enable = false;
imports = [ ./asserts.nix ./stubs.nix ];
}
];
isDarwin = pkgs.stdenv.hostPlatform.isDarwin;
isLinux = pkgs.stdenv.hostPlatform.isLinux;
2018-12-10 23:51:48 +00:00
in
import nmt {
inherit lib pkgs modules;
2018-12-10 23:51:48 +00:00
testedAttrPath = [ "home" "activationPackage" ];
tests = builtins.foldl' (a: b: a // (import b)) { } ([
./lib/types
./modules/files
./modules/home-environment
./modules/misc/fontconfig
./modules/programs/alacritty
./modules/programs/alot
2020-04-28 18:38:41 +00:00
./modules/programs/aria2
./modules/programs/autojump
./modules/programs/bash
./modules/programs/bat
./modules/programs/bottom
./modules/programs/broot
./modules/programs/browserpass
2020-05-06 16:23:40 +00:00
./modules/programs/dircolors
./modules/programs/direnv
./modules/programs/feh
./modules/programs/fish
2020-10-15 20:25:47 +00:00
./modules/programs/gh
./modules/programs/git
./modules/programs/gpg
./modules/programs/himalaya
./modules/programs/htop
2020-05-01 03:49:20 +00:00
./modules/programs/i3status
./modules/programs/irsii
./modules/programs/kakoune
./modules/programs/kitty
./modules/programs/lf
./modules/programs/lieer
./modules/programs/man
./modules/programs/mbsync
./modules/programs/mpv
2020-08-26 19:20:54 +00:00
./modules/programs/ncmpcpp
./modules/programs/ne
./modules/programs/neomutt
./modules/programs/newsboat
./modules/programs/nix-index
2020-07-24 15:15:55 +00:00
./modules/programs/nushell
./modules/programs/pet
./modules/programs/powerline-go
2020-04-07 07:10:07 +00:00
./modules/programs/qutebrowser
./modules/programs/readline
2021-01-30 02:29:23 +00:00
./modules/programs/sbt
./modules/programs/scmpuff
2021-07-11 17:28:56 +00:00
./modules/programs/sm64ex
./modules/programs/ssh
./modules/programs/starship
./modules/programs/texlive
./modules/programs/tmux
2021-04-28 23:56:58 +00:00
./modules/programs/topgrade
./modules/programs/vscode
./modules/programs/zplug
./modules/programs/zsh
./modules/xresources
] ++ lib.optionals isDarwin [
./modules/targets-darwin
] ++ lib.optionals isLinux [
./modules/config/i18n
2021-06-15 22:59:25 +00:00
./modules/i18n/input-method
./modules/misc/gtk
./modules/misc/numlock
./modules/misc/pam
./modules/misc/qt
./modules/misc/xdg
./modules/misc/xsession
./modules/programs/abook
./modules/programs/autorandr
./modules/programs/foot
./modules/programs/getmail
./modules/programs/gnome-terminal
./modules/programs/i3status-rust
2021-06-12 07:55:58 +00:00
./modules/programs/mangohud
2020-08-26 19:20:54 +00:00
./modules/programs/ncmpcpp-linux
./modules/programs/neovim # Broken package dependency on Darwin.
./modules/programs/rbw
./modules/programs/rofi
./modules/programs/rofi-pass
./modules/programs/terminator
2020-07-29 20:29:51 +00:00
./modules/programs/waybar
./modules/programs/xmobar
./modules/services/barrier
./modules/services/devilspie2
./modules/services/dropbox
./modules/services/emacs
./modules/services/fluidsynth
./modules/services/fnott
2021-07-15 01:20:28 +00:00
./modules/services/git-sync
2020-04-12 13:42:43 +00:00
./modules/services/kanshi
./modules/services/lieer
2021-06-07 21:38:42 +00:00
./modules/services/pantalaimon
2020-12-03 02:55:37 +00:00
./modules/services/pbgopy
2021-01-30 17:20:36 +00:00
./modules/services/playerctld
2020-03-02 21:31:15 +00:00
./modules/services/polybar
./modules/services/redshift-gammastep
./modules/services/sxhkd
./modules/services/syncthing
2021-07-21 20:43:18 +00:00
./modules/services/trayer
./modules/services/window-managers/bspwm
./modules/services/window-managers/i3
./modules/services/window-managers/sway
./modules/services/wlsunset
./modules/services/xsettingsd
./modules/systemd
./modules/targets-linux
2021-01-29 16:43:49 +00:00
] ++ lib.optionals enableBig [
./modules/programs/emacs
] ++ lib.optionals (enableBig && isLinux) [
./modules/misc/debug
./modules/programs/firefox
]);
2018-12-10 23:51:48 +00:00
}