summaryrefslogtreecommitdiff
path: root/home-config/fish/config.fish
blob: 7e054bf79eb6eb1e7a4328f202aa940274874f4b (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
if status is-login
    eval "$(guix package --search-paths \
        -p ~/.config/guix/current \
        -p ~/.guix-profile \
        -p /run/current-system/profile)"

    fenv source /etc/profile
    set -gx HOME_ENVIRONMENT $HOME/.guix-home
    fenv source $HOME_ENVIRONMENT/setup-environment
    fenv $HOME_ENVIRONMENT/on-first-login
    fish_add_path -Pp ~/.local/bin
    fish_add_path -Pp ~/.guix-home/profile/bin
    fish_add_path -Pp /run/setuid-programs
    fish_add_path -Pp ~/.nix-profile/bin
    fish_add_path -Pp ~/.go/bin
    set -gx GOPATH ~/.go
    set -gx EDITOR nvim
    set -gax --path XDG_DATA_DIRS ~/.nix-profile/share
    # Bad
    find ~/.config/fish/ -name "*tmp*" -exec rm {} +
end
if status is-interactive
    set -gax --path XDG_DATA_DIRS ~/.local/share/flatpak/exports/share

    set GPG_TTY $(tty)
    export GPG_TTY
    # Commands to run in interactive sessions can go here
    alias quit exit
    alias cat "bat --paging=never"
    alias ds "sudo -E guix system -L ~/.config/guix/modules reconfigure ~/.config/guix/$(prompt_hostname).scm"
    alias dh "guix home -L ~/.config/guix/modules reconfigure ~/.config/guix/home-config/home-configuration.scm && home-manager switch"
    alias gc "git -C ~/.config/guix add . && git -C ~/.config/guix commit && git -C ~/.config/guix push all"
    alias cg "git -C ~/.config/guix pull"
    alias cgh "git -C ~/.config/guix pull stationeryh main"
    alias python "python3"
    alias spt "spotify_player"
    alias ls "ls -p --color=auto"
    alias grep "grep --color=auto"
    alias ll "ls -l"

    zoxide init --cmd cd fish | source

end