summaryrefslogtreecommitdiff
path: root/config/home-manager/home.nix
blob: 08a103c94e4f4b23598f0f2f25d78135f11bafc3 (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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
# _                                  _
#| |__   ___  _ __ ___   ___   _ __ (_)_  __
#| '_ \ / _ \| '_ ` _ \ / _ \ | '_ \| \ \/ /
#| | | | (_) | | | | | |  __/_| | | | |>  <
#|_| |_|\___/|_| |_| |_|\___(_)_| |_|_/_/\_\
#Coast's ~/.config/home-manager/home.nix
{ config, pkgs, ... }:
{
  home.username = "avery";
  home.homeDirectory = "/home/avery";
  home.stateVersion = "25.05";
  home.packages = with pkgs; [
    bat cowsay bat cmatrix bat cava cbonsai bat ksh bat tree hyfetch qutebrowser xonsh elvish openjdk btop htop cpufetch lm_sensors dysk dogdns ];
  home.file = {
  };
  home.sessionVariables = {
    EDITOR = "emacs";
    BROWSER = "brave";
  };
  programs.eza = {
    enable = true;
};
  programs.bash = {
    enable = true;
    initExtra = ''
      if [ "$(id -u)" = 0 ]; then PS1ICON='#'; else PS1ICON='$'; fi
PS1='\[\e[38;2;254;128;25m\][\[\e[38;2;235;219;178m\]\u\[\e[38;2;200;200;200m\]@\[\e[38;2;131;165;152m\]coast \[\e[38;2;235;219;178m\]\w\[\e[38;2;254;128;25m\]]'"$PS1ICON"'\[\e[0m\] '
    source "$HOME/.config/shell/aliases"
    source "$HOME/.config/shell/exports"
    '';
};
  home.file.".config/bat/config".text = ''
    --theme="Nord"
    --style="numbers,changes,grid"
    --paging=auto
  '';
#vim conf
  home.file.".vimrc".text = ''
    set number
    set shiftwidth=4
    set tabstop=4
    set wrap
    set cursorline
    set linebreak
    set termguicolors
    syntax on
    filetype plugin indent on
    set ignorecase
    set smartcase
    set hlsearch
    set incsearch
    set autoindent
    set expandtab
    map <F^> :setlocal spell! spelllang=en_us<CR>
    nnoremap <C-n> :NERDTreeToggle<CR>
    call plug#begin('~/.vim/plugged')
    Plug 'tpope/vim-sensible'
    Plug 'preservim/nerdtree'
    Plug 'junegunn/fzf', { 'do': { -> fzf#install() }  }
    Plug 'junegunn/fzf.vim'
    Plug 'vim-airline/vim-airline'
    Plug 'vim-airline/vim-airline-themes'
    call plug#end()
    set background=dark
  '';
  home.file.".config/shell/exports".text = ''
    export PATH=$HOME/.local/bin:$PATH
    export PATH=$HOME/.luarocks/bin:$PATH
    if [ -n "$ZSH_VERSION"  ]; then 
        export ZSH="/home/avery/.oh-my-zsh"
    fi
    export NIXPKGS_ALLOW_UNFREE=1
    export EDITOR="emacs"
  '';
  home.file.".config/shell/aliases".text = '' 
    #!/bin/sh
    #general aliases
    alias xi="doas xbps-install -S $1"
    alias nf="clear && fastfetch"
    alias ascdis="fastfetch --logo $1"
    alias forge="su forgejo"
    alias emoji="cat ~/.local/share/emoji | grep $1"
    alias cst="emacs ~/.suckless/st/config.h"
    alias las="ls"
    alias lasa="ls -a"
    alias lasal="ls -al"
    alias anal="ls -ahl"
    alias resmacs="systemctl --user restart emacsd"
    alias smi="nvidia-smi"
    alias src="source ~/.zshrc"
    alias bat="sb-battery"
    alias battery="sb-battery"
    alias vimrc="vim .vimrc"
    alias ri="ranger"
    alias rim="ranger"
    alias quit="exit"
    alias :q="exit"
    alias :q!="exit"
    alias :Q="exit"
    alias :Q!="exit"
    alias :quit="exit"
    alias :quit!="exit"
    alias :QUIT="exit"
    alias :QUIT!="exit"
    alias q="exit"
    alias fnl="fennel"
    alias "push"="git push -u origin main"
    alias irc="irssi"
    alias hsw="home-manager switch --flake ~/.config/home-manager"
    alias hsc="emacs ~/.config/home-manager/home.nix"
    alias yell="echo"
    alias chm="ecop cat ~/.config/home-manager/home.nix"
    if [ -n "$ZSH_VERSION"  ]; then
        alias ed="ed -p '%: '"
    else
        alias ed="ed -p '$: '"
    fi
    alias weather="curl wttr.in/masjedsoleyman"
    #typo/shortcut
    alias c="clear"
    alias cear="clear"
    alias "cd.."="cd .."
    alias claer="clear"
    alias claer="clear"
    alias clare="clear"
    alias cleae="clear"
    alias clera="clear"
    alias hotp="htop"
  '';
  home.file.".zshrc".text = ''
  #!/usr/bin/zsh
  HISTFILE=$HOME/.cache/zsh/history
  SAVEHIST=100000000
  HISTSIZE=$SAVEHIST
  setopt appendhistory
  #tab completion
  autoload -U compinit
  zstyle ':completion:*' menu select
  zmodload zsh/complist
  compinit
  _comp_options+=(globdots)
  #oh my zsh
  ZSH_THEME="gentoo"
  plugins=(git)
  export ZSH="$HOME/.oh-my-zsh"
  source $ZSH/oh-my-zsh.sh
  #eval
  eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
  #source
  source "$HOME/.config/shell/aliases"
  source "$HOME/.config/shell/exports"
  source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
  fpath=(/usr/share/zsh/site-functions $fpath)
  source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
  #colors
  autoload -U colors && colors
  setopt prompt_subst
  #prompt
  [ "$(id -u)" = 0 ] && PS1ICON="#" || PS1ICON='%'
  PROMPT='%{$(echo -e "\e[38;2;254;128;25m")%}[%{$(echo -e "\e[38;2;235;219;178m")%}%n%{$(echo -e "\e[38;2;200;200;200m")%}@%{$(echo -e "\e[38;2;131;165;152m")%}coast %{$(echo -e "\e[38;2;235;219;178m")%}%~%{$(echo -e "\e[38;2;254;128;25m")%}]%$PS1ICON%{$(echo -e "\e[0m")%} '
  '';

    programs.alacritty = {
    enable = true;
    settings = {
      window = {
        padding = {
          x = 4;
          y = 4;
        };
        decorations = "transparent";
        blur = true;
        opacity = 0.9;
      };
      font = {
        normal = {
          family = "monospace";
        };
        size = 9;
      };
      colors = {
#        primary = {
#          background = "0x1e1e2e";
#          foreground = "0xcdd6f4";
#        };
        cursor = {
          text = "0x1e1e2e";
          cursor = "0xcdd6f4";
        };
      };
    };
  };

  programs.home-manager.enable = true;
}