aboutsummaryrefslogtreecommitdiff
path: root/tests/modules/targets-linux/generic-linux.nix
diff options
context:
space:
mode:
authorRobert Helgesson <robert@rycee.net>2020-09-04 16:02:05 +0200
committerRobert Helgesson <robert@rycee.net>2020-09-04 16:02:17 +0200
commita063b73d5cf2d741f5f873897974d1a4c3e36d3d (patch)
tree535b273147ad5a6832b9b41c5400e5e60cd9706e /tests/modules/targets-linux/generic-linux.nix
parentbfc66df13dc941361f5af92eaf88f2ea5db39722 (diff)
parentd3aee544b686a72b2bb7eeb379f72c6b6b2665b7 (diff)
Merge PR #1460
Diffstat (limited to 'tests/modules/targets-linux/generic-linux.nix')
-rw-r--r--tests/modules/targets-linux/generic-linux.nix19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/modules/targets-linux/generic-linux.nix b/tests/modules/targets-linux/generic-linux.nix
new file mode 100644
index 00000000000..d9bb85b651a
--- /dev/null
+++ b/tests/modules/targets-linux/generic-linux.nix
@@ -0,0 +1,19 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+{
+ config = {
+ targets.genericLinux.enable = true;
+
+ 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"'
+ assertFileContains \
+ home-path/etc/profile.d/hm-session-vars.sh \
+ '. "${pkgs.nix}/etc/profile.d/nix.sh"'
+ '';
+ };
+}