diff options
author | Olli Helenius <liff@iki.fi> | 2019-03-22 13:47:49 +0200 |
---|---|---|
committer | Robert Helgesson <robert@rycee.net> | 2019-03-24 17:23:50 +0100 |
commit | 1fdb16866b377b7365768c86c9b4ac45e30bca6c (patch) | |
tree | c61a8dc77883ef612588d9e52a9f7e02781f7f48 /tests/modules/systemd | |
parent | 6ebf14143aee10d8a62eb660bb56ebed3ed674e2 (diff) |
systemd: add support for session variables
Via environment.d(5).
Diffstat (limited to 'tests/modules/systemd')
-rw-r--r-- | tests/modules/systemd/default.nix | 1 | ||||
-rw-r--r-- | tests/modules/systemd/session-variables-expected.conf | 2 | ||||
-rw-r--r-- | tests/modules/systemd/session-variables.nix | 18 |
3 files changed, 21 insertions, 0 deletions
diff --git a/tests/modules/systemd/default.nix b/tests/modules/systemd/default.nix index cc1d5b6baa3..c1779ac59fb 100644 --- a/tests/modules/systemd/default.nix +++ b/tests/modules/systemd/default.nix @@ -1,4 +1,5 @@ { systemd-services = ./services.nix; + systemd-session-variables = ./session-variables.nix; systemd-timers = ./timers.nix; } diff --git a/tests/modules/systemd/session-variables-expected.conf b/tests/modules/systemd/session-variables-expected.conf new file mode 100644 index 00000000000..5b6e80bc32b --- /dev/null +++ b/tests/modules/systemd/session-variables-expected.conf @@ -0,0 +1,2 @@ +V_int=1 +V_str=2 diff --git a/tests/modules/systemd/session-variables.nix b/tests/modules/systemd/session-variables.nix new file mode 100644 index 00000000000..7cfb4a6c7c3 --- /dev/null +++ b/tests/modules/systemd/session-variables.nix @@ -0,0 +1,18 @@ +{ config, lib, pkgs, ... }: + +with lib; + +{ + config = { + systemd.user.sessionVariables = { + V_int = 1; + V_str = "2"; + }; + + nmt.script = '' + local envFile=home-files/.config/environment.d/10-home-manager.conf + assertFileExists $envFile + assertFileContent $envFile ${./session-variables-expected.conf} + ''; + }; +} |