+/config

my dotfiles and nix configuration

git clone https://git.julia.blue/+/config

Julia RyanFix directory permissions093c04a

main
3.0 KiB124 linesraw
1{ pkgs, lib, ... }:
2{
3  home = {
4    shell = {
5      enableFishIntegration = true;
6      enableBashIntegration = true;
7    };
8    packages = with pkgs; [
9      # zsh
10      zsh-syntax-highlighting
11      zsh-autosuggestions
12      nix-zsh-completions
13
14      # bash
15      blesh
16    ];
17  };
18
19  programs = {
20    fish = {
21      enable = true;
22      plugins = with pkgs.fishPlugins; let
23          mkPlugin = p: {
24            inherit (p) src;
25            name = "${p.pname}";
26          };
27        in
28        (map mkPlugin [
29          puffer # (!! !$ !* ..+)
30          done
31          fish-you-should-use
32          colored-man-pages
33          autopair # try pisces?
34          # fzf or fzf.fish or fifc if default integration isn't enough
35        ]);
36      shellInitLast = "source ~/.config/fish/extra.fish";
37    };
38
39    # TODO: check if these are on by default
40    ghostty.enableFishIntegration = true;
41    kitty.shellIntegration.enableFishIntegration = true;
42
43    fzf = let fd = "fd --mount --color=always"; in {
44      enable = true;
45      fileWidget = { command = fd;
46        options = [
47          "--multi"
48          "--height=80%"
49          "--ansi"
50          "--preview '~/.config/zsh/preview.sh {}'"
51          "--bind 'ctrl-/:reload(${fd} . / -H)'"
52          "--bind 'ctrl-h:reload(${fd} . ~ -H)'"
53          "--bind 'ctrl-w:reload(${fd})'"
54        ];
55      };
56      changeDirWidget = { command = "${fd} -td"; options = [ "--ansi" ]; };
57      historyWidget.command = ""; # use atuin for history
58      defaultOptions = [
59        "--reverse"
60        "--bind=ctrl-z:ignore"
61        "--preview-window=down"
62        "--height=60%"
63        "--inline-info"
64        "--bind 'ctrl-p:change-preview-window(hidden|down)'"
65        "--bind ctrl-r:first"
66        "--bind alt-up:first"
67        "--bind alt-down:last"
68        "--bind shift-up:preview-page-up"
69        "--bind shift-down:preview-page-down"
70        "--bind ctrl-d:half-page-down"
71        "--bind ctrl-u:half-page-up"
72      ];
73      colors.bg = lib.mkForce "#000000";
74    };
75    atuin = {
76      enable = true;
77      flags = [ "--disable-up-arrow" ];
78      settings = {
79        dialect = "us";
80        style = "compact";
81        invert = true;
82        inline_height = 20;
83        show_tabs = false;
84        show_help = false;
85        sync_frequency = "12h";
86      };
87    };
88    zoxide = {
89      enable = true;
90      options = [ "--cmd j" ];
91    };
92    direnv.enable = true;
93    starship.enable = true;
94    pay-respects = {
95      enable = true;
96      options = [ "--nocnf" ];
97    };
98    nix-index = {
99      enableFishIntegration = false;
100      enableBashIntegration = false;
101    };
102
103    bash = {
104      enable = false;
105      bashrcExtra = ''
106        source $(blesh-share)/ble.sh
107        if [ -d "$HOME/.local/bin" ] ; then
108            PATH="$HOME/.local/bin:$PATH"
109        fi
110
111        if [ -d "$HOME/.nix-profile/bin" ] ; then
112            PATH="$HOME/.nix-profile/bin:$PATH"
113        fi'';
114
115      shellAliases = {
116        cat = "bat";
117        c = "clear";
118        l = "eza --icons";
119        ls = "l -l";
120        tree = "l -T --git-ignore";
121      };
122    };
123  };
124}