aboutsummaryrefslogtreecommitdiff
path: root/nixos/home.nix
blob: a277d35466d8c34ff66cad7e8156e9bc22ce1546 (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
{ config, pkgs, username, ... }:
{
  users.users.${username} = {
    isNormalUser = true;
    description = "User";
    extraGroups = [ "networkmanager" "wheel" "kvm" "adbusers" "docker" ];
    packages = with pkgs; [];
    shell = pkgs.fish;
  };
  virtualisation.docker.enable = true;
  programs.adb.enable = true;
  programs.fish = {
    enable = true;
    shellInit = ''
function fish_prompt -d "Write out the prompt"
    # This shows up as USER@HOST /home/user/ >, with the directory colored
    # $USER and $hostname are set by fish, so you can just use them
    # instead of using `whoami` and `hostname`
    printf '%s@%s %s%s%s > ' $USER $hostname \
        (set_color $fish_color_cwd) (prompt_pwd) (set_color normal)
end

if status is-interactive
    set fish_greeting

    if not set -q TMUX
        tmux new-session -d -s "main" -c "~/dev"
        if not set -q VSCODE_PID
            tmux -u a
        end
    end
end

function tsnode
    set filename (basename $argv[1] .ts)
    tsc $filename.ts
    node $filename.js
    rm $filename.js
end

zoxide init --cmd cd fish | source
starship init fish | source
if test -f ~/.cache/ags/user/generated/terminal/sequences.txt
    cat ~/.cache/ags/user/generated/terminal/sequences.txt
end

alias pamcan=pacman
alias py=python
alias tmux="tmux -u"
alias snvim="sudo -E -s nvim"
alias ls="eza"
alias wisdom="fortune ~/.config/fortune/showerthoughts | cowsay | lolcat"
function mkcd
    mkdir -p $argv[1]
    cd $argv[1]
end

set -x PKG_CONFIG_PATH $HOME/.local/lib/pkgconfig $HOME/.local/lib64/pkgconfig
set -x LD_LIBRARY_PATH $HOME/.local/lib $HOME/.local/lib64
set -U fish_user_paths /home/comet/.cargo/bin $fish_user_paths
set -U fish_user_paths /opt/android-sdk/cmdline-tools/latest/bin $fish_user_paths
set -U fish_user_paths /opt/android-sdk/platform-tools $fish_user_paths
set -U fish_user_paths /opt/android-sdk/emulator $fish_user_paths
set -U fish_user_paths $HOME/.bin $fish_user_paths

set ANDROID_NDK_HOME /opt/android-ndk
set ANDROID_NDK_ROOT /opt/android-ndk
set ANDROID_HOME /opt/android-sdk
    '';
  };
  environment.systemPackages = with pkgs; [
    home-manager
  ];
}