1
0
mirror of https://github.com/nix-community/home-manager synced 2024-06-03 05:23:32 +02:00
home-manager/tests/modules/misc/xsession/basic.nix
Robert Helgesson 95d55b8da1
xsession: add option importedVariables
This option lists the environment variables to be imported into the
systemd user session.

Also add a basic test of the xsession module.
2019-06-23 14:06:29 +02:00

31 lines
657 B
Nix

{ config, lib, ... }:
with lib;
{
config = {
home.homeDirectory = "/test-home";
xsession = {
enable = true;
windowManager.command = "window manager command";
importedVariables = [ "EXTRA_IMPORTED_VARIABLE" ];
initExtra = "init extra commands";
profileExtra = "profile extra commands";
};
nmt.script = ''
assertFileExists home-files/.xprofile
assertFileContent \
home-files/.xprofile \
${./basic-xprofile-expected.txt}
assertFileExists home-files/.xsession
assertFileContent \
home-files/.xsession \
${./basic-xsession-expected.txt}
'';
};
}