generic-linux: add option extraXdgDataDirs

PR #1486
This commit is contained in:
Damien Cassou 2020-09-09 21:53:21 +02:00 committed by Robert Helgesson
parent b819d2cc41
commit 605a8fc92e
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
3 changed files with 32 additions and 4 deletions

View file

@ -4,13 +4,16 @@ with lib;
{
config = {
targets.genericLinux.enable = true;
targets.genericLinux = {
enable = true;
extraXdgDataDirs = [ "/foo" ];
};
nmt.script = ''
assertFileExists home-path/etc/profile.d/hm-session-vars.sh
assertFileContains \
home-path/etc/profile.d/hm-session-vars.sh \
'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"'
'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"'
assertFileContains \
home-path/etc/profile.d/hm-session-vars.sh \
'. "${pkgs.nix}/etc/profile.d/nix.sh"'