home-manager/tests/modules/targets-linux/generic-linux.nix

20 lines
561 B
Nix
Raw Normal View History

{ config, lib, pkgs, ... }:
with lib;
{
config = {
targets.genericLinux.enable = true;
nmt.script = ''
assertFileExists home-path/etc/profile.d/hm-session-vars.sh
assertFileContains \
home-path/etc/profile.d/hm-session-vars.sh \
2020-06-14 23:34:53 +02:00
'export XDG_DATA_DIRS="''${NIX_STATE_DIR:-/nix/var/nix}/profiles/default/share:/home/hm-user/.nix-profile/share''${XDG_DATA_DIRS:+:}$XDG_DATA_DIRS"'
assertFileContains \
home-path/etc/profile.d/hm-session-vars.sh \
'. "${pkgs.nix}/etc/profile.d/nix.sh"'
'';
};
}