1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-27 05:29:46 +01:00
home-manager/tests/default.nix

292 lines
8.7 KiB
Nix
Raw Normal View History

{ pkgs ? import <nixpkgs> { }, enableBig ? true }:
2018-12-11 00:51:48 +01:00
let
lib = import ../modules/lib/stdlib-extended.nix pkgs.lib;
nmtSrc = fetchTarball {
url = "https://git.sr.ht/~rycee/nmt/archive/v0.5.1.tar.gz";
sha256 = "0qhn7nnwdwzh910ss78ga2d00v42b0lspfd7ybl61mpfgz3lmdcj";
};
modules = import ../modules/modules.nix {
inherit lib pkgs;
check = false;
} ++ [{
# 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 = [ ./asserts.nix ./big-test.nix ./stubs.nix ];
test.enableBig = enableBig;
}];
isDarwin = pkgs.stdenv.hostPlatform.isDarwin;
isLinux = pkgs.stdenv.hostPlatform.isLinux;
in import nmtSrc {
inherit lib pkgs modules;
2018-12-11 00:51:48 +01:00
testedAttrPath = [ "home" "activationPackage" ];
tests = builtins.foldl' (a: b: a // (import b)) { } ([
./lib/generators
./lib/types
./modules/files
./modules/home-environment
./modules/misc/fontconfig
./modules/misc/manual
nix: add structural settings (#2718) Nix permits user level configurations through ~/.config/nix/nix.conf that allow customization of system-wide settings and behavior. This is beneficial in chroot environments and for per-user configurations. System level Nix configurations in the form of /etc/nix/nix.conf can be specified declaratively via the NixOS nix module but as of currently no counter part exists in home-manager. This PR is a port of the RFC42 implementation for the NixOS nix module[1] to home-manager. Non-applicable options have been excluded and the config generation backends have been tweaked to the backends offered by home-manager. A notable change from the NixOS module is a mandatory option to specify the Nix binary corresponding to the version "nix.conf" should be generated against. This is necessary because the validation phase is dependent on the `nix show-config` subcommand on the host platform. While it is possible to avoid validation entirely, the lack of type checking was deemed too significant. In NixOs, the version information can be retrieved from the `package` option itself which declares the Nix binary system-wide. However in home-manager, there is no pure way to detect the system Nix version and what state version the "nix.conf" should be generated against. Thus an option is used to overcome this limitation by forcing the user to specify the Nix package. Note this interaction can still be automated by forwarding the system-wide Nix package to the home-manager module if needed. Three unit tests were added to test the module behavior for the empty settings, the example settings and the example registry configurations respectively. [1] - NixOS/nixpkgs#139075
2022-03-18 03:47:32 +01:00
./modules/misc/nix
./modules/misc/specialisation
./modules/programs/aerc
./modules/programs/alacritty
./modules/programs/alot
./modules/programs/antidote
2020-04-28 20:38:41 +02:00
./modules/programs/aria2
./modules/programs/atuin
./modules/programs/autojump
./modules/programs/bacon
./modules/programs/bash
./modules/programs/bat
./modules/programs/bottom
./modules/programs/broot
./modules/programs/browserpass
2022-08-17 18:16:01 +02:00
./modules/programs/btop
2023-09-03 12:09:45 +02:00
./modules/programs/carapace
2023-06-16 21:38:29 +02:00
./modules/programs/cava
2023-04-14 23:41:51 +02:00
./modules/programs/comodoro
2023-03-27 20:25:17 +02:00
./modules/programs/darcs
2020-05-06 18:23:40 +02:00
./modules/programs/dircolors
./modules/programs/direnv
./modules/programs/emacs
2024-05-02 02:23:11 +02:00
./modules/programs/fastfetch
./modules/programs/feh
./modules/programs/fish
./modules/programs/gallery-dl
2020-10-15 22:25:47 +02:00
./modules/programs/gh
2023-07-05 19:56:25 +02:00
./modules/programs/gh-dash
./modules/programs/git
2023-09-19 08:03:34 +02:00
./modules/programs/git-cliff
./modules/programs/gpg
./modules/programs/gradle
./modules/programs/granted
2022-01-04 00:09:24 +01:00
./modules/programs/helix
./modules/programs/himalaya
./modules/programs/htop
2022-08-01 17:03:41 +02:00
./modules/programs/hyfetch
2020-05-01 05:49:20 +02:00
./modules/programs/i3status
./modules/programs/irssi
2023-01-27 22:15:17 +01:00
./modules/programs/jujutsu
2024-02-18 22:57:35 +01:00
./modules/programs/joplin-desktop
2022-10-23 21:22:14 +02:00
./modules/programs/k9s
./modules/programs/kakoune
./modules/programs/khal
2023-07-03 22:06:38 +02:00
./modules/programs/khard
2023-09-19 08:03:34 +02:00
./modules/programs/kitty
./modules/programs/ledger
./modules/programs/less
./modules/programs/lf
./modules/programs/lsd
./modules/programs/lieer
./modules/programs/man
./modules/programs/mbsync
./modules/programs/micro
./modules/programs/mise
./modules/programs/mpv
./modules/programs/mu
./modules/programs/mujmap
2020-08-26 21:20:54 +02:00
./modules/programs/ncmpcpp
./modules/programs/ne
./modules/programs/neomutt
./modules/programs/neovim
./modules/programs/newsboat
2022-08-17 13:58:46 +02:00
./modules/programs/nheko
./modules/programs/nix-index
./modules/programs/nnn
2020-07-24 17:15:55 +02:00
./modules/programs/nushell
2022-09-29 13:08:53 +02:00
./modules/programs/oh-my-posh
./modules/programs/openstackclient
./modules/programs/pandoc
2023-01-27 05:20:00 +01:00
./modules/programs/papis
./modules/programs/pet
2022-03-28 17:19:38 +02:00
./modules/programs/pistol
2022-09-30 18:53:39 +02:00
./modules/programs/pls
2024-02-24 17:39:35 +01:00
./modules/programs/poetry
./modules/programs/powerline-go
./modules/programs/pubs
./modules/programs/pyenv
2023-08-12 22:07:04 +02:00
./modules/programs/qcal
2020-04-07 09:10:07 +02:00
./modules/programs/qutebrowser
2023-08-26 15:36:08 +02:00
./modules/programs/ranger
./modules/programs/readline
./modules/programs/rio
./modules/programs/ripgrep
./modules/programs/ruff
2021-12-30 12:47:44 +01:00
./modules/programs/sagemath
./modules/programs/sapling
2021-01-30 03:29:23 +01:00
./modules/programs/sbt
./modules/programs/scmpuff
2023-11-11 10:19:45 +01:00
./modules/programs/senpai
2023-11-06 20:05:51 +01:00
./modules/programs/sftpman
./modules/programs/sioyek
2021-07-11 19:28:56 +02:00
./modules/programs/sm64ex
2024-04-19 12:39:30 +02:00
./modules/programs/spotify-player
./modules/programs/ssh
./modules/programs/starship
./modules/programs/taskwarrior
./modules/programs/tealdeer
./modules/programs/texlive
2023-10-01 16:41:55 +02:00
./modules/programs/thefuck
2022-09-21 22:59:50 +02:00
./modules/programs/tmate
./modules/programs/tmux
2021-04-29 01:56:58 +02:00
./modules/programs/topgrade
2023-05-11 11:21:18 +02:00
./modules/programs/translate-shell
./modules/programs/vim-vint
./modules/programs/vscode
./modules/programs/watson
2022-04-08 08:48:27 +02:00
./modules/programs/wezterm
./modules/programs/yazi
./modules/programs/zellij
2023-09-11 20:50:12 +02:00
./modules/programs/zk
./modules/programs/zplug
./modules/programs/zsh
2023-09-19 08:03:34 +02:00
./modules/services/syncthing/common
./modules/xresources
] ++ lib.optionals isDarwin [
./modules/launchd
2024-04-15 09:40:27 +02:00
./modules/services/espanso-darwin
./modules/services/git-sync-darwin
./modules/services/imapnotify-darwin
./modules/services/nix-gc-darwin
./modules/targets-darwin
] ++ lib.optionals isLinux [
./modules/config/i18n
2021-06-16 00:59:25 +02:00
./modules/i18n/input-method
./modules/misc/debug
./modules/misc/editorconfig
./modules/misc/gtk
./modules/misc/numlock
./modules/misc/pam
./modules/misc/qt
./modules/misc/xdg
./modules/misc/xsession
./modules/programs/abook
./modules/programs/autorandr
2023-09-29 13:04:57 +02:00
./modules/programs/awscli
./modules/programs/beets # One test relies on services.mpd
2023-11-29 08:23:23 +01:00
./modules/programs/bemenu
2022-09-25 19:27:04 +02:00
./modules/programs/borgmatic
./modules/programs/boxxy
./modules/programs/firefox
./modules/programs/foot
2024-04-21 13:12:43 +02:00
./modules/programs/freetube
2023-03-01 15:57:55 +01:00
./modules/programs/fuzzel
./modules/programs/getmail
2021-05-16 23:54:43 +02:00
./modules/programs/gnome-shell
./modules/programs/gnome-terminal
./modules/programs/hexchat
2024-04-23 05:34:22 +02:00
./modules/programs/hyprlock
2023-11-14 01:10:38 +01:00
./modules/programs/i3blocks
./modules/programs/i3status-rust
./modules/programs/imv
./modules/programs/kodi
2022-10-09 20:11:59 +02:00
./modules/programs/looking-glass-client
2021-06-12 09:55:58 +02:00
./modules/programs/mangohud
2020-08-26 21:20:54 +02:00
./modules/programs/ncmpcpp-linux
./modules/programs/pqiv
./modules/programs/rbw
./modules/programs/rofi
./modules/programs/rofi-pass
2022-06-07 21:01:14 +02:00
./modules/programs/swaylock
./modules/programs/swayr
./modules/programs/terminator
./modules/programs/thunderbird
2024-04-16 22:44:55 +02:00
./modules/programs/tofi
2020-07-29 22:29:51 +02:00
./modules/programs/waybar
2023-01-31 17:06:18 +01:00
./modules/programs/wlogout
./modules/programs/wofi
./modules/programs/wpaperd
./modules/programs/xmobar
2022-10-25 14:31:46 +02:00
./modules/programs/yambar
2022-09-09 09:56:07 +02:00
./modules/programs/yt-dlp
2023-08-04 13:56:37 +02:00
./modules/services/activitywatch
./modules/services/avizo
./modules/services/barrier
2022-09-25 19:27:04 +02:00
./modules/services/borgmatic
2022-10-27 19:08:14 +02:00
./modules/services/cachix-agent
2023-10-15 14:03:18 +02:00
./modules/services/cliphist
2022-08-27 20:52:41 +02:00
./modules/services/clipman
2023-04-14 23:41:51 +02:00
./modules/services/comodoro
2023-12-27 13:00:49 +01:00
./modules/services/conky
./modules/services/darkman
./modules/services/devilspie2
./modules/services/dropbox
./modules/services/emacs
./modules/services/espanso
2021-10-11 21:41:49 +02:00
./modules/services/flameshot
./modules/services/fluidsynth
./modules/services/fnott
./modules/services/fusuma
2021-07-15 03:20:28 +02:00
./modules/services/git-sync
2021-11-25 19:28:18 +01:00
./modules/services/gpg-agent
2019-02-24 20:33:56 +01:00
./modules/services/gromit-mpx
./modules/services/home-manager-auto-upgrade
2024-05-05 11:13:18 +02:00
./modules/services/hypridle
2024-04-27 16:54:16 +02:00
./modules/services/hyprpaper
./modules/services/imapnotify
2020-04-12 15:42:43 +02:00
./modules/services/kanshi
./modules/services/lieer
./modules/services/mopidy
2022-03-04 00:43:40 +01:00
./modules/services/mpd
2022-12-27 18:15:51 +01:00
./modules/services/mpd-mpris
2023-09-19 08:03:34 +02:00
./modules/services/mpdris2
./modules/services/nix-gc
./modules/services/osmscout-server
2021-06-07 23:38:42 +02:00
./modules/services/pantalaimon
2022-12-28 22:16:14 +01:00
./modules/services/parcellite
./modules/services/pass-secret-service
./modules/services/pasystray
2020-12-03 03:55:37 +01:00
./modules/services/pbgopy
./modules/services/picom
2021-01-30 18:20:36 +01:00
./modules/services/playerctld
2020-03-02 22:31:15 +01:00
./modules/services/polybar
2022-02-07 11:54:09 +01:00
./modules/services/recoll
./modules/services/redshift-gammastep
./modules/services/remmina
./modules/services/screen-locker
2023-11-11 22:49:58 +01:00
./modules/services/signaturepdf
./modules/services/swayidle
./modules/services/swaync
2023-07-07 10:15:43 +02:00
./modules/services/swayosd
./modules/services/sxhkd
2023-02-08 17:59:38 +01:00
./modules/services/syncthing/linux
2021-07-21 22:43:18 +02:00
./modules/services/trayer
./modules/services/twmn
2022-08-22 17:01:54 +02:00
./modules/services/udiskie
./modules/services/window-managers/bspwm
2021-11-09 23:17:36 +01:00
./modules/services/window-managers/herbstluftwm
./modules/services/window-managers/hyprland
./modules/services/window-managers/i3
2023-08-11 11:09:54 +02:00
./modules/services/window-managers/river
2022-07-08 19:31:25 +02:00
./modules/services/window-managers/spectrwm
./modules/services/window-managers/sway
./modules/services/wlsunset
./modules/services/wob
./modules/services/xsettingsd
./modules/systemd
./modules/targets-linux
]);
2018-12-11 00:51:48 +01:00
}