summaryrefslogtreecommitdiff
path: root/users/seth/mixins/bash.nix
blob: b278d051af88d593e97db9b210b128ef50e720c5 (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
{ config, lib, ... }:

{
  config = lib.mkMerge [
    {
      programs.bash = {
        historyFile = "${config.xdg.stateHome}/bash/history";
        historyFileSize = 1000;
        historySize = 100;

        shellOptions = [
          "cdspell"
          "checkjobs"
          "checkwinsize"
          "dirspell"
          "globstar"
          "histappend"
          "no_empty_cmd_completion"
        ];
      };
    }

    # TODO: find out if i need this anymore with standalone HM
    (lib.mkIf config.seth.standalone.enable {
      programs.bash = {
        bashrcExtra = ''
          nixfile=${config.home.homeDirectory}/.nix-profile/etc/profile.d/nix.sh
          [ -e "$nixfile" ] && source "$nixfile"
        '';
      };
    })
  ];
}