diff --git a/.config/home-manager/flake.lock b/.config/home-manager/flake.lock new file mode 100644 index 0000000..0935d23 --- /dev/null +++ b/.config/home-manager/flake.lock @@ -0,0 +1,47 @@ +{ + "nodes": { + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1748227609, + "narHash": "sha256-SaSdslyo6UGDpPUlmrPA4dWOEuxCy2ihRN9K6BnqYsA=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "d23d20f55d49d8818ac1f1b2783671e8a6725022", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1748190013, + "narHash": "sha256-R5HJFflOfsP5FBtk+zE8FpL8uqE7n62jqOsADvVshhE=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "62b852f6c6742134ade1abdd2a21685fd617a291", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-unstable", + "type": "indirect" + } + }, + "root": { + "inputs": { + "home-manager": "home-manager", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/.config/home-manager/flake.nix b/.config/home-manager/flake.nix new file mode 100644 index 0000000..2030861 --- /dev/null +++ b/.config/home-manager/flake.nix @@ -0,0 +1,26 @@ +{ + description = "Home Manager configuration of avery"; + + inputs = { + nixpkgs.url = "nixpkgs/nixos-unstable"; + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + + outputs = + { nixpkgs, home-manager, ... }: + let + system = "x86_64-linux"; + pkgs = nixpkgs.legacyPackages.${system}; + in + { + homeConfigurations."avery" = home-manager.lib.homeManagerConfiguration { + inherit pkgs; + + modules = [ ./home.nix ]; + + }; + }; +} diff --git a/.config/home-manager/home.nix b/.config/home-manager/home.nix new file mode 100644 index 0000000..6e03006 --- /dev/null +++ b/.config/home-manager/home.nix @@ -0,0 +1,265 @@ +# _ _ +#| |__ ___ _ __ ___ ___ _ __ (_)_ __ +#| '_ \ / _ \| '_ ` _ \ / _ \ | '_ \| \ \/ / +#| | | | (_) | | | | | | __/_| | | | |> < +#|_| |_|\___/|_| |_| |_|\___(_)_| |_|_/_/\_\ +#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 bat cbonsai bat ksh bat tree hyfetch qutebrowser xonsh elvish openjdk btop htop cpufetch lm_sensors ]; + 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 + ''; +#fastfetch + home.file.".config/fastfetch/config.jsonc".text = '' + { + "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", + "display": { + "separator": " :: " + }, + "logo": { + "type": "builtin", + "source": "arch2", + "width": 65, + "height": 35, + "padding": { + "top": 0, + "left": 0, + "right": 2 + } + }, + "modules": [ + "break", + "break", + "os", + "kernel", + "uptime", + { + "type": "packages", + "manager": ["nix-user", "pacman"] + }, + "shell", + "display", + "de", + { + "type": "cpu", + "format": "{name} ({cores-physical}C/{cores-logical}T) @ {freq-max}" + }, + "gpu", + { + "type": "memory", + "key": "Memory", + "percent": { + "type": 3, + "green": 30, + "yellow": 70 + } + }, + { + "type": "swap", + "key": "Swap", + "percent": { + "type": 3, + "green": 30, + "yellow": 70 + } + }, + { + "type": "disk", + "key": "Disk", + "percent": { + "type": 3, + "green": 30, + "yellow": 70 + } + }, + { + "type": "battery", + "key": "Battery", + "percent": { + "type": 3, + "green": 70, + "yellow": 30 + } + }, + "editor", + "locale", + "break" + ] +} + + ''; +#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 + nnoremap :NERDTreeToggle + 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 ascdis="fastfetch --logo $1" + alias forge="su forgejo" + alias emoji="cat ~/.local/share/emoji | grep $1" + alias cst="emacs ~/.suckless/st/config.h" + 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 + #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; +}