aboutsummaryrefslogtreecommitdiff
path: root/tests/modules/targets/generic-linux.nix
blob: d9bb85b651ae1bb8c783e0d516a4a26fb462d2b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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"'
    '';
  };
}