Merged shared with Darwin
This commit is contained in:
@@ -14,7 +14,6 @@ let
|
||||
#!/bin/sh
|
||||
emacs &
|
||||
'';
|
||||
sharedFiles = import ../shared/files.nix { inherit config pkgs; };
|
||||
additionalFiles = import ./files.nix { inherit user config pkgs; };
|
||||
in
|
||||
{
|
||||
@@ -58,7 +57,7 @@ in
|
||||
"Affinity Photo 2: Image Editor" = 1616822987;
|
||||
"Affinity Publisher 2" = 1606941598;
|
||||
"Apple Remote Desktop" = 409907375; # (3.11)
|
||||
# "DaisyDisk" = 411643860; # (4.32) # Don't use this, we need the official version that is not sandboxed
|
||||
# "DaisyDisk" = 409907375; # (4.32) # Don't use this, we need the official version that is not sandboxed
|
||||
"Fantastical - Calendar" = 975937182;
|
||||
" Fedistar" = 6445863996; # (1.13.1)
|
||||
"Home Assistant" = 1099568401; # (2025.7.1)
|
||||
@@ -92,17 +91,198 @@ in
|
||||
home = {
|
||||
enableNixpkgsReleaseCheck = false;
|
||||
packages = pkgs.callPackage ./packages.nix { inherit llm-agents; };
|
||||
file = lib.mkMerge [
|
||||
sharedFiles
|
||||
additionalFiles
|
||||
{ "emacs-launcher.command".source = myEmacsLauncher; }
|
||||
|
||||
];
|
||||
file = additionalFiles // { "emacs-launcher.command".source = myEmacsLauncher; };
|
||||
|
||||
stateVersion = "23.11";
|
||||
};
|
||||
programs = {
|
||||
} // import ../shared/home-manager.nix { inherit config pkgs lib; };
|
||||
gpg.enable = true;
|
||||
|
||||
zsh = {
|
||||
enable = true;
|
||||
autocd = false;
|
||||
cdpath = [ "~/.local/share/src" ];
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
plugins = [ ];
|
||||
theme = "mrtazz";
|
||||
};
|
||||
initContent =
|
||||
let
|
||||
zshConfigEarlyInit = lib.mkOrder 500 ''
|
||||
if [[ -f /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh ]]; then
|
||||
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
||||
. /nix/var/nix/profiles/default/etc/profile.d/nix.sh
|
||||
fi
|
||||
|
||||
# GPGAgent for SSH
|
||||
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
||||
|
||||
# Define variables for directories
|
||||
export PATH=$HOME/.pnpm-packages/bin:$HOME/.pnpm-packages:$PATH
|
||||
export PATH=$HOME/.npm-packages/bin:$HOME/bin:$PATH
|
||||
export PATH=$HOME/.local/share/bin:$PATH
|
||||
export PATH=$HOME/.cargo/bin:$PATH
|
||||
# Remove history data we don't want to see
|
||||
export HISTIGNORE="pwd:ls:cd"
|
||||
|
||||
# Ripgrep alias
|
||||
alias search=rg -p --glob '!node_modules/*' $@
|
||||
|
||||
# Emacs is my editor
|
||||
export ALTERNATE_EDITOR="vim"
|
||||
export EDITOR="emacs -nw"
|
||||
export VISUAL="emacs"
|
||||
# RMAPI remarkable
|
||||
RMAPI_CONFIG=/Users/olaf/.config/rmapi
|
||||
|
||||
e() {
|
||||
emacs -nw "$@"
|
||||
}
|
||||
|
||||
# nix shortcuts
|
||||
shell() {
|
||||
nix-shell '<nixpkgs>' -A "$1"
|
||||
}
|
||||
|
||||
# pnpm is a javascript package manager
|
||||
alias pn=pnpm
|
||||
alias px=pnpx
|
||||
'';
|
||||
zshConfigLastInit = lib.mkOrder 1500 ''
|
||||
# Always color ls and group directories
|
||||
alias ls='ls --color=auto'
|
||||
|
||||
'';
|
||||
in
|
||||
lib.mkMerge [
|
||||
zshConfigEarlyInit
|
||||
zshConfigLastInit
|
||||
];
|
||||
};
|
||||
|
||||
git = {
|
||||
enable = true;
|
||||
ignores = [ "*.swp" ];
|
||||
|
||||
lfs = {
|
||||
enable = true;
|
||||
};
|
||||
settings = {
|
||||
init.defaultBranch = "main";
|
||||
core = {
|
||||
editor = "vim";
|
||||
autocrlf = "input";
|
||||
};
|
||||
commit.gpgsign = false;
|
||||
pull.rebase = true;
|
||||
rebase.autoStash = true;
|
||||
user = {
|
||||
name = "olaf";
|
||||
email = "olaf@xolx.nl";
|
||||
};
|
||||
};
|
||||
signing = {
|
||||
format = "openpgp";
|
||||
key = null;
|
||||
signByDefault = true;
|
||||
};
|
||||
};
|
||||
|
||||
vim = {
|
||||
enable = true;
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
vim-airline
|
||||
vim-airline-themes
|
||||
vim-startify
|
||||
vim-tmux-navigator
|
||||
];
|
||||
settings = {
|
||||
ignorecase = true;
|
||||
};
|
||||
extraConfig = ''
|
||||
"" General
|
||||
set number
|
||||
set history=1000
|
||||
set nocompatible
|
||||
set modelines=0
|
||||
set encoding=utf-8
|
||||
set scrolloff=3
|
||||
set showmode
|
||||
set showcmd
|
||||
set hidden
|
||||
set wildmenu
|
||||
set wildmode=list:longest
|
||||
set cursorline
|
||||
set ttyfast
|
||||
set nowrap
|
||||
set ruler
|
||||
set backspace=indent,eol,start
|
||||
set laststatus=2
|
||||
set clipboard=autoselect
|
||||
|
||||
" Dir stuff
|
||||
set nobackup
|
||||
set nowritebackup
|
||||
set noswapfile
|
||||
set backupdir=~/.config/vim/backups
|
||||
set directory=~/.config/vim/swap
|
||||
|
||||
" Relative line numbers for easy movement
|
||||
set relativenumber
|
||||
set rnu
|
||||
|
||||
"" Whitespace rules
|
||||
set tabstop=8
|
||||
set shiftwidth=2
|
||||
set softtabstop=2
|
||||
set expandtab
|
||||
|
||||
"" Searching
|
||||
set incsearch
|
||||
set gdefault
|
||||
|
||||
"" Statusbar
|
||||
set nocompatible " Disable vi-compatibility
|
||||
set laststatus=2 " Always show the statusline
|
||||
let g:airline_theme='bubblegum'
|
||||
let g:airline_powerline_fonts = 1
|
||||
|
||||
"" Local keys and such
|
||||
let mapleader=","
|
||||
let maplocalleader=" "
|
||||
|
||||
"" Change cursor on mode
|
||||
:autocmd InsertEnter * set cul
|
||||
:autocmd InsertLeave * set nocul
|
||||
|
||||
"" File-type highlighting and configuration
|
||||
syntax on
|
||||
filetype on
|
||||
filetype plugin on
|
||||
filetype indent on
|
||||
|
||||
"" Paste from clipboard
|
||||
nnoremap <Leader>, "+gP
|
||||
|
||||
"" Copy from clipboard
|
||||
xnoremap <Leader>. "+y
|
||||
|
||||
"" Move cursor by display lines when wrapping
|
||||
nnoremap j gj
|
||||
nnoremap k gk
|
||||
|
||||
"" Map leader-q to quit out of window
|
||||
nnoremap <leader>q :q<cr>
|
||||
|
||||
"" Move around split
|
||||
nnoremap <C-h> <C-w>h
|
||||
nnoremap <C-j> <C-w>j
|
||||
nnoremap <C-k> <C-w>k
|
||||
nnoremap <C-l> <C-w>l
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
catppuccin = {
|
||||
autoEnable = true;
|
||||
|
||||
Reference in New Issue
Block a user