2020-04-05 16:46:55 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
{
|
|
|
|
config = {
|
2020-09-09 21:53:21 +02:00
|
|
|
targets.genericLinux = {
|
|
|
|
enable = true;
|
|
|
|
extraXdgDataDirs = [ "/foo" ];
|
|
|
|
};
|
2020-04-05 16:46:55 +02:00
|
|
|
|
|
|
|
nmt.script = ''
|
|
|
|
assertFileExists home-path/etc/profile.d/hm-session-vars.sh
|
2021-03-08 21:41:23 +01:00
|
|
|
|
2020-04-24 21:41:22 +02:00
|
|
|
assertFileContains \
|
|
|
|
home-path/etc/profile.d/hm-session-vars.sh \
|
2020-09-09 21:53:21 +02:00
|
|
|
'export XDG_DATA_DIRS="''${NIX_STATE_DIR:-/nix/var/nix}/profiles/default/share:/home/hm-user/.nix-profile/share:/foo''${XDG_DATA_DIRS:+:}$XDG_DATA_DIRS"'
|
2020-04-24 21:41:22 +02:00
|
|
|
assertFileContains \
|
2020-04-05 16:46:55 +02:00
|
|
|
home-path/etc/profile.d/hm-session-vars.sh \
|
2020-04-24 21:41:22 +02:00
|
|
|
'. "${pkgs.nix}/etc/profile.d/nix.sh"'
|
2021-03-08 21:41:23 +01:00
|
|
|
|
|
|
|
assertFileContains \
|
|
|
|
home-path/etc/profile.d/hm-session-vars.sh \
|
|
|
|
'export TERMINFO_DIRS="/home/hm-user/.nix-profile/share/terminfo:$TERMINFO_DIRS''${TERMINFO_DIRS:+:}/etc/terminfo:/lib/terminfo:/usr/share/terminfo"'
|
|
|
|
assertFileContains \
|
|
|
|
home-path/etc/profile.d/hm-session-vars.sh \
|
|
|
|
'export TERM="$TERM"'
|
2020-04-05 16:46:55 +02:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|