removed home-manager on macos

feat/kile-v2
Ricard Illa 2022-07-11 15:21:47 +02:00
parent 6bc2756cdd
commit 9f1188f2c3
20 changed files with 120 additions and 817 deletions

View File

@ -1,21 +1,21 @@
{ config, pkgs, ... }:
let
home-manager = builtins.fetchTarball {
url = "https://github.com/nix-community/home-manager/archive/master.tar.gz";
};
choose-pass =
pkgs.callPackage ./macos/choose-pass.nix { inherit config pkgs; };
in {
imports = [ "${home-manager}/nix-darwin" ./macos/desktop.nix ];
# List packages installed in system profile. To search by name, run:
# $ nix-env -qaP | grep wget
# environment.systemPackages = [ ];
environment.systemPackages = [
(pkgs.pass.withExtensions (exts: [ exts.pass-otp ]))
choose-pass
pkgs.alacritty
pkgs.ansible
pkgs.black
pkgs.cheat
pkgs.cmatrix
pkgs.colima
pkgs.coreutils-full
pkgs.csvkit
@ -23,25 +23,45 @@ in {
pkgs.docker-client
pkgs.docker-machine
pkgs.fzf
pkgs.getopt
pkgs.gnupg
pkgs.google-cloud-sdk
pkgs.hlint
pkgs.htop
pkgs.imagemagick
pkgs.jq
pkgs.khal
pkgs.khard
pkgs.libmysqlclient.dev
pkgs.mosh
pkgs.ncmpcpp
pkgs.neofetch
pkgs.pass
pkgs.neomutt
pkgs.newsboat
pkgs.nixfmt
pkgs.nodePackages.pyright
pkgs.openssh
pkgs.pinentry_mac
pkgs.pipenv
pkgs.python39Full
pkgs.python39Packages.virtualenvwrapper
pkgs.ripgrep
pkgs.shellcheck
pkgs.shfmt
pkgs.sqlfluff
pkgs.stow
pkgs.terraform
pkgs.tmux
pkgs.tree
pkgs.urlscan
pkgs.vagrant
pkgs.vdirsyncer
pkgs.virtualenv
pkgs.wget
pkgs.wireguard
pkgs.yubikey-personalization
pkgs.zsh
];
# Use a custom configuration.nix location.
# $ darwin-rebuild switch -I darwin-config=$HOME/.config/nixpkgs/darwin/configuration.nix
environment.darwinConfig = "/Users/rilla/configs/nix-config/echidna.nix";
@ -71,14 +91,35 @@ in {
brewfile = true;
noLock = true;
};
casks = [ "kmbmpdc" "librewolf" "virtualbox" ];
brews = [ "pyenv" "mpd" "choose-gui" "vitetris" ];
taps =
[ "homebrew/bundle" "homebrew/cask" "homebrew/core" "homebrew/services" ];
casks = [ "kmbmpdc" "librewolf" "virtualbox" "bluetility" ];
brews = [
"pyenv"
"pyenv-virtualenv"
"mpd"
"choose-gui"
"vitetris"
"yabai"
"skhd"
"spacebar"
"gnu-getopt"
"coreutils"
# "qmk"
# "dbt-bigquery"
];
taps = [
"homebrew/bundle"
"homebrew/cask"
"homebrew/core"
"homebrew/services"
"koekeishiya/formulae"
"cmacrae/formulae"
# "qmk/qmk"
# "dbt-labs/dbt"
];
};
fonts = {
enableFontDir = true;
fontDir.enable = true;
fonts = [
(pkgs.nerdfonts.override { fonts = [ "Hack" "MPlus" ]; })
pkgs.inter
@ -92,7 +133,5 @@ in {
home = "/Users/rilla";
};
home-manager.users.rilla = import ./home/echidna.nix;
system.stateVersion = 4;
}

View File

@ -1,136 +0,0 @@
{ config, pkgs, ... }:
{
imports = [ ./common.nix ];
programs.alacritty = {
settings = {
background_opacity = 0.9;
font = {
offset = {
x = 1;
y = 0;
};
size = 13;
};
window = {
padding = {
x = 5;
y = 5;
};
decorations = "none";
};
key_bindings = [
{key = "Key0"; mods = "Command"; action = "ResetFontSize";}
{key = "Key0"; mods = "Control"; action = "ResetFontSize";}
{key = "Equals"; mods = "Command"; action = "IncreaseFontSize";}
{key = "Equals"; mods = "Control"; action = "IncreaseFontSize";}
{key = "Minus"; mods = "Control"; action = "DecreaseFontSize";}
{key = "A"; mods = "Control"; chars = "\\x01";}
{key = "B"; mods = "Control"; chars = "\\x02";}
{key = "C"; mods = "Control"; chars = "\\x03";}
{key = "D"; mods = "Control"; chars = "\\x04";}
{key = "E"; mods = "Control"; chars = "\\x05";}
{key = "F"; mods = "Control"; chars = "\\x06";}
{key = "G"; mods = "Control"; chars = "\\x07";}
{key = "H"; mods = "Control"; chars = "\\x08";}
{key = "I"; mods = "Control"; chars = "\\x09";}
{key = "J"; mods = "Control"; chars = "\\x0A";}
{key = "K"; mods = "Control"; chars = "\\x0B";}
{key = "L"; mods = "Control"; chars = "\\x0C";}
{key = "M"; mods = "Control"; chars = "\\x0D";}
{key = "N"; mods = "Control"; chars = "\\x0E";}
{key = "O"; mods = "Control"; chars = "\\x0F";}
{key = "P"; mods = "Control"; chars = "\\x10";}
{key = "Q"; mods = "Control"; chars = "\\x11";}
{key = "R"; mods = "Control"; chars = "\\x12";}
{key = "S"; mods = "Control"; chars = "\\x13";}
{key = "T"; mods = "Control"; chars = "\\x14";}
{key = "U"; mods = "Control"; chars = "\\x15";}
{key = "V"; mods = "Control"; chars = "\\x16";}
{key = "W"; mods = "Control"; chars = "\\x17";}
{key = "X"; mods = "Control"; chars = "\\x18";}
{key = "Y"; mods = "Control"; chars = "\\x19";}
{key = "Z"; mods = "Control"; chars = "\\x1A";}
{key = "Key6"; mods = "Control|Shift"; chars = "\\x1E";} # Control + ^
{key = "Minus"; mods = "Control|Shift"; chars = "\\x1F";} # Control + _
{key = "A"; mods = "Alt"; chars = "\\x1ba";}
{key = "B"; mods = "Alt"; chars = "\\x1bb";}
{key = "C"; mods = "Alt"; chars = "\\x1bc";}
{key = "D"; mods = "Alt"; chars = "\\x1bd";}
{key = "E"; mods = "Alt"; chars = "\\x1be";}
{key = "F"; mods = "Alt"; chars = "\\x1bf";}
{key = "G"; mods = "Alt"; chars = "\\x1bg";}
{key = "H"; mods = "Alt"; chars = "\\x1bh";}
{key = "I"; mods = "Alt"; chars = "\\x1bi";}
{key = "J"; mods = "Alt"; chars = "\\x1bj";}
{key = "K"; mods = "Alt"; chars = "\\x1bk";}
{key = "L"; mods = "Alt"; chars = "\\x1bl";}
{key = "M"; mods = "Alt"; chars = "\\x1bm";}
{key = "N"; mods = "Alt"; chars = "\\x1bn";}
{key = "O"; mods = "Alt"; chars = "\\x1bo";}
{key = "P"; mods = "Alt"; chars = "\\x1bp";}
{key = "Q"; mods = "Alt"; chars = "\\x1bq";}
{key = "R"; mods = "Alt"; chars = "\\x1br";}
{key = "S"; mods = "Alt"; chars = "\\x1bs";}
{key = "T"; mods = "Alt"; chars = "\\x1bt";}
{key = "U"; mods = "Alt"; chars = "\\x1bu";}
{key = "V"; mods = "Alt"; chars = "\\x1bv";}
{key = "W"; mods = "Alt"; chars = "\\x1bw";}
{key = "X"; mods = "Alt"; chars = "\\x1bx";}
{key = "Y"; mods = "Alt"; chars = "\\x1by";}
{key = "Z"; mods = "Alt"; chars = "\\x1bz";}
{key = "A"; mods = "Alt|Shift"; chars = "\\x1bA";}
{key = "B"; mods = "Alt|Shift"; chars = "\\x1bB";}
{key = "C"; mods = "Alt|Shift"; chars = "\\x1bC";}
{key = "D"; mods = "Alt|Shift"; chars = "\\x1bD";}
{key = "E"; mods = "Alt|Shift"; chars = "\\x1bE";}
{key = "F"; mods = "Alt|Shift"; chars = "\\x1bF";}
{key = "G"; mods = "Alt|Shift"; chars = "\\x1bG";}
{key = "H"; mods = "Alt|Shift"; chars = "\\x1bH";}
{key = "I"; mods = "Alt|Shift"; chars = "\\x1bI";}
{key = "J"; mods = "Alt|Shift"; chars = "\\x1bJ";}
{key = "K"; mods = "Alt|Shift"; chars = "\\x1bK";}
{key = "L"; mods = "Alt|Shift"; chars = "\\x1bL";}
{key = "M"; mods = "Alt|Shift"; chars = "\\x1bM";}
{key = "N"; mods = "Alt|Shift"; chars = "\\x1bN";}
{key = "O"; mods = "Alt|Shift"; chars = "\\x1bO";}
{key = "P"; mods = "Alt|Shift"; chars = "\\x1bP";}
{key = "Q"; mods = "Alt|Shift"; chars = "\\x1bQ";}
{key = "R"; mods = "Alt|Shift"; chars = "\\x1bR";}
{key = "S"; mods = "Alt|Shift"; chars = "\\x1bS";}
{key = "T"; mods = "Alt|Shift"; chars = "\\x1bT";}
{key = "U"; mods = "Alt|Shift"; chars = "\\x1bU";}
{key = "V"; mods = "Alt|Shift"; chars = "\\x1bV";}
{key = "W"; mods = "Alt|Shift"; chars = "\\x1bW";}
{key = "X"; mods = "Alt|Shift"; chars = "\\x1bX";}
{key = "Y"; mods = "Alt|Shift"; chars = "\\x1bY";}
{key = "Z"; mods = "Alt|Shift"; chars = "\\x1bZ";}
{key = "Key1"; mods = "Alt"; chars = "\\x1b1";}
{key = "Key2"; mods = "Alt"; chars = "\\x1b2";}
{key = "Key3"; mods = "Alt"; chars = "\\x1b3";}
{key = "Key4"; mods = "Alt"; chars = "\\x1b4";}
{key = "Key5"; mods = "Alt"; chars = "\\x1b5";}
{key = "Key6"; mods = "Alt"; chars = "\\x1b6";}
{key = "Key7"; mods = "Alt"; chars = "\\x1b7";}
{key = "Key8"; mods = "Alt"; chars = "\\x1b8";}
{key = "Key9"; mods = "Alt"; chars = "\\x1b9";}
{key = "Key0"; mods = "Alt"; chars = "\\x1b0";}
{key = "Space"; mods = "Control"; chars = "\\x00";} # Ctrl + Space
{key = "Grave"; mods = "Alt"; chars = "\\x1b`";} # Alt + `
{key = "Grave"; mods = "Alt|Shift"; chars = "\\x1b~";} # Alt + ~
{key = "Period"; mods = "Alt"; chars = "\\x1b.";} # Alt + .
{key = "Key8"; mods = "Alt|Shift"; chars = "\\x1b*";} # Alt + *
{key = "Key3"; mods = "Alt|Shift"; chars = "\\x1b#";} # Alt + #
{key = "Period"; mods = "Alt|Shift"; chars = "\\x1b>";} # Alt + >
{key = "Comma"; mods = "Alt|Shift"; chars = "\\x1b<";} # Alt + <
{key = "Minus"; mods = "Alt|Shift"; chars = "\\x1b_";} # Alt + _
{key = "Key5"; mods = "Alt|Shift"; chars = "\\x1b%";} # Alt + %
{key = "Key6"; mods = "Alt|Shift"; chars = "\\x1b^";} # Alt + ^
{key = "Backslash"; mods = "Alt"; chars = "\\x1b";} # Alt + \
{key = "Backslash"; mods = "Alt|Shift"; chars = "\\x1b|";} # Alt + |
];
};
};
}

View File

@ -1,14 +0,0 @@
{ config, pkgs, ... }:
let
shell = "${pkgs.dash}/bin/dash";
vdirsyncer = "${pkgs.vdirsyncer}/bin/vdirsyncer";
mkdir = "${pkgs.coreutils}/bin/mkdir";
cat = "${pkgs.coreutils}/bin/cat";
dirname = "${pkgs.coreutils}/bin/dirname";
in
pkgs.writeScriptBin "davsync" ''
#!${shell}
${vdirsyncer} discover && \
${vdirsyncer} sync
''

View File

@ -1,9 +0,0 @@
{ config, pkgs, ... }:
let
davsync =
pkgs.callPackage ./davsync_macos.nix { inherit config pkgs; };
in {
imports = [ ./common.nix ];
home.packages = [ davsync pkgs.vdirsyncer pkgs.khal pkgs.khard ];
}

View File

@ -1,24 +0,0 @@
{ config, pkgs, ... }:
{
home.username = "rilla";
home.homeDirectory = "/Users/rilla";
imports = [
./alacritty/macos.nix
./cheat
./dav/macos.nix
./gcloud
./git/echidna.nix
./gpg/macos.nix
./mail/macos.nix
./mpd/macos.nix
./neovim/macos.nix
./pass/macos.nix
./rss
./ssh
./tmux
./vitetris/macos.nix
./zsh/macos.nix
];
}

View File

@ -23,7 +23,7 @@
".config/gcloud/configurations/config_lidl".text = ''
[core]
account = terraform@lidl-shopdaten.iam.gserviceaccount.com
account = 95037132@lidl.de
project = lidl-shopdaten
'';

View File

@ -1,43 +0,0 @@
{ config, pkgs, ... }:
let
pinentry =
"${pkgs.pinentry_mac}/Applications/pinentry-mac.app/Contents/MacOS/pinentry-mac";
in {
home.packages = [ pkgs.gnupg pkgs.pinentry_mac ];
home.file.".gnupg/gpg-agent.conf".text = ''
enable-ssh-support
default-cache-ttl 60
max-cache-ttl 120
display :0
pinentry-program ${pinentry}
log-file ${config.home.homeDirectory}/.local/var/log/gpg-agent.log
'';
home.file.".gnupg/gpg.conf".text = ''
personal-cipher-preferences AES256 AES192 AES
personal-digest-preferences SHA512 SHA384 SHA256
personal-compress-preferences ZLIB BZIP2 ZIP Uncompressed
default-preference-list SHA512 SHA384 SHA256 AES256 AES192 AES ZLIB BZIP2 ZIP Uncompressed
cert-digest-algo SHA512
s2k-digest-algo SHA512
s2k-cipher-algo AES256
charset utf-8
fixed-list-mode
no-comments
no-emit-version
keyid-format 0xlong
list-options show-uid-validity
verify-options show-uid-validity
with-fingerprint
require-cross-certification
use-agent
'';
home.file.".gnupg/scdaemon.conf".text = ''
disable-ccid
reader-port "Yubico YubiKey OTP+FIDO+CCID"
'';
}

View File

@ -1,8 +0,0 @@
{ config, pkgs, ... }:
let mailsync = pkgs.callPackage ./mailsync_macos.nix { inherit config pkgs; };
in {
imports = [ ./common.nix ];
home.packages = [ mailsync pkgs.urlscan ];
programs.alot.enable = false;
}

View File

@ -9,6 +9,7 @@ let
awk = "${pkgs.gawk}/bin/awk";
perl = "${pkgs.perl}/bin/perl";
find = "${pkgs.findutils}/bin/find";
notifySend = "${pkgs.libnotify}/bin/notify-send";
notmuch = "${pkgs.notmuch}/bin/notmuch";
head = "${pkgs.coreutils}/bin/head";

View File

@ -1,132 +0,0 @@
{ config, pkgs, ... }:
let
shell = "${pkgs.dash}/bin/dash";
pidof = "${pkgs.procps}/bin/pidof";
pgrep = "${pkgs.procps}/bin/pgrep";
grep = "${pkgs.gnugrep}/bin/grep";
sed = "${pkgs.gnused}/bin/sed";
awk = "${pkgs.gawk}/bin/awk";
perl = "${pkgs.perl}/bin/perl";
find = "${pkgs.findutils}/bin/find";
notifySend = "${pkgs.libnotify}/bin/notify-send";
notmuch = "${pkgs.notmuch}/bin/notmuch";
head = "${pkgs.coreutils}/bin/head";
touch = "${pkgs.coreutils}/bin/touch";
tr = "${pkgs.coreutils}/bin/tr";
mbsyncrc = "${config.home.homeDirectory}/.mbsyncrc";
mbsync = "${pkgs.isync}/bin/mbsync -c ${mbsyncrc}";
maildir = "${config.home.homeDirectory}/Maildir";
passwordStoreDir = "${config.home.homeDirectory}/.password-store";
notmuchConfig = "${config.home.homeDirectory}/.notmuch-config";
gnupghome = "${config.home.homeDirectory}/.gnupg";
lastrun = "${config.home.homeDirectory}/.mailsynclastrun";
in
pkgs.writeScriptBin "mailsync" ''
#!${shell}
# Run only if not already running in other instance
${pidof} mbsync >/dev/null && {
echo "mbsync is already running."
exit
}
export PASSWORD_STORE_DIR="${passwordStoreDir}"
export NOTMUCH_CONFIG="${notmuchConfig}"
export GNUPGHOME="${gnupghome}"
export GPG_TTY=$TTY
notify() {
pgrepoutput="$(${pgrep} -a X\(org\|wayland\))"
displays="$(echo "$pgrepoutput" | ${grep} -wo "[0-9]*:[0-9]\+" | sort -u)"
[ -n "$pgrepoutput" ] && for x in ''${displays:-0:}; do
export DISPLAY=$x
${notifySend} \
--app-name="email" \
"email" \
"📬 $2 new mail(s) in \`$1\` account."
done
}
messageinfo() {
from="$1"
subject="$2"
pgrepoutput="$(${pgrep} -a X\(org\|wayland\))"
displays="$(echo "$pgrepoutput" | ${grep} -wo "[0-9]*:[0-9]\+" | sort -u)"
[ -n "$pgrepoutput" ] && for x in ''${displays:-0:}; do
export DISPLAY=$x
${notifySend} \
--app-name="email" \
"📧$from:" \
"$subject"
done
}
# Check account for new mail. Notify if there is new content.
syncandnotify() {
accounts="$1"
acc="$(echo "$account" | ${sed} "s/.*\///")"
if [ -z "$opts" ]; then
${mbsync} "$acc"
else
${mbsync} "$opts" "$acc"
fi
new=$(
${find} \
"${maildir}/$acc/INBOX/new/" \
"${maildir}/$acc/Inbox/new/" \
"${maildir}/mail/$acc/inbox/new/" \
-type f \
-newer "${lastrun}" \
2> /dev/null
)
newcount=$(echo "$new" | ${sed} '/^\s*$/d' | wc -l)
if [ "$newcount" -gt 5 ]; then
notify "$acc" "$newcount"
elif [ "$newcount" -gt 0 ]; then
for file in $new; do
# Extract subject and sender from mail.
from=$(
${awk} '/^From: / && ++n ==1,/^\<.*\>:/' "$file" | \
${perl} -CS -MEncode -ne 'print decode("MIME-Header", $_)' | \
${awk} '{ $1=""; if (NF>=3)$NF=""; print $0 }' | \
${sed} 's/^[[:blank:]]*[\"'\''\'''\'\<]*//;s/[\"'\''\'''\'\>]*[[:blank:]]*$//'
)
subject=$(
${awk} '/^Subject: / && ++n == 1,/^\<.*\>: / && ++i == 2' "$file" | \
${head} -n 1 | ${perl} -CS -MEncode -ne 'print decode("MIME-Header", $_)' | \
${sed} 's/^Subject: //' | \
${sed} 's/^{[[:blank:]]*[\"'\''\'''\'\<]*//;s/[\"'\''\'''\'\>]*[[:blank:]]*$//' | \
${tr} -d '\n'
)
messageinfo "$from" "$subject" &
done
fi
}
# Sync accounts passed as argument or all.
if [ "$#" -eq "0" ]; then
accounts="$(${awk} '/^Channel/ {print $2}' "${mbsyncrc}")"
else
for arg in "$@"; do
[ "''${arg%''${arg#?}}" = '-' ] && \
opts="''${opts:+''${opts} }''${arg}" && \
shift 1
done
accounts=$*
fi
# Parallelize multiple accounts
for account in $accounts; do
syncandnotify "''${account}" &
done
wait
${notmuch} new 2>/dev/null
#Create a touch file that indicates the time of the last run of mailsync
${touch} "${lastrun}"
''

View File

@ -1,36 +0,0 @@
{ config, pkgs, ... }:
let
mpdDir = "${config.home.homeDirectory}/.mpd";
in {
imports = [ ./common.nix ];
home.packages = [ pkgs.mpc_cli ];
home.file.".mpd/mpd.conf".text = ''
music_directory "https://dav.monotremata.xyz/music"
playlist_directory "${mpdDir}/playlists"
log_file "${mpdDir}/mpd.log"
pid_file "${mpdDir}/mpd.pid"
state_file "${mpdDir}/mpdstate"
database {
plugin "proxy"
host "narwhal"
port "6600"
}
audio_output {
type "osx"
name "CoreAudio"
mixer_type "software"
}
decoder {
plugin "mp4ff"
enabled "no"
}
bind_to_address "0.0.0.0"
port "6600"
user "rilla"
'';
}

View File

@ -1,269 +0,0 @@
set nowrap
set nocompatible
syntax on
filetype plugin on
set number
set mouse=a " mouse support
set showcmd " show incomplete cmds down the bottom
set showmode " show current mode
set visualbell " no sounds
set autoread " reload files changed outside vim
"set gcr=a:blinkon0 " disable cursor blink
set backspace=indent,eol,start " allow backspacing over everything in insert
mode
set shiftround " use multiple of shiftwidth when indenting with '<' and '>'
set showmatch " set show matching parenthesis
set ignorecase " ignore case when searching
set smartcase " ignore case if search pattern is all lowercase, case-sensitive otherwise
set smarttab " insert tabs on the start of a line according to shiftwidth, not tabstop
set hlsearch " highlight search terms
set incsearch " show search matches as you type
set hidden
set ruler
set clipboard=unnamed " system clipboard
set list listchars=tab:\ \ ,trail" display tabs and trailing spaces visually
set colorcolumn=80
set splitbelow
set splitright
nmap <A-r> <C-w>r
"let g:python_host_prog = '/usr/bin/python2'
"let g:python3_host_prog = '/usr/local/bin/python3'
let mapleader=","
let maplocalleader="\\"
" use alt-x to go to a specific tab
nnoremap <A-1> 1gt
nnoremap <A-2> 2gt
nnoremap <A-3> 3gt
nnoremap <A-4> 4gt
nnoremap <A-5> 5gt
nnoremap <A-6> 6gt
nnoremap <A-7> 7gt
nnoremap <A-8> 8gt
nnoremap <A-9> :tablast<cr>
" clean highlights when C-l
nnoremap <silent> <C-l> :nohl<CR><C-l>
highlight Comment cterm=italic gui=italic
" HIGHLIGHT LINE WHEN IN INSERT MODE
hi CursorLine cterm=NONE,underline ctermbg=NONE
set timeoutlen=1000 ttimeoutlen=0 " eliminate annoying delay
autocmd InsertEnter * :set cursorline
autocmd InsertLeave * :set nocursorline
" INDENTATION:
filetype indent on
set softtabstop=4
set expandtab
set shiftwidth=4 " number of spaces to use for autoindenting
set tabstop=4 " a tab is four spaces
set autoindent " always set autoindenting on
set copyindent " copy the previous indentation on autoindenting
" TAG JUMPING:
command! MakeTags !ctags -R .
" - ^] to jump to tag under cursor
" - g^] for ambiguous tags
" - ^t to jump back up the tag stack
" TURN OF SWAP FILES:
set noswapfile
set nobackup
set nowb
"FOLDS:
set foldmethod=indent " fold based on indent
set foldnestmax=3 " deepest fold is 3 levels
set nofoldenable " don't fold by default
" FINDING FILES:
set path+=**
set wildmenu
" - Hit tab to find for partial match
" - Use * to make it fuzzy
call plug#begin('~/.config/nvim/plugged')
Plug 'LaTeX-Box-Team/LaTeX-Box'
Plug 'APZelos/blamer.nvim'
Plug 'vito-c/jq.vim'
Plug 'tpope/vim-haml'
Plug 'tpope/vim-surround'
Plug 'junegunn/goyo.vim'
" Plug 'vim-pandoc/vim-pandoc'
" Plug 'vim-pandoc/vim-pandoc-syntax'
Plug 'lambdalisue/nerdfont.vim'
Plug 'lambdalisue/fern-renderer-nerdfont.vim'
Plug 'lambdalisue/glyph-palette.vim'
Plug 'lambdalisue/fern-git-status.vim'
Plug 'lambdalisue/fern-mapping-git.vim' " to check
Plug 'lambdalisue/fern-hijack.vim'
" Plug 'voldikss/vim-floaterm'
" Plug 'camspiers/animate.vim'
" Plug 'camspiers/lens.vim'
Plug 'psf/black', { 'branch': 'stable' }
Plug 'elzr/vim-json'
Plug 'https://tildegit.org/sloum/gemini-vim-syntax.git'
Plug 'maksimr/vim-jsbeautify'
Plug 'glacambre/firenvim'
Plug 'hashivim/vim-terraform'
Plug 'martinda/Jenkinsfile-vim-syntax'
Plug 'z0mbix/vim-shfmt', { 'for': 'sh' }
Plug 'LnL7/vim-nix'
call plug#end()
let g:markdown_syntax_conceal = 0
set updatetime=100 " reduce vim update time so magke gitgutter more responsive
set termguicolors
"set fillchars+=vert:\ " cleaner vertical line
let g:gruvbox_contrast_dark="hard"
let g:gruvbox_contrast_light="hard"
let g:gruvbox_italic=1
let g:gruvbox_invert_indent_guides=1
let g:gruvbox_vert_split='bg1'
colorscheme gruvbox
" colorscheme gruvbox8_hard
set background=dark
let g:fern#renderer = "nerdfont"
function! s:init_fern() abort
nmap <buffer> T <Plug>(fern-action-open:tab)
nmap <buffer> S <Plug>(fern-action-open:split)
nmap <buffer> V <Plug>(fern-action-open:vsplit)
nmap <buffer> <Space> <Plug>(fern-action-mark:toggle)
endfunction
augroup fern-custom
autocmd! *
autocmd FileType fern call s:init_fern()
augroup END
augroup my-glyph-palette
autocmd! *
autocmd FileType fern call glyph_palette#apply()
autocmd FileType nerdtree,startify call glyph_palette#apply()
augroup END
nnoremap <leader>t :Fern . -drawer -toggle<cr>
nnoremap <leader>f :Files<cr>
nnoremap <leader>rg :Rg<cr>
nnoremap <leader><Bs> :cd ..<cr>
nnoremap <Leader>b :Buffers<cr>
"let g:NERDTreeIndicatorMapCustom = {
"\ "Modified" : "✹",
"\ "Staged" : "✚",
"\ "Untracked" : "✭",
"\ "Renamed" : "➜",
"\ "Unmerged" : "═",
"\ "Deleted" : "✖",
"\ "Dirty" : "✗",
"\ "Clean" : "✔︎",
"\ 'Ignored' : '☒',
"\ "Unknown" : "?"
"\ }
let g:indentLine_char = '▏'
"let g:indentLine_color_term = 2854
let g:indentLine_setConceal = 0
"let g:indentLine_concealcursor=""
let g:slime_target="tmux"
let g:slime_python_ipython=1
let g:tmux_navigator_no_mappings = 1
nnoremap <silent> <A-h> :TmuxNavigateLeft<cr>
nnoremap <silent> <A-j> :TmuxNavigateDown<cr>
nnoremap <silent> <A-k> :TmuxNavigateUp<cr>
nnoremap <silent> <A-l> :TmuxNavigateRight<cr>
"let g:lightline = {'colorscheme': 'gruvbox'}
" let g:limelight_conceal_ctermfg = 'DarkGray'
" let g:vim_json_syntax_conceal = 0
let g:airline_theme='base16_gruvbox_dark_hard'
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#ale#enabled = 1
let g:ale_linters ={
\ 'haskell': ['hlint', 'hdevtools', 'hfmt'],
\}
let g:ale_python_auto_pipenv=1 " see ale-integrations-local-executables
"let g:ale_python_pylint_auto_pipenv=1
let g:ale_python_pylint_executable="pipenv"
let g:ale_python_pylint_change_directory=1
let g:ale_lint_on_text_changed = 'never'
let g:ale_lint_on_insert_leave = 0
let g:ale_lint_on_enter = 0
autocmd! User GoyoEnter Limelight
autocmd! User GoyoLeave Limelight!!
" function LoadBraces (except)
" if (&ft != a:except)
" RainbowParenthesesLoadBraces
" endif
" endfunction
"
" " For rainbow parenhteses
" au VimEnter * RainbowParenthesesToggle
" au Syntax * RainbowParenthesesLoadRound
" au Syntax * RainbowParenthesesLoadSquare
" au Syntax * call LoadBraces('haskell')
"autocmd! BufWritePost,BufEnter * Neomake
let g:deoplete#enable_at_startup = 1
" let g:black_linelength=79
let g:shfmt_extra_args = '-i 4'
let g:NERDDefaultAlign = 'left'
nnoremap <silent> <F6> i
inoremap <silent> <F6> <Nop>
nnoremap <silent> <F18> a
inoremap <silent> <F18> <Nop>
nnoremap <leader>p "=system('xsel')<cr>p
nnoremap <leader>m :!make<cr>
"set formatoptions+=w
"set tw=80
"nnoremap Q gqip
"set textwidth=79
" set wrap linebreak
" au BufNewFile,BufRead *.go setlocal noet ts=4 sw=4 sts=4
let g:UltiSnipsExpandTrigger="<tab>"
let g:UltiSnipsJumpForwardTrigger="<c-b>"
let g:UltiSnipsJumpBackwardTrigger="<c-z>"
" autocmd FileType sql nnoremap <buffer> <C-f> :%!sqlformat --reindent --keywords upper --identifiers lower -<CR>
" autocmd FileType sql nnoremap <buffer> <C-f> :%!sqlformat --reindent --keywords upper -<CR>
autocmd FileType sql nnoremap <buffer> <C-f> :%!sqlfluff fix -<CR>
autocmd FileType python nnoremap <buffer> <C-f> :Black<CR>
autocmd FileType sh nnoremap <buffer> <C-f> :Shfmt<CR>
autocmd FileType json nnoremap <buffer> <C-f> :%!jq --indent 4 .<CR>
autocmd FileType terraform nnoremap <buffer> <C-f> :TerraformFmt<CR>
autocmd FileType nix nnoremap <buffer> <C-f> :%!nixfmt < %<CR>
let g:vimwiki_list = [{'path': '~/notes/', 'syntax': 'markdown', 'ext': '.md'}]

View File

@ -1,45 +0,0 @@
{ config, pkgs, ... }:
{
imports = [ ./common.nix ];
programs.neovim = {
plugins =
with pkgs.vimPlugins; [ # nix-env -f '<nixpkgs>' -qaP -A vimPlugins
FixCursorHold-nvim
airline
ale
csv
deoplete-nvim
easymotion
fern-vim
fugitive
fzf-vim
gitgutter
goyo
gruvbox-community
indentLine
limelight-vim
neoformat
neomake
nerdcommenter
rainbow
sensible
tmux-navigator
todo-txt-vim
ultisnips
vim-airline-themes
vim-css-color
vim-jinja
vim-ledger
vim-markdown
vim-nix
vim-slime
vim-smoothie
vim-snippets
vim-terraform
vim-unimpaired
vimwiki
];
extraConfig = builtins.readFile ./init_macos.vim;
};
}

View File

@ -9,4 +9,5 @@
PASSWORD_STORE_KEY = "B51D4548A4846E3C8D115C808333CFB0B9D3244D";
};
};
home.packages = [pkgs.zbar];
}

View File

@ -1,5 +0,0 @@
{ config, pkgs, ... }:
{
imports = [ ./common.nix ];
}

View File

@ -75,6 +75,14 @@
port = 22;
};
"bitbucket.org" = {
hostname = "bitbucket.org";
user = "git";
identitiesOnly = true;
identityFile = "~/.ssh/bitbucket_rsa";
port = 22;
};
};
};
}

View File

@ -1,5 +0,0 @@
{ config, pkgs, ... }:
{
imports = [ ./common.nix ];
}

View File

@ -30,6 +30,11 @@
enable = true;
enableAutosuggestions = true;
enableCompletion = true;
completionInit = ''
autoload compinit && compinit
autoload bashcompinit && bashcompinit
source ~/.bash_completion.d/breeze-complete
'';
initExtraBeforeCompInit = ''
zstyle ':completion:*' matcher-list ''' \
'm:{a-z\-}={A-Z\_}' \
@ -58,6 +63,8 @@
"...." = "../../..";
"....." = "../../../..";
"......" = "../../../../..";
pyenv-init =
''eval "$(pyenv init -)" && eval "$(pyenv virtualenv-init -)"'';
};
localVariables = { KEYTIMEOUT = 1; };
initExtra = ''
@ -77,6 +84,8 @@
}
}
source "${pkgs.python39Packages.virtualenvwrapper}/bin/virtualenvwrapper.sh"
VENV_DIR="${config.home.homeDirectory}/virtualenvs"
export WORKON_HOME="''${VENV_DIR}"
function activate-venv() {

View File

@ -1,29 +0,0 @@
{ config, pkgs, ... }:
{
imports = [ ./common.nix ];
programs.starship.settings = {
gcloud = {
disabled = false;
format = ''
on [$symbol$account(@$domain)(($region))]($style)
'';
symbol = " ";
};
python = {
disabled = true;
symbol = "";
format = ''
via [$symbol$pyenv_prefix($version )(($virtualenv) )]($style)
'';
python_binary = [
"python"
"python2"
"python3"
"/usr/bin/python"
"/usr/local/bin/python3"
];
};
};
programs.zsh.enableVteIntegration = false;
}

View File

@ -2,34 +2,34 @@
let choose-pass = pkgs.callPackage ./choose-pass.nix { inherit config pkgs; };
in {
services.yabai = {
enable = true;
package = pkgs.yabai;
# enableScriptingAddition = true;
enableScriptingAddition = false;
config = {
external_bar = "all:28:0";
layout = "bsp";
auto_balance = "off";
mouse_modifier = "fn";
mouse_action1 = "move";
mouse_action2 = "resize";
mouse_follows_focus = "on";
focus_follows_mouse = "autoraise";
window_topmost = "on"; # floating windows always on top
window_shadow = "float";
window_opacity = "on";
active_window_opacity = "1.0";
normal_window_opacity = "1.0";
window_border = "on";
window_border_width = 8;
active_window_border_color = "0xff458588";
normal_window_border_color = "0xff504945";
};
extraConfig = ''
yabai -m rule --add app="^choose" manage=off
'';
};
# services.yabai = {
# enable = true;
# package = pkgs.yabai;
# # enableScriptingAddition = true;
# enableScriptingAddition = false;
# config = {
# external_bar = "all:28:0";
# layout = "bsp";
# auto_balance = "off";
# mouse_modifier = "fn";
# mouse_action1 = "move";
# mouse_action2 = "resize";
# mouse_follows_focus = "on";
# focus_follows_mouse = "autoraise";
# window_topmost = "on"; # floating windows always on top
# window_shadow = "float";
# window_opacity = "on";
# active_window_opacity = "1.0";
# normal_window_opacity = "1.0";
# window_border = "on";
# window_border_width = 8;
# active_window_border_color = "0xff458588";
# normal_window_border_color = "0xff504945";
# };
# extraConfig = ''
# yabai -m rule --add app="^choose" manage=off
# '';
# };
services.skhd = {
enable = true;
@ -105,27 +105,27 @@ in {
'';
};
services.spacebar = {
enable = true;
package = pkgs.spacebar;
config = {
position = "top";
height = 28;
spacing_left = 25;
spacing_right = 25;
text_font = ''"Inter:Regular:12.0"'';
icon_font = ''"Font Awesome 5 Free:Solid:12.0"'';
background_color = "0xff282828";
foreground_color = "0xffebdbb2";
# services.spacebar = {
# enable = true;
# package = pkgs.spacebar;
# config = {
# position = "top";
# height = 28;
# spacing_left = 25;
# spacing_right = 25;
# text_font = ''"Inter:Regular:12.0"'';
# icon_font = ''"Font Awesome 5 Free:Solid:12.0"'';
# background_color = "0xff282828";
# foreground_color = "0xffebdbb2";
space_icon_color = "0xff83a598";
space_icon = "";
space_icon_strip = "1 2 3 4 5 6 7 8 9 10";
# space_icon_color = "0xff83a598";
# space_icon = "•";
# space_icon_strip = "1 2 3 4 5 6 7 8 9 10";
power_icon_strip = " ";
# power_icon_strip = " ";
clock_icon = "";
clock_format = ''"%d/%m/%y %R"'';
};
};
# clock_icon = "";
# clock_format = ''"%d/%m/%y %R"'';
# };
# };
}