From 1132f0a80323e3a2817090e0ac4b8ea8802e9e85 Mon Sep 17 00:00:00 2001 From: Nikos Papadakis Date: Sun, 24 Sep 2023 15:07:57 +0300 Subject: [PATCH] nix --- .editorconfig | 10 ++ README.md | 54 +++----- .../fish => }/completions/asdf.fish | 0 .../conf.d/ls_colors.fish => config.fish} | 27 ++++ fish/dot-config/fish/config.fish | 26 ---- .../fish => }/functions/fish_prompt.fish | 0 flake.lock | 105 +++++++++++++++ flake.nix | 41 ++++++ foot/{dot-config/foot => }/foot.ini | 0 git/dot-config/git/config | 14 -- home.nix | 60 +++++++++ justfile | 25 ---- .../nvim => }/after/plugin/lspconfig.lua | 0 .../nvim => }/after/plugin/lualine.lua | 0 .../nvim => }/after/plugin/nvim-cmp.lua | 0 .../nvim => }/after/plugin/telescope.lua | 0 .../nvim => }/after/plugin/treesitter.lua | 0 nvim/{dot-config/nvim => }/init.lua | 0 nvim/{dot-config/nvim => }/lazy-lock.json | 0 nvim/{dot-config/nvim => }/lua/my/keymaps.lua | 0 nvim/{dot-config/nvim => }/lua/my/resize.lua | 0 nvim/{dot-config/nvim => }/lua/my/tab.lua | 0 nvim/{dot-config/nvim => }/lua/my/utils.lua | 0 nvim/{dot-config/nvim => }/lua/plugins.lua | 0 nvim/{dot-config/nvim => }/spell/en.utf-8.add | 0 .../nvim => }/spell/en.utf-8.add.spl | Bin packages.nix | 7 + starship/dot-config/starship.toml | 123 ------------------ stylua.toml | 3 - wezterm/dot-config/wezterm/wezterm.lua | 57 -------- 30 files changed, 267 insertions(+), 285 deletions(-) create mode 100644 .editorconfig rename fish/{dot-config/fish => }/completions/asdf.fish (100%) rename fish/{dot-config/fish/conf.d/ls_colors.fish => config.fish} (93%) delete mode 100644 fish/dot-config/fish/config.fish rename fish/{dot-config/fish => }/functions/fish_prompt.fish (100%) create mode 100644 flake.lock create mode 100644 flake.nix rename foot/{dot-config/foot => }/foot.ini (100%) delete mode 100644 git/dot-config/git/config create mode 100644 home.nix delete mode 100644 justfile rename nvim/{dot-config/nvim => }/after/plugin/lspconfig.lua (100%) rename nvim/{dot-config/nvim => }/after/plugin/lualine.lua (100%) rename nvim/{dot-config/nvim => }/after/plugin/nvim-cmp.lua (100%) rename nvim/{dot-config/nvim => }/after/plugin/telescope.lua (100%) rename nvim/{dot-config/nvim => }/after/plugin/treesitter.lua (100%) rename nvim/{dot-config/nvim => }/init.lua (100%) rename nvim/{dot-config/nvim => }/lazy-lock.json (100%) rename nvim/{dot-config/nvim => }/lua/my/keymaps.lua (100%) rename nvim/{dot-config/nvim => }/lua/my/resize.lua (100%) rename nvim/{dot-config/nvim => }/lua/my/tab.lua (100%) rename nvim/{dot-config/nvim => }/lua/my/utils.lua (100%) rename nvim/{dot-config/nvim => }/lua/plugins.lua (100%) rename nvim/{dot-config/nvim => }/spell/en.utf-8.add (100%) rename nvim/{dot-config/nvim => }/spell/en.utf-8.add.spl (100%) create mode 100644 packages.nix delete mode 100644 starship/dot-config/starship.toml delete mode 100644 stylua.toml delete mode 100644 wezterm/dot-config/wezterm/wezterm.lua diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..af0959f --- /dev/null +++ b/.editorconfig @@ -0,0 +1,10 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true + +[*.nix] +indent_style = space +indent_size = 2 diff --git a/README.md b/README.md index 8e3dc8c..4d1ea38 100644 --- a/README.md +++ b/README.md @@ -1,46 +1,26 @@ -## Configurations +## Dotfiles - [Neovim Nightly](https://github.com/neovim/neovim) - [Fish Shell](https://github.com/fish-shell/fish-shell) - And more -Pick and choose - you might want to change some stuff (git config for example). - -## Fonts - -You will have to install the fonts I use in these dotfiles separately - -- [ttf-jetbrains-mono-nerd](https://github.com/ryanoasis/nerd-fonts) - -## Tools - -- [ripgrep](https://github.com/BurntSushi/ripgrep) `grep` alternative (used by nvim) -- [fd](https://github.com/sharkdp/fd) - `find` alternative (used by nvim) -- [lsd](https://github.com/lsd-rs/lsd) - `ls` alternative +See [packages.nix]() for a list of programs that I use, which `home-manager` +installs automatically. ## Usage +Either copy and paste anything you like, or use *Nix* +[home-manager](https://github.com/nix-community/home-manager) (recommended) + - Clone the repository (e.g into `~/.dotfiles`) - -``` -git clone https://git.nikos.gg/nikos/dotfiles.git ~/.dotfiles -cd ~/.dotfiles -``` - -- For automated dotfile linking use [just](https://github.com/casey/just) -- Use `just add target` where target is the config directory - -``` -cd ~/.dotfiles -just add fish -just add nvim -just add wezterm -``` - -- Or, manually link the directory you need - -``` -ln -s ~/.dotfiles/fish/dot-config/fish ~/.config/fish -ln -s ~/.dotfiles/nvim/dot-config/nvim ~/.config/nvim -ln -s ~/.dotfiles/wezterm/dot-config/wezterm ~/.config/wezterm -``` +- `cd ~/.dotfiles` +- Install [Nix](https://nixos.org/download) +- Enable `flakes`: + - Using your editor, open the nix configuration (`/etc/nix/nix.conf`) + - Add the following line: `experimental-features = nix-command flakes` +- Edit `flakes.nix`, `home.nix` and `packages.nix` to your liking (add/remove + packages, configs, etc.) +- **Double check your nix config**, you'll probably want to edit them for yourself, + especially things like the git config +- On your first run: `nix run home-manager/master -- switch --flake ~/.dotfiles` +- On subsequent runs: `home-manager switch --flake ~/.dotfiles` diff --git a/fish/dot-config/fish/completions/asdf.fish b/fish/completions/asdf.fish similarity index 100% rename from fish/dot-config/fish/completions/asdf.fish rename to fish/completions/asdf.fish diff --git a/fish/dot-config/fish/conf.d/ls_colors.fish b/fish/config.fish similarity index 93% rename from fish/dot-config/fish/conf.d/ls_colors.fish rename to fish/config.fish index 698a16a..7eb114a 100644 --- a/fish/dot-config/fish/conf.d/ls_colors.fish +++ b/fish/config.fish @@ -1 +1,28 @@ +set -U fish_greeting + +alias lsd="lsd --group-directories-first" +alias newkey="gpg-connect-agent \"scd serialno\" \"learn --force\" /bye" +alias usepodman="set -x -g DOCKER_HOST unix://(podman info --format '{{.Host.RemoteSocket.Path}}')" +abbr gs git status +abbr gc git commit +abbr gap git add -p +abbr gps git push +abbr gpl git pull +type -q nvim && abbr vim nvim +type -q doas && abbr sudo doas +if type -q lsd + abbr ls lsd + abbr ll lsd -l + abbr la lsd -la + abbr llg lsd -lg +end + +# Environment variables +set -x -g RUSTUP_HOME $XDG_DATA_HOME/rustup +set -x -g CARGO_HOME $HOME/.cargo +set -x -g PATH $CARGO_HOME/bin $RUSTUP_HOME/bin $HOME/.local/bin $PATH + +type -q zoxide && zoxide init fish | source +test -e ~/.asdf && source ~/.asdf/asdf.fish + setenv LS_COLORS '*.7z=38;5;40:*.WARC=38;5;40:*.a=38;5;40:*.arj=38;5;40:*.br=38;5;40:*.bz2=38;5;40:*.cpio=38;5;40:*.gz=38;5;40:*.lrz=38;5;40:*.lz=38;5;40:*.lzma=38;5;40:*.lzo=38;5;40:*.rar=38;5;40:*.s7z=38;5;40:*.sz=38;5;40:*.tar=38;5;40:*.tbz=38;5;40:*.tgz=38;5;40:*.warc=38;5;40:*.xz=38;5;40:*.z=38;5;40:*.zip=38;5;40:*.zipx=38;5;40:*.zoo=38;5;40:*.zpaq=38;5;40:*.zst=38;5;40:*.zstd=38;5;40:*.zz=38;5;40:*@.service=38;5;45:*AUTHORS=38;5;220;1:*CHANGELOG=38;5;220;1:*CHANGELOG.md=38;5;220;1:*CHANGES=38;5;220;1:*CODEOWNERS=38;5;220;1:*CONTRIBUTING=38;5;220;1:*CONTRIBUTING.md=38;5;220;1:*CONTRIBUTORS=38;5;220;1:*COPYING=38;5;220;1:*COPYRIGHT=38;5;220;1:*CodeResources=38;5;239:*Dockerfile=38;5;155:*HISTORY=38;5;220;1:*INSTALL=38;5;220;1:*LICENSE=38;5;220;1:*LICENSE.md=38;5;220;1:*LS_COLORS=48;5;89;38;5;197;1;3;4;7:*MANIFEST=38;5;243:*Makefile=38;5;155:*NOTICE=38;5;220;1:*PATENTS=38;5;220;1:*PkgInfo=38;5;239:*README=38;5;220;1:*README.md=38;5;220;1:*README.rst=38;5;220;1:*VERSION=38;5;220;1:*authorized_keys=1:*cfg=1:*conf=1:*config=1:*core=38;5;241:*id_dsa=38;5;192;3:*id_ecdsa=38;5;192;3:*id_ed25519=38;5;192;3:*id_rsa=38;5;192;3:*known_hosts=1:*lock=38;5;248:*lockfile=38;5;248:*pm_to_blib=38;5;240:*rc=1:*.1p=38;5;7:*.32x=38;5;213:*.3g2=38;5;115:*.3ga=38;5;137;1:*.3gp=38;5;115:*.3p=38;5;7:*.82p=38;5;121:*.83p=38;5;121:*.8eu=38;5;121:*.8xe=38;5;121:*.8xp=38;5;121:*.A64=38;5;213:*.BAT=38;5;172:*.BUP=38;5;241:*.C=38;5;81:*.CFUserTextEncoding=38;5;239:*.DS_Store=38;5;239:*.F=38;5;81:*.F03=38;5;81:*.F08=38;5;81:*.F90=38;5;81:*.F95=38;5;81:*.H=38;5;110:*.IFO=38;5;114:*.JPG=38;5;97:*.M=38;5;110:*.MOV=38;5;114:*.PDF=38;5;141:*.PFA=38;5;66:*.PL=38;5;160:*.R=38;5;49:*.RData=38;5;178:*.Rproj=38;5;11:*.S=38;5;110:*.S3M=38;5;137;1:*.SKIP=38;5;244:*.TIFF=38;5;97:*.VOB=38;5;115;1:*.a00=38;5;213:*.a52=38;5;213:*.a64=38;5;213:*.a78=38;5;213:*.aac=38;5;137;1:*.accdb=38;5;60:*.accde=38;5;60:*.accdr=38;5;60:*.accdt=38;5;60:*.adf=38;5;213:*.adoc=38;5;184:*.afm=38;5;66:*.agda=38;5;81:*.agdai=38;5;110:*.ahk=38;5;41:*.ai=38;5;99:*.aiff=38;5;136;1:*.alac=38;5;136;1:*.allow=38;5;112:*.am=38;5;242:*.amr=38;5;137;1:*.ape=38;5;136;1:*.apk=38;5;215:*.application=38;5;116:*.aria2=38;5;241:*.asc=38;5;192;3:*.asciidoc=38;5;184:*.asf=38;5;115:*.asm=38;5;81:*.ass=38;5;117:*.astro=38;5;135;1:*.atr=38;5;213:*.au=38;5;137;1:*.automount=38;5;45:*.avi=38;5;114:*.awk=38;5;172:*.bak=38;5;241:*.bash=38;5;172:*.bash_login=1:*.bash_logout=1:*.bash_profile=1:*.bat=38;5;172:*.bfe=38;5;192;3:*.bib=38;5;178:*.bin=38;5;124:*.bmp=38;5;97:*.bsp=38;5;215:*.c=38;5;81:*.c++=38;5;81:*.cab=38;5;215:*.caf=38;5;137;1:*.cap=38;5;29:*.car=38;5;57:*.cbr=38;5;141:*.cbz=38;5;141:*.cc=38;5;81:*.cda=38;5;136;1:*.cdi=38;5;213:*.cdr=38;5;97:*.chm=38;5;141:*.cjs=38;5;074;1:*.cl=38;5;81:*.clj=38;5;41:*.cljc=38;5;41:*.cljs=38;5;41:*.cljw=38;5;41:*.cnc=38;5;7:*.coffee=38;5;079;1:*.comp=38;5;136:*.cp=38;5;81:*.cpp=38;5;81:*.cr=38;5;81:*.crx=38;5;215:*.cs=38;5;81:*.css=38;5;105;1:*.csv=38;5;78:*.ctp=38;5;81:*.cue=38;5;116:*.cxx=38;5;81:*.dart=38;5;51:*.dat=38;5;137;1:*.db=38;5;60:*.deb=38;5;215:*.def=38;5;7:*.deny=38;5;196:*.description=38;5;116:*.device=38;5;45:*.dhall=38;5;178:*.dicom=38;5;97:*.diff=48;5;197;38;5;232:*.directory=38;5;116:*.divx=38;5;114:*.djvu=38;5;141:*.dll=38;5;241:*.dmg=38;5;215:*.dmp=38;5;29:*.doc=38;5;111:*.dockerignore=38;5;240:*.docm=38;5;111;4:*.docx=38;5;111:*.drw=38;5;99:*.dtd=38;5;178:*.dts=38;5;137;1:*.dump=38;5;241:*.dwg=38;5;216:*.dylib=38;5;241:*.ear=38;5;215:*.ejs=38;5;135;1:*.el=38;5;81:*.elc=38;5;241:*.eln=38;5;241:*.eml=38;5;90;1:*.enc=38;5;192;3:*.entitlements=1:*.epf=1:*.eps=38;5;99:*.epsf=38;5;99:*.epub=38;5;141:*.err=38;5;160;1:*.error=38;5;160;1:*.etx=38;5;184:*.ex=38;5;7:*.example=38;5;7:*.f=38;5;81:*.f03=38;5;81:*.f08=38;5;81:*.f4v=38;5;115:*.f90=38;5;81:*.f95=38;5;81:*.fcm=38;5;137;1:*.feature=38;5;7:*.fish=38;5;172:*.flac=38;5;136;1:*.flif=38;5;97:*.flv=38;5;115:*.fm2=38;5;213:*.fmp12=38;5;60:*.fnt=38;5;66:*.fon=38;5;66:*.for=38;5;81:*.fp7=38;5;60:*.frag=38;5;136:*.ftn=38;5;81:*.fvd=38;5;124:*.fxml=38;5;178:*.gb=38;5;213:*.gba=38;5;213:*.gbc=38;5;213:*.gbr=38;5;7:*.gel=38;5;213:*.gemspec=38;5;41:*.ger=38;5;7:*.gg=38;5;213:*.ggl=38;5;213:*.gif=38;5;97:*.git=38;5;197:*.gitattributes=38;5;240:*.github=38;5;197:*.gitignore=38;5;240:*.gitmodules=38;5;240:*.go=38;5;81:*.gp3=38;5;115:*.gp4=38;5;115:*.gpg=38;5;192;3:*.gs=38;5;81:*.h=38;5;110:*.h++=38;5;110:*.hi=38;5;110:*.hidden-color-scheme=1:*.hidden-tmTheme=1:*.hin=38;5;242:*.hjson=38;5;178:*.hpp=38;5;110:*.hs=38;5;81:*.htm=38;5;125;1:*.html=38;5;125;1:*.http=38;5;90;1:*.hxx=38;5;110:*.icns=38;5;97:*.ico=38;5;97:*.ics=38;5;7:*.ii=38;5;110:*.img=38;5;124:*.iml=38;5;166:*.in=38;5;242:*.info=38;5;184:*.ini=1:*.ipa=38;5;215:*.ipk=38;5;213:*.ipynb=38;5;41:*.iso=38;5;124:*.j64=38;5;213:*.jad=38;5;215:*.jar=38;5;215:*.java=38;5;079;1:*.jhtm=38;5;125;1:*.jpeg=38;5;97:*.jpg=38;5;97:*.js=38;5;074;1:*.jsm=38;5;079;1:*.json=38;5;178:*.json5=38;5;178:*.jsonc=38;5;178:*.jsonl=38;5;178:*.jsonnet=38;5;178:*.jsp=38;5;079;1:*.jsx=38;5;074;1:*.jxl=38;5;97:*.kak=38;5;172:*.key=38;5;166:*.lagda=38;5;81:*.lagda.md=38;5;81:*.lagda.rst=38;5;81:*.lagda.tex=38;5;81:*.last-run=1:*.less=38;5;105;1:*.lhs=38;5;81:*.libsonnet=38;5;142:*.lisp=38;5;81:*.lnk=38;5;39:*.localized=38;5;239:*.localstorage=38;5;60:*.log=38;5;190:*.lua=38;5;81:*.m=38;5;110:*.m2v=38;5;114:*.m3u=38;5;116:*.m3u8=38;5;116:*.m4=38;5;242:*.m4a=38;5;137;1:*.m4v=38;5;114:*.map=38;5;7:*.markdown=38;5;184:*.md=38;5;184:*.md5=38;5;116:*.mdb=38;5;60:*.mde=38;5;60:*.mdump=38;5;241:*.mdx=38;5;184:*.merged-ca-bundle=1:*.mf=38;5;7:*.mfasl=38;5;7:*.mht=38;5;125;1:*.mi=38;5;7:*.mid=38;5;136;1:*.midi=38;5;136;1:*.mjs=38;5;074;1:*.mkd=38;5;184:*.mkv=38;5;114:*.ml=38;5;81:*.mm=38;5;7:*.mobi=38;5;141:*.mod=38;5;137;1:*.moon=38;5;81:*.mount=38;5;45:*.mov=38;5;114:*.mp3=38;5;137;1:*.mp4=38;5;114:*.mp4a=38;5;137;1:*.mpeg=38;5;114:*.mpg=38;5;114:*.msg=38;5;178:*.msql=38;5;222:*.mtx=38;5;7:*.mustache=38;5;135;1:*.mysql=38;5;222:*.nc=38;5;60:*.ndjson=38;5;178:*.nds=38;5;213:*.nes=38;5;213:*.nfo=38;5;184:*.nib=38;5;57:*.nim=38;5;81:*.nimble=38;5;81:*.nix=38;5;155:*.norg=38;5;184:*.nrg=38;5;124:*.nth=38;5;97:*.numbers=38;5;112:*.o=38;5;241:*.odb=38;5;111:*.odp=38;5;166:*.ods=38;5;112:*.odt=38;5;111:*.oga=38;5;137;1:*.ogg=38;5;137;1:*.ogm=38;5;114:*.ogv=38;5;115:*.old=38;5;242:*.opus=38;5;137;1:*.org=38;5;184:*.orig=38;5;241:*.otf=38;5;66:*.out=38;5;242:*.p12=38;5;192;3:*.p7s=38;5;192;3:*.pacnew=38;5;33:*.pages=38;5;111:*.pak=38;5;215:*.part=38;5;239:*.patch=48;5;197;38;5;232;1:*.path=38;5;45:*.pbxproj=1:*.pc=38;5;7:*.pcap=38;5;29:*.pcb=38;5;7:*.pcf=1:*.pcm=38;5;136;1:*.pdf=38;5;141:*.pem=38;5;192;3:*.pfa=38;5;66:*.pfb=38;5;66:*.pfm=38;5;66:*.pgn=38;5;178:*.pgp=38;5;192;3:*.pgsql=38;5;222:*.php=38;5;81:*.pi=38;5;7:*.pid=38;5;248:*.pk3=38;5;215:*.pl=38;5;208:*.plist=1:*.plt=38;5;7:*.ply=38;5;216:*.pm=38;5;203:*.png=38;5;97:*.pod=38;5;184:*.pot=38;5;7:*.pps=38;5;166:*.ppt=38;5;166:*.ppts=38;5;166:*.pptsm=38;5;166;4:*.pptx=38;5;166:*.pptxm=38;5;166;4:*.profile=1:*.properties=38;5;116:*.ps=38;5;99:*.psd=38;5;97:*.psf=1:*.pug=38;5;135;1:*.pxd=38;5;97:*.pxm=38;5;97:*.py=38;5;41:*.pyc=38;5;240:*.qcow=38;5;124:*.r=38;5;49:*.r[0-9]{0,2}=38;5;239:*.rake=38;5;155:*.rb=38;5;41:*.rdata=38;5;178:*.rdf=38;5;7:*.rkt=38;5;81:*.rlib=38;5;241:*.rmvb=38;5;114:*.rnc=38;5;178:*.rng=38;5;178:*.rom=38;5;213:*.rpm=38;5;215:*.rs=38;5;81:*.rss=38;5;178:*.rst=38;5;184:*.rstheme=1:*.rtf=38;5;111:*.ru=38;5;7:*.s=38;5;110:*.s3m=38;5;137;1:*.sample=38;5;114:*.sass=38;5;105;1:*.sassc=38;5;244:*.sav=38;5;213:*.sc=38;5;41:*.scala=38;5;41:*.scan=38;5;242:*.sch=38;5;7:*.scm=38;5;7:*.scpt=38;5;219:*.scss=38;5;105;1:*.sed=38;5;172:*.service=38;5;45:*.sfv=38;5;116:*.sgml=38;5;178:*.sh=38;5;172:*.sid=38;5;137;1:*.sig=38;5;192;3:*.signature=38;5;192;3:*.sis=38;5;7:*.sms=38;5;213:*.snapshot=38;5;45:*.socket=38;5;45:*.sparseimage=38;5;124:*.spl=38;5;7:*.spv=38;5;217:*.sql=38;5;222:*.sqlite=38;5;60:*.srt=38;5;117:*.ssa=38;5;117:*.st=38;5;213:*.stackdump=38;5;241:*.state=38;5;248:*.stderr=38;5;160;1:*.stl=38;5;216:*.storyboard=38;5;196:*.strings=1:*.sty=38;5;7:*.sub=38;5;117:*.sublime-build=1:*.sublime-commands=1:*.sublime-keymap=1:*.sublime-project=1:*.sublime-settings=1:*.sublime-snippet=1:*.sublime-workspace=1:*.sug=38;5;7:*.sup=38;5;117:*.svelte=38;5;135;1:*.svg=38;5;99:*.swap=38;5;45:*.swift=38;5;219:*.swo=38;5;244:*.swp=38;5;244:*.sx=38;5;81:*.t=38;5;114:*.target=38;5;45:*.tcc=38;5;110:*.tcl=38;5;64;1:*.tdy=38;5;7:*.tex=38;5;184:*.textile=38;5;184:*.tf=38;5;168:*.tfm=38;5;7:*.tfnt=38;5;7:*.tfstate=38;5;168:*.tfvars=38;5;168:*.tg=38;5;7:*.theme=38;5;116:*.tif=38;5;97:*.tiff=38;5;97:*.timer=38;5;45:*.tmTheme=1:*.tmp=38;5;244:*.toast=38;5;124:*.toml=38;5;178:*.torrent=38;5;116:*.ts=38;5;074;1:*.tsv=38;5;78:*.tsx=38;5;074;1:*.ttf=38;5;66:*.twig=38;5;81:*.txt=38;5;253:*.typelib=38;5;60:*.un~=38;5;241:*.urlview=38;5;116:*.user-ca-bundle=1:*.v=38;5;81:*.vala=38;5;81:*.vapi=38;5;81:*.vb=38;5;81:*.vba=38;5;81:*.vbs=38;5;81:*.vcard=38;5;7:*.vcd=38;5;124:*.vcf=38;5;7:*.vdf=38;5;215:*.vdi=38;5;124:*.vert=38;5;136:*.vfd=38;5;124:*.vhd=38;5;124:*.vhdx=38;5;124:*.vim=38;5;172:*.viminfo=1:*.vmdk=38;5;124:*.vob=38;5;115;1:*.vpk=38;5;215:*.vtt=38;5;117:*.vue=38;5;135;1:*.war=38;5;215:*.wav=38;5;136;1:*.webloc=38;5;116:*.webm=38;5;115:*.webp=38;5;97:*.wgsl=38;5;97:*.wma=38;5;137;1:*.wmv=38;5;114:*.woff=38;5;66:*.woff2=38;5;66:*.wrl=38;5;216:*.wv=38;5;136;1:*.wvc=38;5;136;1:*.xcconfig=1:*.xcf=38;5;7:*.xcsettings=1:*.xcuserstate=1:*.xcworkspacedata=1:*.xib=38;5;208:*.xla=38;5;76:*.xln=38;5;7:*.xls=38;5;112:*.xlsx=38;5;112:*.xlsxm=38;5;112;4:*.xltm=38;5;73;4:*.xltx=38;5;73:*.xml=38;5;178:*.xpi=38;5;215:*.xpm=38;5;97:*.xsd=38;5;178:*.xsh=38;5;41:*.yaml=38;5;178:*.yml=38;5;178:*.z[0-9]{0,2}=38;5;239:*.zcompdump=38;5;241:*.zig=38;5;81:*.zlogin=1:*.zlogout=1:*.zprofile=1:*.zsh=38;5;172:*.zshenv=1:*.zwc=38;5;241:*.zx[0-9]{0,2}=38;5;239:bd=38;5;68:ca=38;5;17:cd=38;5;113;1:di=38;5;30:do=38;5;127:ex=38;5;208;1:pi=38;5;126:fi=0:ln=target:mh=38;5;222;1:no=0:or=48;5;196;38;5;232;1:ow=38;5;220;1:sg=48;5;3;38;5;0:su=38;5;220;1;3;100;1:so=38;5;197:st=38;5;86;48;5;234:tw=48;5;235;38;5;139;3:' diff --git a/fish/dot-config/fish/config.fish b/fish/dot-config/fish/config.fish deleted file mode 100644 index 4beb790..0000000 --- a/fish/dot-config/fish/config.fish +++ /dev/null @@ -1,26 +0,0 @@ -set -U fish_greeting - -alias lsd="lsd --group-directories-first" -alias newkey="gpg-connect-agent \"scd serialno\" \"learn --force\" /bye" -alias usepodman="set -x -g DOCKER_HOST unix://(podman info --format '{{.Host.RemoteSocket.Path}}')" -abbr gs git status -abbr gc git commit -abbr gap git add -p -abbr gps git push -abbr gpl git pull -type -q nvim && abbr vim nvim -type -q doas && abbr sudo doas -if type -q lsd - abbr ls lsd - abbr ll lsd -l - abbr la lsd -la - abbr llg lsd -lg -end - -# Environment variables -set -x -g RUSTUP_HOME $XDG_DATA_HOME/rustup -set -x -g CARGO_HOME $HOME/.cargo -set -x -g PATH $CARGO_HOME/bin $RUSTUP_HOME/bin $HOME/.local/bin $PATH - -type -q zoxide && zoxide init fish | source -test -e ~/.asdf && source ~/.asdf/asdf.fish diff --git a/fish/dot-config/fish/functions/fish_prompt.fish b/fish/functions/fish_prompt.fish similarity index 100% rename from fish/dot-config/fish/functions/fish_prompt.fish rename to fish/functions/fish_prompt.fish diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..50f543b --- /dev/null +++ b/flake.lock @@ -0,0 +1,105 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1685518550, + "narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1695550077, + "narHash": "sha256-xoxR/iY69/3lTnnZDP6gf3J46DUKPcf+Y1jH03tfZXE=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "a88df2fb101778bfd98a17556b3a2618c6c66091", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "neovim": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "dir": "contrib", + "lastModified": 1695564269, + "narHash": "sha256-hawh5Z4NCiFV7KRLBZBAPNLUPqk/SGOJF/0d3jz8BW8=", + "owner": "neovim", + "repo": "neovim", + "rev": "61ecb3e16c22eec9cb8eb77f76d9e8ddfc3601bc", + "type": "github" + }, + "original": { + "dir": "contrib", + "owner": "neovim", + "repo": "neovim", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1695360818, + "narHash": "sha256-JlkN3R/SSoMTa+CasbxS1gq+GpGxXQlNZRUh9+LIy/0=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "e35dcc04a3853da485a396bdd332217d0ac9054f", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "home-manager": "home-manager", + "neovim": "neovim", + "nixpkgs": "nixpkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..46cf59f --- /dev/null +++ b/flake.nix @@ -0,0 +1,41 @@ +{ + description = "Home Manager configuration"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + neovim = { + url = "github:neovim/neovim?dir=contrib"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + + outputs = { nixpkgs, home-manager, neovim, ... }: + let + system = "x86_64-linux"; # change your system type here + user = "nikos"; # change your user here + pkgs = nixpkgs.legacyPackages.${system}; + in + { + homeConfigurations.${user} = home-manager.lib.homeManagerConfiguration { + inherit pkgs; + + # Specify your home configuration modules here, for example, + # the path to your home.nix. + modules = [ + ./home.nix + + { + nixpkgs.overlays = [ + (final: prev: { + neovim = neovim.packages.${system}.neovim; + }) + ]; + } + ]; + }; + }; +} diff --git a/foot/dot-config/foot/foot.ini b/foot/foot.ini similarity index 100% rename from foot/dot-config/foot/foot.ini rename to foot/foot.ini diff --git a/git/dot-config/git/config b/git/dot-config/git/config deleted file mode 100644 index 4be0a4b..0000000 --- a/git/dot-config/git/config +++ /dev/null @@ -1,14 +0,0 @@ -[user] - email = nikos@papadakis.xyz - name = Nikos Papadakis - signingkey = 78871F9905ADFF02 -[pull] - rebase = true -[branch] - autosetuprebase = always -[gpg] - program = gpg2 -[commit] - gpgsign = true -[init] - defaultBranch = main diff --git a/home.nix b/home.nix new file mode 100644 index 0000000..3d0e549 --- /dev/null +++ b/home.nix @@ -0,0 +1,60 @@ +{ config, pkgs, lib, ... }: + +{ + home.username = "nikos"; + home.homeDirectory = "/home/nikos"; + + # This value determines the Home Manager release that your configuration is + # compatible with. This helps avoid breakage when a new Home Manager release + # introduces backwards incompatible changes. + # + # You should not change this value, even if you update Home Manager. If you do + # want to update the value, then make sure to first check the Home Manager + # release notes. + home.stateVersion = "23.05"; # Please read the comment before changing. + + # Home Manager is pretty good at managing dotfiles. The primary way to manage + # plain files is through 'home.file'. + home.file = { + ".config/nvim".source = ./nvim; + ".config/foot".source = ./foot; + }; + + # The home.packages option allows you to install Nix packages into your + # environment. + home.packages = import ./packages.nix pkgs; + + fonts.fontconfig.enable = true; + + programs.git = { + enable = true; + userName = "Nikos Papadakis"; + userEmail = "nikos@papadakis.xyz"; + signing.key = "78871F9905ADFF02"; + signing.signByDefault = true; + includes = [ + { + contents = { + init.defaultBranch = "main"; + pull.rebase = true; + }; + } + ]; + }; + + programs.fish = { + enable = true; + shellInit = builtins.readFile ./fish/config.fish; + functions = lib.attrsets.mapAttrs' + ( + name: value: { + name = builtins.replaceStrings [ ".fish" ] [ "" ] name; + value = builtins.readFile (./fish/functions + ("/" + name)); + } + ) + (builtins.readDir ./fish/functions); + }; + + # Let Home Manager install and manage itself. + programs.home-manager.enable = true; +} diff --git a/justfile b/justfile deleted file mode 100644 index 0dca51f..0000000 --- a/justfile +++ /dev/null @@ -1,25 +0,0 @@ -add target: - #!/bin/env sh - set -e - target={{trim_end_matches(target, '/')}} - find $target -mindepth 1 | while read p; do - t=~/`echo -n $p | sed "s/^$target\///" | sed s/dot-/./g` - s="{{justfile_directory()}}/$p" - if ( ! test -e $t ); then - echo "Linking $t -> $s" - ln -s $s $t - fi - done - -remove target: - #!/bin/env sh - set -e - target={{trim_end_matches(target, '/')}} - find $target -mindepth 1 | while read p; do - t=~/`echo -n $p | sed "s/^$target\///" | sed s/dot-/./g` - if ( test -L $t ); then - rm $t && echo "Removing $t" - fi - done - -# vim: set syntax=sh : diff --git a/nvim/dot-config/nvim/after/plugin/lspconfig.lua b/nvim/after/plugin/lspconfig.lua similarity index 100% rename from nvim/dot-config/nvim/after/plugin/lspconfig.lua rename to nvim/after/plugin/lspconfig.lua diff --git a/nvim/dot-config/nvim/after/plugin/lualine.lua b/nvim/after/plugin/lualine.lua similarity index 100% rename from nvim/dot-config/nvim/after/plugin/lualine.lua rename to nvim/after/plugin/lualine.lua diff --git a/nvim/dot-config/nvim/after/plugin/nvim-cmp.lua b/nvim/after/plugin/nvim-cmp.lua similarity index 100% rename from nvim/dot-config/nvim/after/plugin/nvim-cmp.lua rename to nvim/after/plugin/nvim-cmp.lua diff --git a/nvim/dot-config/nvim/after/plugin/telescope.lua b/nvim/after/plugin/telescope.lua similarity index 100% rename from nvim/dot-config/nvim/after/plugin/telescope.lua rename to nvim/after/plugin/telescope.lua diff --git a/nvim/dot-config/nvim/after/plugin/treesitter.lua b/nvim/after/plugin/treesitter.lua similarity index 100% rename from nvim/dot-config/nvim/after/plugin/treesitter.lua rename to nvim/after/plugin/treesitter.lua diff --git a/nvim/dot-config/nvim/init.lua b/nvim/init.lua similarity index 100% rename from nvim/dot-config/nvim/init.lua rename to nvim/init.lua diff --git a/nvim/dot-config/nvim/lazy-lock.json b/nvim/lazy-lock.json similarity index 100% rename from nvim/dot-config/nvim/lazy-lock.json rename to nvim/lazy-lock.json diff --git a/nvim/dot-config/nvim/lua/my/keymaps.lua b/nvim/lua/my/keymaps.lua similarity index 100% rename from nvim/dot-config/nvim/lua/my/keymaps.lua rename to nvim/lua/my/keymaps.lua diff --git a/nvim/dot-config/nvim/lua/my/resize.lua b/nvim/lua/my/resize.lua similarity index 100% rename from nvim/dot-config/nvim/lua/my/resize.lua rename to nvim/lua/my/resize.lua diff --git a/nvim/dot-config/nvim/lua/my/tab.lua b/nvim/lua/my/tab.lua similarity index 100% rename from nvim/dot-config/nvim/lua/my/tab.lua rename to nvim/lua/my/tab.lua diff --git a/nvim/dot-config/nvim/lua/my/utils.lua b/nvim/lua/my/utils.lua similarity index 100% rename from nvim/dot-config/nvim/lua/my/utils.lua rename to nvim/lua/my/utils.lua diff --git a/nvim/dot-config/nvim/lua/plugins.lua b/nvim/lua/plugins.lua similarity index 100% rename from nvim/dot-config/nvim/lua/plugins.lua rename to nvim/lua/plugins.lua diff --git a/nvim/dot-config/nvim/spell/en.utf-8.add b/nvim/spell/en.utf-8.add similarity index 100% rename from nvim/dot-config/nvim/spell/en.utf-8.add rename to nvim/spell/en.utf-8.add diff --git a/nvim/dot-config/nvim/spell/en.utf-8.add.spl b/nvim/spell/en.utf-8.add.spl similarity index 100% rename from nvim/dot-config/nvim/spell/en.utf-8.add.spl rename to nvim/spell/en.utf-8.add.spl diff --git a/packages.nix b/packages.nix new file mode 100644 index 0000000..eee2dac --- /dev/null +++ b/packages.nix @@ -0,0 +1,7 @@ +pkgs: with pkgs; [ + neovim # neovim nightly + ripgrep # "rg" cli, alternative to grep, used by nvim + fd # find alternative, used by nvim + lsd # "ls" alternative + (nerdfonts.override { fonts = [ "JetBrainsMono" ]; }) # nerdfonts jetbrains mono +] diff --git a/starship/dot-config/starship.toml b/starship/dot-config/starship.toml deleted file mode 100644 index 5b615f2..0000000 --- a/starship/dot-config/starship.toml +++ /dev/null @@ -1,123 +0,0 @@ -palette = "catppuccin_frappe" - -[character] -success_symbol = "[[♥](green) ❯](maroon)" -error_symbol = "[❯](red)" -vicmd_symbol = "[❮](green)" - -[directory] -truncation_length = 4 -# Catppuccin 'lavender' -style = "bold lavender" - -[palettes.catppuccin_macchiato] -rosewater = "#f4dbd6" -flamingo = "#f0c6c6" -pink = "#f5bde6" -mauve = "#c6a0f6" -red = "#ed8796" -maroon = "#ee99a0" -peach = "#f5a97f" -yellow = "#eed49f" -green = "#a6da95" -teal = "#8bd5ca" -sky = "#91d7e3" -sapphire = "#7dc4e4" -blue = "#8aadf4" -lavender = "#b7bdf8" -text = "#cad3f5" -subtext1 = "#b8c0e0" -subtext0 = "#a5adcb" -overlay2 = "#939ab7" -overlay1 = "#8087a2" -overlay0 = "#6e738d" -surface2 = "#5b6078" -surface1 = "#494d64" -surface0 = "#363a4f" -base = "#24273a" -mantle = "#1e2030" -crust = "#181926" - -[palettes.catppuccin_frappe] -rosewater = "#f2d5cf" -flamingo = "#eebebe" -pink = "#f4b8e4" -mauve = "#ca9ee6" -red = "#e78284" -maroon = "#ea999c" -peach = "#ef9f76" -yellow = "#e5c890" -green = "#a6d189" -teal = "#81c8be" -sky = "#99d1db" -sapphire = "#85c1dc" -blue = "#8caaee" -lavender = "#babbf1" -text = "#c6d0f5" -subtext1 = "#b5bfe2" -subtext0 = "#a5adce" -overlay2 = "#949cbb" -overlay1 = "#838ba7" -overlay0 = "#737994" -surface2 = "#626880" -surface1 = "#51576d" -surface0 = "#414559" -base = "#303446" -mantle = "#292c3c" -crust = "#232634" - -[palettes.catppuccin_latte] -rosewater = "#dc8a78" -flamingo = "#dd7878" -pink = "#ea76cb" -mauve = "#8839ef" -red = "#d20f39" -maroon = "#e64553" -peach = "#fe640b" -yellow = "#df8e1d" -green = "#40a02b" -teal = "#179299" -sky = "#04a5e5" -sapphire = "#209fb5" -blue = "#1e66f5" -lavender = "#7287fd" -text = "#4c4f69" -subtext1 = "#5c5f77" -subtext0 = "#6c6f85" -overlay2 = "#7c7f93" -overlay1 = "#8c8fa1" -overlay0 = "#9ca0b0" -surface2 = "#acb0be" -surface1 = "#bcc0cc" -surface0 = "#ccd0da" -base = "#eff1f5" -mantle = "#e6e9ef" -crust = "#dce0e8" - -[palettes.catppuccin_mocha] -rosewater = "#f5e0dc" -flamingo = "#f2cdcd" -pink = "#f5c2e7" -mauve = "#cba6f7" -red = "#f38ba8" -maroon = "#eba0ac" -peach = "#fab387" -yellow = "#f9e2af" -green = "#a6e3a1" -teal = "#94e2d5" -sky = "#89dceb" -sapphire = "#74c7ec" -blue = "#89b4fa" -lavender = "#b4befe" -text = "#cdd6f4" -subtext1 = "#bac2de" -subtext0 = "#a6adc8" -overlay2 = "#9399b2" -overlay1 = "#7f849c" -overlay0 = "#6c7086" -surface2 = "#585b70" -surface1 = "#45475a" -surface0 = "#313244" -base = "#1e1e2e" -mantle = "#181825" -crust = "#11111b" diff --git a/stylua.toml b/stylua.toml deleted file mode 100644 index 6a0d259..0000000 --- a/stylua.toml +++ /dev/null @@ -1,3 +0,0 @@ -indent_type = "Spaces" -indent_width = 4 -no_call_parentheses = true diff --git a/wezterm/dot-config/wezterm/wezterm.lua b/wezterm/dot-config/wezterm/wezterm.lua deleted file mode 100644 index 8a5553a..0000000 --- a/wezterm/dot-config/wezterm/wezterm.lua +++ /dev/null @@ -1,57 +0,0 @@ -local wezterm = require 'wezterm' - -return { - font = wezterm.font 'JetBrainsMono Nerd Font Mono', - color_scheme = 'Catppuccin Mocha', - harfbuzz_features = { "zero" }, - front_end = "Software", - use_fancy_tab_bar = true, - window_padding = { - left = 0, - right = 0, - top = 0, - bottom = 0, - }, - keys = { - { - key = '|', - mods = 'CTRL|SHIFT', - action = wezterm.action.SplitHorizontal, - }, - { - key = '"', - mods = 'CTRL|SHIFT', - action = wezterm.action.SplitVertical, - }, - { - key = 'h', - mods = 'CTRL|SHIFT', - action = wezterm.action.ActivatePaneDirection 'Left', - }, - { - key = 'j', - mods = 'CTRL|SHIFT', - action = wezterm.action.ActivatePaneDirection 'Down', - }, - { - key = 'k', - mods = 'CTRL|SHIFT', - action = wezterm.action.ActivatePaneDirection 'Up', - }, - { - key = 'l', - mods = 'CTRL|SHIFT', - action = wezterm.action.ActivatePaneDirection 'Right', - }, - { - key = '{', - mods = 'CTRL|SHIFT', - action = wezterm.action.ActivateTabRelative(-1), - }, - { - key = '}', - mods = 'CTRL|SHIFT', - action = wezterm.action.ActivateTabRelative(1), - }, - }, -}