aboutsummaryrefslogtreecommitdiffhomepage
path: root/home-manager/home.nix
blob: 3a61227a8284bad2fd7813c48d938666bc59a50d (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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
{ pkgs, specialArgs, ... }:
let
  clipboardCopyCommand = specialArgs.env.gui.clipboard.copyCommand;
  requiresWlClipboard = clipboardCopyCommand == "wl-copy";
in
{
  home.username = "ken";
  home.homeDirectory = "/home/ken";

  home.stateVersion = "23.05";

  programs.home-manager.enable = true;

  home.packages = [
    # pkgs.alacritty
    pkgs.bat
    pkgs.cmake
    pkgs.curl
    pkgs.deno
    pkgs.fd
    pkgs.fzf
    pkgs.gcc
    pkgs.git
    pkgs.go
    pkgs.gopls
    pkgs.jq
    # pkgs.neovim
    pkgs.newsboat
    pkgs.nodejs_18
    pkgs.pandoc
    pkgs.python311
    pkgs.ripgrep
    pkgs.ruby_3_1
    pkgs.sqlite
    pkgs.tmux
    pkgs.tokei
    pkgs.tree
    pkgs.zig
    # pkgs.zsh

    pkgs.nodePackages.typescript-language-server
  ] ++ pkgs.lib.optional requiresWlClipboard pkgs.wl-clipboard;

  home.file = {
    # "hoge".source = dotfiles/piyo;
  };

  home.sessionVariables = {
    # EDITOR = "nvim";
  };

  programs.direnv = {
    enable = true;
    nix-direnv.enable = true;
  };

  programs.tmux = {
    enable = true;

    sensibleOnTop = false;

    aggressiveResize = true;
    baseIndex = 1;
    clock24 = true;
    escapeTime = 0;
    historyLimit = 50000;
    mouse = false;
    prefix = "C-t";
    terminal = "tmux-256color";

    extraConfig =
      let
        commonConfig = builtins.readFile ./config/tmux/tmux.conf;
        extraConfig = if clipboardCopyCommand != null then
          ''
            bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "${clipboardCopyCommand}"
          ''
        else
          "";
      in
      commonConfig + extraConfig;
  };
}