2023-10-12 23:24:36 +02:00
|
|
|
{ pkgs, cornelis, cornelis-vim, agda, ... }:
|
2023-07-31 14:18:02 +02:00
|
|
|
let username = "rachel";
|
|
|
|
homeDir = "/home/${username}";
|
|
|
|
SAX2 = pkgs.fetchurl {
|
|
|
|
name = "SAX2";
|
|
|
|
url = "https://abrudz.github.io/SAX2/SAX2.ttf";
|
|
|
|
sha256 = "sha256-DgvDWXO2fnKZNu9EvQOq8GNMTU3PUdp85+/0ZHdRXZc=";
|
|
|
|
|
|
|
|
recursiveHash = true;
|
|
|
|
|
|
|
|
downloadToTemp = true;
|
|
|
|
postFetch = ''
|
|
|
|
mkdir -p "$out/share/fonts/truetype"
|
|
|
|
mv "$downloadedFile" "$out/share/fonts/truetype/SAX2.ttf"
|
|
|
|
'';
|
|
|
|
};
|
2023-10-15 13:10:57 +02:00
|
|
|
hpkgs = pkgs.haskellPackages;
|
|
|
|
hls_wrapper = pkgs.writeScript "hls" ''
|
|
|
|
export PATH="${hpkgs.haskell-language-server}/bin:$PATH"
|
|
|
|
exec ${hpkgs.haskell-language-server}/bin/haskell-language-server-wrapper "$@"
|
|
|
|
'';
|
2023-07-31 14:18:02 +02:00
|
|
|
in
|
|
|
|
{
|
|
|
|
home = {
|
|
|
|
username = username;
|
|
|
|
homeDirectory = homeDir;
|
|
|
|
packages = with pkgs; [
|
|
|
|
unzip
|
|
|
|
zip
|
|
|
|
xz
|
|
|
|
gzip
|
|
|
|
bzip2
|
|
|
|
p7zip
|
|
|
|
usbutils
|
|
|
|
pciutils
|
|
|
|
nettools
|
|
|
|
nmap
|
|
|
|
arp-scan
|
|
|
|
acpi
|
2023-09-12 21:28:31 +02:00
|
|
|
julia-bin
|
2023-11-06 16:11:24 +01:00
|
|
|
(python3.withPackages (ps: with ps; [
|
|
|
|
ipython
|
|
|
|
matplotlib
|
|
|
|
numpy
|
|
|
|
scipy
|
|
|
|
]))
|
2023-10-15 13:10:57 +02:00
|
|
|
hpkgs.ghc
|
2023-07-31 14:18:02 +02:00
|
|
|
firefox
|
|
|
|
sxiv
|
|
|
|
zathura
|
|
|
|
gnupg
|
|
|
|
agda
|
|
|
|
discord
|
|
|
|
dig
|
|
|
|
xxd
|
|
|
|
zoom-us
|
|
|
|
slack
|
|
|
|
imagemagick
|
|
|
|
ffmpeg
|
|
|
|
sl
|
|
|
|
cowsay
|
|
|
|
lolcat
|
|
|
|
fortune
|
|
|
|
banner
|
|
|
|
yt-dlp
|
|
|
|
libreoffice
|
|
|
|
protonmail-bridge
|
|
|
|
pass
|
|
|
|
protonvpn-cli
|
|
|
|
protonvpn-gui
|
|
|
|
thunderbird
|
|
|
|
tidal-hifi
|
|
|
|
signal-desktop
|
|
|
|
transmission-gtk
|
|
|
|
xclip
|
|
|
|
clinfo
|
|
|
|
glxinfo
|
|
|
|
vulkan-tools
|
|
|
|
obs-studio
|
|
|
|
file
|
|
|
|
gimp
|
|
|
|
SAX2
|
|
|
|
twemoji-color-font
|
|
|
|
bat
|
|
|
|
steam
|
|
|
|
steam-run
|
2023-08-13 10:57:39 +02:00
|
|
|
rmapi
|
2023-08-19 22:19:49 +02:00
|
|
|
lutris
|
2023-09-25 12:10:43 +02:00
|
|
|
texlive.combined.scheme-full
|
2023-10-12 23:24:36 +02:00
|
|
|
cornelis
|
2023-10-24 20:06:09 +02:00
|
|
|
zulip
|
2023-11-06 16:11:24 +01:00
|
|
|
rink
|
2023-11-06 16:15:34 +01:00
|
|
|
sage
|
2023-11-10 14:44:02 +01:00
|
|
|
typst
|
2023-07-31 14:18:02 +02:00
|
|
|
];
|
|
|
|
stateVersion = "23.05";
|
|
|
|
};
|
|
|
|
|
|
|
|
xdg.userDirs = {
|
|
|
|
enable = true;
|
|
|
|
createDirectories = true;
|
|
|
|
desktop = "${homeDir}";
|
|
|
|
documents = "${homeDir}/doc";
|
|
|
|
download = "${homeDir}/dwn";
|
|
|
|
music = "${homeDir}/music";
|
|
|
|
pictures = "${homeDir}/img";
|
|
|
|
publicShare = "${homeDir}/srv";
|
|
|
|
templates = "${homeDir}/doc/templates";
|
|
|
|
videos = "${homeDir}/vid";
|
|
|
|
};
|
|
|
|
|
|
|
|
programs = {
|
|
|
|
bash = {
|
|
|
|
enable = true;
|
|
|
|
enableCompletion = true;
|
|
|
|
historyFile = "/dev/null";
|
|
|
|
sessionVariables = {
|
|
|
|
PS1 ="\\033[1m\\u\\033[0m@\\033[1m\\h\\033[0m: \\w\nλ ";
|
|
|
|
BROWSER = "firefox";
|
|
|
|
XINITRC = "${homeDir}/bin/xinitrc";
|
|
|
|
XAUTHORITY = "${homeDir}/.local/share/Xauthority";
|
|
|
|
PASH_KEYID = "3E4A909C8FEF6E3783699C79DFC26EF8EDAD6D71";
|
|
|
|
QT_AUTO_SCREEN_FACTOR = 1;
|
|
|
|
PATH = "${homeDir}/bin:$PATH";
|
|
|
|
};
|
|
|
|
shellAliases = {
|
|
|
|
x = "startx";
|
|
|
|
rm = "rm -i";
|
|
|
|
cal = "cal -m";
|
|
|
|
};
|
|
|
|
initExtra = ''
|
|
|
|
source ~/.profile
|
|
|
|
set -o vi
|
|
|
|
'';
|
|
|
|
};
|
2023-08-25 14:40:08 +02:00
|
|
|
|
|
|
|
mpv = {
|
|
|
|
enable = true;
|
|
|
|
config = {
|
|
|
|
hwdec = "auto-safe";
|
|
|
|
vo = "gpu";
|
|
|
|
profile = "gpu-hq";
|
|
|
|
};
|
|
|
|
};
|
2023-09-01 15:21:19 +02:00
|
|
|
|
|
|
|
rofi = {
|
|
|
|
enable = true;
|
|
|
|
theme = "solarized";
|
|
|
|
};
|
2023-07-31 14:18:02 +02:00
|
|
|
|
|
|
|
git = {
|
|
|
|
enable = true;
|
|
|
|
userName = "Rachel Lambda Samuelsson";
|
|
|
|
userEmail = "depsterr@protonmail.com";
|
|
|
|
extraConfig = {
|
|
|
|
init.defaultBranch = "master";
|
|
|
|
};
|
|
|
|
};
|
2023-10-06 01:14:52 +02:00
|
|
|
|
|
|
|
neovim = {
|
|
|
|
defaultEditor = true;
|
|
|
|
enable = true;
|
|
|
|
vimAlias = true;
|
|
|
|
extraLuaConfig = ''
|
|
|
|
require("tmux").setup({ copy_sync = { redirect_to_clipboard = true } });
|
2023-10-06 22:16:17 +02:00
|
|
|
require('Comment').setup()
|
2023-10-15 13:10:57 +02:00
|
|
|
local lspcfg = require('lspconfig')
|
|
|
|
lspcfg.typst_lsp.setup({
|
2023-10-18 18:55:59 +02:00
|
|
|
cmd = { '${pkgs.typst-lsp}/bin/typst-lsp' },
|
2023-10-15 13:10:57 +02:00
|
|
|
})
|
|
|
|
lspcfg.hls.setup({
|
2023-10-18 18:55:59 +02:00
|
|
|
cmd = { '${hls_wrapper}', 'lsp' },
|
2023-10-15 13:10:57 +02:00
|
|
|
})
|
|
|
|
lspcfg.pyright.setup({
|
2023-10-18 18:55:59 +02:00
|
|
|
cmd = { '${pkgs.nodePackages.pyright}/bin/pyright-langserver', '--stdio' },
|
2023-10-15 13:10:57 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
vim.api.nvim_create_autocmd('LspAttach', {
|
|
|
|
callback = function(args)
|
2023-10-18 18:55:59 +02:00
|
|
|
local opts = { buffer = args.buf }
|
|
|
|
vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts)
|
|
|
|
vim.keymap.set('n', '<localleader>r', vim.lsp.buf.rename, opts)
|
|
|
|
vim.keymap.set('n', '<localleader>a', vim.lsp.buf.code_action, opts)
|
|
|
|
vim.keymap.set('i', '<C-n>', vim.lsp.omnifunc, opts)
|
2023-10-15 13:10:57 +02:00
|
|
|
end,
|
|
|
|
})
|
2023-10-15 21:45:49 +02:00
|
|
|
|
|
|
|
vim.api.nvim_create_autocmd({ "BufNew"
|
|
|
|
, "TextChanged"
|
|
|
|
, "TextChangedI"
|
|
|
|
, "TextChangedP"
|
|
|
|
, "TextChangedT"
|
|
|
|
}, {
|
|
|
|
callback = function(args)
|
|
|
|
vim.diagnostic.disable(args.buf)
|
|
|
|
end
|
|
|
|
})
|
|
|
|
|
|
|
|
vim.api.nvim_create_autocmd({"BufWrite"}, {
|
|
|
|
callback = function(args)
|
|
|
|
vim.diagnostic.enable(args.buf)
|
|
|
|
end
|
|
|
|
})
|
2023-10-06 01:14:52 +02:00
|
|
|
'';
|
|
|
|
extraConfig = ''
|
|
|
|
set rnu nu
|
|
|
|
set ts=2 sw=2 expandtab
|
|
|
|
set clipboard=unnamedplus
|
2023-10-09 12:09:40 +02:00
|
|
|
set laststatus=3 noshowmode
|
2023-10-15 13:10:57 +02:00
|
|
|
set signcolumn=no
|
2023-10-06 12:01:35 +02:00
|
|
|
let g:cornelis_use_global_binary = 1
|
2023-10-06 01:14:52 +02:00
|
|
|
let g:lightline = { 'colorscheme': 'gruvbox' }
|
|
|
|
colorscheme gruvbox
|
|
|
|
hi Normal guibg=NONE ctermbg=NONE
|
2023-11-05 10:36:06 +01:00
|
|
|
|
|
|
|
let maplocalleader="!"
|
2023-10-15 13:10:57 +02:00
|
|
|
runtime agda-input.vim
|
|
|
|
|
2023-11-05 10:36:06 +01:00
|
|
|
inoremap <C-Space> <Esc>
|
|
|
|
|
2023-10-07 14:12:43 +02:00
|
|
|
au BufRead,BufNewFile *.agda call AgdaFiletype()
|
|
|
|
au BufRead,BufNewFile *.lagda.* call AgdaFiletype()
|
|
|
|
function! AgdaFiletype()
|
2023-10-10 21:12:48 +02:00
|
|
|
nnoremap <buffer> <C-c><C-l> :CornelisLoad<CR>
|
|
|
|
nnoremap <buffer> <C-c><C-r> :CornelisRefine<CR>
|
|
|
|
nnoremap <buffer> <C-c><C-c> :CornelisMakeCase<CR>
|
2023-10-10 21:58:28 +02:00
|
|
|
nnoremap <buffer> <C-c>, :CornelisTypeContext<CR>
|
|
|
|
nnoremap <buffer> <C-c>. :CornelisTypeContextInfer<CR>
|
2023-10-10 21:12:48 +02:00
|
|
|
nnoremap <buffer> <C-c><C-d> :CornelisTypeInfer<CR>
|
|
|
|
nnoremap <buffer> <C-c><C-s> :CornelisSolve<CR>
|
|
|
|
nnoremap <buffer> <C-c><C-a> :CornelisAuto<CR>
|
|
|
|
nnoremap <buffer> gd :CornelisGoToDefinition<CR>
|
|
|
|
nnoremap <buffer> <C-c><C-b> :CornelisPrevGoal<CR>
|
|
|
|
nnoremap <buffer> <C-c><C-f> :CornelisNextGoal<CR>
|
|
|
|
nnoremap <buffer> <C-c><C-u> :CornelisIgnoreAbstract<CR>
|
|
|
|
nnoremap <buffer> <C-c><space> :CornelisGive<CR>
|
2023-10-07 14:12:43 +02:00
|
|
|
endfunction
|
2023-10-06 01:14:52 +02:00
|
|
|
'';
|
|
|
|
plugins = with pkgs.vimPlugins; [
|
|
|
|
surround-nvim
|
|
|
|
comment-nvim
|
|
|
|
vimtex
|
|
|
|
gruvbox-nvim
|
|
|
|
lightline-vim
|
|
|
|
lightline-gruvbox-vim
|
|
|
|
tmux-nvim
|
2023-10-12 23:24:36 +02:00
|
|
|
cornelis-vim
|
2023-10-15 13:10:57 +02:00
|
|
|
nvim-lspconfig
|
2023-10-15 21:46:06 +02:00
|
|
|
magma-nvim-goose
|
2023-10-06 01:14:52 +02:00
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
tmux = {
|
|
|
|
enable = true;
|
|
|
|
clock24 = true;
|
|
|
|
escapeTime = 0;
|
|
|
|
keyMode = "vi";
|
|
|
|
mouse = false;
|
|
|
|
shortcut = "a";
|
|
|
|
extraConfig = ''
|
|
|
|
bind h split -hb -c '#{pane_current_path}'
|
|
|
|
bind j split -v -c '#{pane_current_path}'
|
|
|
|
bind k split -vb -c '#{pane_current_path}'
|
|
|
|
bind l split -h -c '#{pane_current_path}'
|
|
|
|
|
|
|
|
is_vim="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?\.?(view|n?vim?x?)(-wrapped)?(diff)?$'"
|
|
|
|
|
|
|
|
bind-key -n 'C-h' if-shell "$is_vim" 'send-keys C-h' 'select-pane -L'
|
|
|
|
bind-key -n 'C-j' if-shell "$is_vim" 'send-keys C-j' 'select-pane -D'
|
|
|
|
bind-key -n 'C-k' if-shell "$is_vim" 'send-keys C-k' 'select-pane -U'
|
|
|
|
bind-key -n 'C-l' if-shell "$is_vim" 'send-keys C-l' 'select-pane -R'
|
|
|
|
|
|
|
|
bind-key -T copy-mode-vi 'C-h' select-pane -L
|
|
|
|
bind-key -T copy-mode-vi 'C-j' select-pane -D
|
|
|
|
bind-key -T copy-mode-vi 'C-k' select-pane -U
|
|
|
|
bind-key -T copy-mode-vi 'C-l' select-pane -R
|
|
|
|
|
|
|
|
bind -n 'M-h' if-shell "$is_vim" 'send-keys M-h' 'resize-pane -L 1'
|
|
|
|
bind -n 'M-j' if-shell "$is_vim" 'send-keys M-j' 'resize-pane -D 1'
|
|
|
|
bind -n 'M-k' if-shell "$is_vim" 'send-keys M-k' 'resize-pane -U 1'
|
|
|
|
bind -n 'M-l' if-shell "$is_vim" 'send-keys M-l' 'resize-pane -R 1'
|
|
|
|
|
|
|
|
bind-key -T copy-mode-vi M-h resize-pane -L 1
|
|
|
|
bind-key -T copy-mode-vi M-j resize-pane -D 1
|
|
|
|
bind-key -T copy-mode-vi M-k resize-pane -U 1
|
|
|
|
bind-key -T copy-mode-vi M-l resize-pane -R 1
|
2023-10-06 10:45:30 +02:00
|
|
|
|
|
|
|
set -g pane-border-style bg=default
|
|
|
|
set -g pane-border-style fg="#1D1F21"
|
|
|
|
set -g pane-active-border-style bg=default
|
|
|
|
set -g pane-active-border-style fg="#333333"
|
2023-10-06 01:14:52 +02:00
|
|
|
|
|
|
|
set-option -g status on
|
|
|
|
set-option -g status-style bg=default
|
2023-10-07 14:12:31 +02:00
|
|
|
set-option -g status-style fg="#ef7627"
|
2023-10-06 01:14:52 +02:00
|
|
|
set-option -g status-interval 2
|
|
|
|
set-option -g status-justify "centre"
|
|
|
|
set-option -g status-right " λ "
|
|
|
|
|
|
|
|
set -g status-interval 1
|
|
|
|
set-window-option -g window-status-separator "-"
|
2023-10-07 14:12:31 +02:00
|
|
|
set-window-option -g window-status-current-format " #[fg=#b55690 bold]!![ #{b:pane_current_path}/ ] #{b:window_index} $ #{b:pane_current_command}!! "
|
2023-10-06 01:14:52 +02:00
|
|
|
set-window-option -g window-status-format " #{b:window_index} [ #{b:pane_current_path}/ ] #{b:pane_current_command} "
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2023-10-06 12:01:45 +02:00
|
|
|
hyfetch = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
|
|
|
preset = "lesbian";
|
|
|
|
mode = "rgb";
|
|
|
|
color_align = {
|
|
|
|
mode = "horizontal";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-10-16 23:08:52 +02:00
|
|
|
direnv = {
|
|
|
|
enable = true;
|
|
|
|
nix-direnv.enable = true;
|
|
|
|
};
|
|
|
|
|
2023-10-06 01:14:52 +02:00
|
|
|
alacritty = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
|
|
|
window = {
|
|
|
|
padding.x = 5;
|
|
|
|
padding.y = 5;
|
|
|
|
decoration = "none";
|
|
|
|
};
|
|
|
|
dynamic_title = false;
|
|
|
|
mouse_hide_when_typing = true;
|
|
|
|
draw_bold_text_with_bright_colors = false;
|
|
|
|
scrolling.history = 0;
|
|
|
|
font = {
|
|
|
|
normal.family = "SAX2";
|
|
|
|
size = 11;
|
|
|
|
};
|
2023-10-06 10:45:30 +02:00
|
|
|
colors = {
|
|
|
|
background = "#1d1f21";
|
|
|
|
foreground = "#c5c8c6";
|
|
|
|
};
|
2023-10-06 01:14:52 +02:00
|
|
|
shell.program =
|
|
|
|
let tmux-menu = pkgs.writeScript "tmux-menu" ''
|
|
|
|
s="$(tmux ls 2>/dev/null)"
|
|
|
|
[ "$s" ] && s="$s
|
|
|
|
"
|
|
|
|
c=$(${pkgs.fzf}/bin/fzf -1 <<-EOF
|
|
|
|
''${s}New Session
|
|
|
|
Raw Shell
|
|
|
|
EOF
|
|
|
|
) || exit
|
|
|
|
case "$c" in
|
|
|
|
"New Session")
|
|
|
|
read -p "Name? " -r n
|
|
|
|
${pkgs.tmux}/bin/tmux new -s "$n" ;;
|
|
|
|
"Raw Shell")
|
2023-10-15 13:10:57 +02:00
|
|
|
${pkgs.bash}/bin/bash --login ;;
|
2023-10-06 01:14:52 +02:00
|
|
|
*)
|
|
|
|
${pkgs.tmux}/bin/tmux attach-session -t "''${c%%:*}" ;;
|
|
|
|
esac
|
|
|
|
''; in "${tmux-menu}";
|
|
|
|
};
|
|
|
|
};
|
2023-10-18 18:56:29 +02:00
|
|
|
|
|
|
|
ssh = {
|
|
|
|
enable = true;
|
|
|
|
matchBlocks = {
|
|
|
|
remarkable = {
|
|
|
|
hostname = "10.11.99.1";
|
|
|
|
user = "root";
|
|
|
|
};
|
|
|
|
lazarus = {
|
|
|
|
hostname = "rachel.cafe";
|
|
|
|
user = "deppy";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2023-07-31 14:18:02 +02:00
|
|
|
};
|
|
|
|
}
|