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.
This commit is contained in:
parent
f83c49baa3
commit
95d55b8da1
8 changed files with 96 additions and 9 deletions
30
tests/modules/misc/xsession/basic.nix
Normal file
30
tests/modules/misc/xsession/basic.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{ 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}
|
||||
|
||||
'';
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue