summaryrefslogtreecommitdiff
path: root/modules/home-manager/personal/environment.nix
blob: 3e3666cbe3fd2eb936ac617dd976e6276f7f38c1 (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
35
36
37
38
39
40
{
  config,
  lib,
  pkgs,
  ...
} @ inputs: {
  home.packages = with pkgs; [coreutils moreutils];
  personal.home.wallpaper =
    lib.mkDefault (inputs.osConfig.stylix.image or (pkgs.personal.static.wallpapers.nga-1973-68-1.override {gravity = "north";}));

  programs.bash = {enable = lib.mkDefault true;};

  home = {
    shellAliases = {
      amimullvad = "curl -Ls https://am.i.mullvad.net/connected";
      rm = "rm -f";
      ssh = "TERM=xterm-256color ssh";
      edit = "$EDITOR";
    };
    sessionVariables = {CDPATH = "~";};
  };

  programs.bash.bashrcExtra = ''
    function set_win_title(){
      echo -ne "\033]0;$(whoami)@$(hostname):$(dirs)\a"
    }
    starship_precmd_user_func="set_win_title"
  '';

  services.gpg-agent = {
    enableBashIntegration = lib.mkDefault config.programs.bash.enable;
    pinentryPackage = lib.mkDefault (
      if config.personal.gui.enable
      then pkgs.pinentry-qt
      else null
    );
    grabKeyboardAndMouse =
      lib.mkDefault false; # insecure, but necessary with keepass auto-type
  };
}