2020-05-30 23:16:54 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
2021-01-23 15:56:38 +01:00
|
|
|
let inherit (pkgs.stdenv.hostPlatform) isLinux;
|
|
|
|
in {
|
2020-05-30 23:16:54 +02:00
|
|
|
imports = [
|
|
|
|
({ ... }: { config.home.sessionPath = [ "foo" ]; })
|
|
|
|
({ ... }: { config.home.sessionPath = [ "bar" "baz" ]; })
|
|
|
|
];
|
|
|
|
|
|
|
|
nmt.script = ''
|
|
|
|
assertFileExists home-path/etc/profile.d/hm-session-vars.sh
|
|
|
|
assertFileContent \
|
|
|
|
home-path/etc/profile.d/hm-session-vars.sh \
|
|
|
|
${
|
|
|
|
pkgs.writeText "session-path-expected.txt" ''
|
|
|
|
# Only source this once.
|
|
|
|
if [ -n "$__HM_SESS_VARS_SOURCED" ]; then return; fi
|
|
|
|
export __HM_SESS_VARS_SOURCED=1
|
2021-01-23 15:56:38 +01:00
|
|
|
${lib.optionalString isLinux ''
|
2020-05-30 23:16:54 +02:00
|
|
|
|
2021-01-23 15:56:38 +01:00
|
|
|
export LOCALE_ARCHIVE_2_27="${pkgs.glibcLocales}/lib/locale/locale-archive"''}
|
2020-05-30 23:16:54 +02:00
|
|
|
export XDG_CACHE_HOME="/home/hm-user/.cache"
|
|
|
|
export XDG_CONFIG_HOME="/home/hm-user/.config"
|
|
|
|
export XDG_DATA_HOME="/home/hm-user/.local/share"
|
|
|
|
export PATH="$PATH''${PATH:+:}bar:baz:foo"
|
|
|
|
''
|
|
|
|
}
|
|
|
|
'';
|
|
|
|
|
|
|
|
}
|