aboutsummaryrefslogtreecommitdiff
path: root/home-manager/tests/modules/programs/nushell/settings.nix
blob: 09c192b3ba37a26f57ec4c84c8dae1ce0894d4c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{ config, lib, pkgs, ... }:

with lib;

{
  config = {
    programs.nushell = {
      enable = true;

      settings = mkMerge [
        {
          edit_mode = "vi";
          startup = [ "alias la [] { ls -a }" ];
          completion_mode = "circular";
          key_timeout = 10;
        }

        {
          startup = [ "alias e [msg] { echo $msg }" ];
          no_auto_pivot = true;
        }
      ];
    };

    nixpkgs.overlays =
      [ (self: super: { nushell = pkgs.writeScriptBin "dummy-nushell" ""; }) ];

    nmt.script = ''
      assertFileContent \
        home-files/.config/nu/config.toml \
        ${./settings-expected.toml}
    '';
  };
}