1
0
mirror of https://github.com/nix-community/home-manager synced 2024-06-15 03:03:39 +02:00
home-manager/tests/modules/home-environment/session-search-variables.nix
2023-11-21 18:50:29 +00:00

16 lines
406 B
Nix

{ config, lib, pkgs, ... }:
{
imports = [
({ ... }: { config.home.sessionSearchVariables.TEST = [ "foo" ]; })
({ ... }: { config.home.sessionSearchVariables.TEST = [ "bar" "baz" ]; })
];
nmt.script = ''
hmSessVars=home-path/etc/profile.d/hm-session-vars.sh
assertFileExists $hmSessVars
assertFileContains $hmSessVars \
'export TEST="bar:baz:foo''${TEST:+:}$TEST"'
'';
}