Browse Source

add nixpkgs

master
Justin Duch 2 months ago
parent
commit
178855a507
  1. 46
      nix/.nixpkgs/darwin-configuration.nix
  2. 6
      nvim/.config/nvim/coc-settings.json
  3. 3
      nvim/.config/nvim/init.vim
  4. 3
      tmux/.tmux.conf
  5. 5
      zsh/.zshrc
  6. 1
      zsh/aliases.zsh

46
nix/.nixpkgs/darwin-configuration.nix

@ -0,0 +1,46 @@
{ config, pkgs, ... }:
{
# List packages installed in system profile. To search by name, run:
# $ nix-env -qaP | grep wget
environment.systemPackages = with pkgs; [
bat
emacs
fd
fzf
gh
hcloud
jq
kakoune
kubectx
kubectl
lsd
neovim
ripgrep
rnix-lsp
terraform
terraform-ls
vim
wget2
yarn
zoxide
zsh
zsh-completions
];
# Use a custom configuration.nix location.
# $ darwin-rebuild switch -I darwin-config=$HOME/.config/nixpkgs/darwin/configuration.nix
# environment.darwinConfig = "$HOME/.config/nixpkgs/darwin/configuration.nix";
# Auto upgrade nix package and the daemon service.
services.nix-daemon.enable = false;
# nix.package = pkgs.nix;
# Create /etc/bashrc that loads the nix-darwin environment.
programs.zsh.enable = true; # default shell on catalina
# programs.fish.enable = true;
# Used for backwards compatibility, please read the changelog before changing.
# $ darwin-rebuild changelog
system.stateVersion = 4;
}

6
nvim/.config/nvim/coc-settings.json

@ -2,6 +2,12 @@
"coc.preferences.formatOnSaveFiletypes": ["rs", "clj", "svelte", "tf"],
"codeLens.enable": true,
"languageserver": {
"nix": {
"command": "rnix-lsp",
"filetypes": [
"nix"
]
},
"rust": {
"command": "ra_lsp_server",
"filetypes": ["rust"],

3
nvim/.config/nvim/init.vim

@ -66,6 +66,7 @@ Plug 'purescript-contrib/purescript-vim'
Plug 'unisonweb/unison', { 'branch': 'trunk', 'rtp': 'editor-support/vim' }
Plug 'uarun/vim-protobuf'
Plug 'hashivim/vim-terraform'
Plug 'LnL7/vim-nix'
" display
Plug 'itchyny/lightline.vim'
@ -494,7 +495,7 @@ endfunc
" Term handling
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Set login shell for :terminal command so aliases work
set shell=/opt/homebrew/bin/zsh
set shell=/run/current-system/sw/bin/zsh
" When term starts, auto go into insert mode
autocmd TermOpen * startinsert

3
tmux/.tmux.conf

@ -1,10 +1,12 @@
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-logging'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'tmux-plugins/tmux-pain-control'
set -g @plugin 'tmux-plugins/tmux-sessionist'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g @plugin 'tmux-plugins/tmux-copycat'
set -g @plugin 'jabirali/tmux-tilish'
set -g @plugin 'fcsonline/tmux-thumbs'
@ -16,6 +18,7 @@ set -g base-index 1
set -s escape-time 0
set -g display-time 4000
set -g default-terminal "screen-256color"
set -g @continuum-restore 'on'
setw -g aggressive-resize on

5
zsh/.zshrc

@ -77,6 +77,8 @@ export DOTFILES="$HOME/.dotfiles"
export GOPATH="$HOME/go"
export KUBECONFIG="$HOME/.kube/config.yaml"
export NIX_PATH="darwin-config=/Users/justin/.nixpkgs/darwin-configuration.nix:/Users/justin/.nix-defexpr/channels"
fpath+=("${HOME}/.dotfiles/zsh/zfunc")
fpath+=("${HOME}/.config/hcloud/completion/zsh")
PATH="/opt/homebrew/bin:$PATH"
@ -152,3 +154,6 @@ eval "$(scw autocomplete script shell=zsh)"
# Kubectl autocomplete
source <(kubectl completion zsh)
# Nix
if [ -e /Users/justin/.nix-profile/etc/profile.d/nix.sh ]; then . /Users/justin/.nix-profile/etc/profile.d/nix.sh; fi

1
zsh/aliases.zsh

@ -83,6 +83,7 @@ alias cat="bat"
alias sed="gsed"
alias http="python3 -m http.server 8000 --bind 127.0.0.1"
alias contessh="/Users/justin/dev/git.waifu.church/justin/contessh/contessh.py"
alias wget="wget2"
# because I'm an idiot
alias rm="rm -i"
alias mv="mv -i"
Loading…
Cancel
Save