Compare commits

...
Author SHA1 Message Date
Olaf f923fb7717 emacs Sha 2026-09-16 14:23:19 +02:00
kolkman 969e5e5dd3 excluded nightsky on x86 2026-09-15 20:55:37 +02:00
kolkman 3e6a7391df Architecture split. 2026-09-15 20:46:52 +02:00
kolkman 1fdb0cdc3e mlx-lm - aarch- only 2026-09-15 20:19:48 +02:00
kolkman c0392c8366 Catpuccin exluded for x86_64_darwin 2026-09-15 18:15:47 +02:00
Olaf e782f238ed Afinity replacement 2026-09-15 14:59:11 +02:00
Olaf Kolkman cac3b86098 platformio and vscode mods (using AI) 2026-09-13 14:19:11 +02:00
Olaf Kolkman 56b4fd88c0 Added Affinity App 2026-09-13 09:30:13 +02:00
Olaf b4a0a55a3a emacs overlay 2026-09-10 11:15:00 +02:00
Olaf 9ffa766ed9 fix brew-src input. 2026-09-08 16:23:47 +02:00
Olaf f21017f708 SSH-agent forwarding 2026-08-28 12:17:10 +02:00
Olaf 43d4ede188 Corrected a bunch of settins that got lost from modules/shared 2026-07-30 23:10:24 +02:00
Olaf d45e239926 Finetuning brew and casks 2026-07-30 22:01:25 +02:00
Olaf 17070a9a51 Bit of cleanup 2026-07-30 17:41:24 +02:00
Olaf 483712a34c Setup tweaks rdpclient 2026-07-30 17:34:37 +02:00
Olaf 534d3b9353 Merged shared with Darwin 2026-07-30 16:53:33 +02:00
Olaf 2fb38b685d merged shared with darwin 2026-07-30 16:53:31 +02:00
13 changed files with 759 additions and 812 deletions
+2 -1
View File
@@ -4,4 +4,5 @@ result
dump.txt
flake.lock
*~
Platformio - NixOS Wiki*
.platformio/
+111 -41
View File
@@ -1,51 +1,72 @@
{
description = "Starter configuration for macOS with nix-darwin";
inputs = {
nixpkgs = {
nixpkgsAarch64 = {
url = "github:nixos/nixpkgs/nixpkgs-unstable";
};
nixpkgsX86 = {
url = "github:nixos/nixpkgs//nixpkgs-26.05-darwin";
# url = "github:nixos/nixpkgs/nixpkgs-unstable";
};
home-manager = {
homeManagerAarch64 = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgsAarch64";
};
homeManagerX86 = {
url = "github:nix-community/home-manager/release-26.05";
inputs.nixpkgs.follows = "nixpkgsX86";
};
nixd = {
url = "github:nix-community/nixd";
};
darwin = {
# url = "github:nix-darwin/nix-darwin";
url = "github:nix-darwin/nix-darwin/nix-darwin-26.05";
inputs.nixpkgs.follows = "nixpkgs";
darwinAarch64 = {
url = "github:nix-darwin/nix-darwin";
inputs.nixpkgs.follows = "nixpkgsAarch64";
};
darwinX86 = {
url = "github:nix-darwin/nix-darwin/nix-darwin-26.05";
inputs.nixpkgs.follows = "nixpkgsX86";
};
brew-src = {
url = "github:Homebrew/brew/master";
url = "github:Homebrew/brew/main";
flake = false;
};
nix-homebrew = {
url = "github:zhaofengli-wip/nix-homebrew";
inputs.brew-src.follows = "brew-src";
};
homebrew-bundle = {
url = "github:homebrew/homebrew-bundle";
flake = false;
};
homebrew-core = {
url = "github:homebrew/homebrew-core";
flake = false;
};
homebrew-cask = {
url = "github:homebrew/homebrew-cask";
flake = false;
};
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
inputs.nixpkgs.follows = "nixpkgsAarch64";
};
nix-vscode-extensions = {
url = "github:nix-community/nix-vscode-extensions";
};
catppuccin = {
url = "github:catppuccin/nix";
};
llm-agents = {
url = "github:numtide/llm-agents.nix";
};
@@ -55,16 +76,19 @@
# url = "github:hraban/mac-app-util";
# };
};
outputs =
{
self,
darwin,
darwinAarch64,
darwinX86,
nix-homebrew,
homebrew-bundle,
homebrew-core,
homebrew-cask,
home-manager,
nixpkgs,
homeManagerAarch64,
homeManagerX86,
nixpkgsAarch64,
nixpkgsX86,
nixd,
sops-nix,
nix-vscode-extensions,
@@ -74,15 +98,33 @@
}@inputs:
let
user = "olaf";
lib = nixpkgsAarch64.lib;
darwinSystems = [
"aarch64-darwin"
"x86_64-darwin"
];
forAllSystems = f: nixpkgs.lib.genAttrs darwinSystems f;
perSystem = {
aarch64-darwin = {
nixpkgs = nixpkgsAarch64;
darwin = darwinAarch64;
home-manager = homeManagerAarch64;
pkgs = nixpkgsAarch64.legacyPackages.aarch64-darwin;
};
x86_64-darwin = {
nixpkgs = nixpkgsX86;
darwin = darwinX86;
home-manager = homeManagerX86;
pkgs = nixpkgsX86.legacyPackages.x86_64-darwin;
};
};
forAllSystems = f: lib.genAttrs darwinSystems f;
devShell =
system:
let
pkgs = nixpkgs.legacyPackages.${system};
pkgs = perSystem.${system}.pkgs;
in
{
default =
@@ -91,27 +133,48 @@
nativeBuildInputs = with pkgs; [
bashInteractive
git
pkgs.nixd
];
shellHook = with pkgs; ''
packages = with pkgs; [
platformio-core
(writeShellScriptBin "python" ''
if [ "$1" = "-m" ] && [ "$2" = "platformio" ]; then
shift 2
exec ${platformio-core}/bin/platformio "$@"
fi
exec ${python3}/bin/python3 "$@"
'')
openocd
avrdude
];
shellHook = ''
export EDITOR=vim
export PLATFORMIO_CORE_DIR="$PWD/.platformio"
'';
buildInputs = with pkgs; [
rnix-lsp
];
};
};
mkApp = scriptName: system: {
type = "app";
program = "${
(nixpkgs.legacyPackages.${system}.writeScriptBin scriptName ''
mkApp =
scriptName: system:
let
pkgs = perSystem.${system}.pkgs;
in
{
type = "app";
program = "${
(pkgs.writeScriptBin scriptName ''
#!/usr/bin/env bash
PATH=${nixpkgs.legacyPackages.${system}.git}/bin:$PATH
PATH=${pkgs.git}/bin:$PATH
echo "Running ${scriptName} for ${system}"
sudo chmod +x ${self}/apps/${system}/${scriptName}
exec ${self}/apps/${system}/${scriptName}
'')
}/bin/${scriptName}";
};
}/bin/${scriptName}";
};
mkDarwinApps = system: {
"apply" = mkApp "apply" system;
"build" = mkApp "build" system;
@@ -121,17 +184,24 @@
in
{
devShells = forAllSystems devShell;
apps = nixpkgs.lib.genAttrs darwinSystems mkDarwinApps;
apps = lib.genAttrs darwinSystems mkDarwinApps;
darwinConfigurations = nixpkgs.lib.genAttrs darwinSystems (
darwinConfigurations = lib.genAttrs darwinSystems (
system:
darwin.lib.darwinSystem {
let
systemConfig = perSystem.${system};
in
systemConfig.darwin.lib.darwinSystem {
inherit system;
specialArgs = inputs;
specialArgs = inputs // {
inherit system;
nixpkgs = systemConfig.nixpkgs;
darwin = systemConfig.darwin;
home-manager = systemConfig.home-manager;
};
modules = [
home-manager.darwinModules.home-manager
systemConfig.home-manager.darwinModules.home-manager
nix-homebrew.darwinModules.nix-homebrew
# mac-app-util.darwinModules.default
{
nix-homebrew = {
inherit user;
@@ -139,17 +209,17 @@
taps = {
"homebrew/homebrew-core" = homebrew-core;
"homebrew/homebrew-cask" = homebrew-cask;
"homebrew/homebrew-bundle" = homebrew-bundle;
};
mutableTaps = false;
autoMigrate = true;
};
home-manager.sharedModules = [
# mac-app-util.homeManagerModules.default
catppuccin.homeModules.catppuccin
];
home-manager.sharedModules =
lib.optionals (system != "x86_64-darwin") [
catppuccin.homeModules.catppuccin
];
}
./hosts/darwin
];
}
+3 -4
View File
@@ -22,9 +22,8 @@ in
};
imports = [
../../modules/darwin/default.nix
../../modules/darwin/home-manager.nix
../../modules/shared
];
# Setup user, packages, programs
@@ -115,8 +114,8 @@ in
use-package
];
})
]
++ (import ../../modules/shared/packages.nix { inherit pkgs llm-agents; })
]
++ (import ../../modules/darwin/packages.nix { inherit pkgs llm-agents; })
;
+6 -9
View File
@@ -3,7 +3,7 @@ _:
[
# Development Tools
"arduino-ide"
"homebrew/cask/docker-desktop"
"docker-desktop"
"iterm2"
"oracle-jdk"
"visual-studio-code"
@@ -13,10 +13,8 @@ _:
"gimp"
"inkscape"
"vcv-rack"
#"affinity-designer"
#"affinity-photo"
#"affinity-publisher"
"affinity"
# Communication Tools
"adium"
"discord"
@@ -35,7 +33,7 @@ _:
"daisydisk"
"karabiner-elements"
"keybase"
"spamsieve"
"spamsieve"
"syncthing-app"
"synology-drive"
@@ -57,14 +55,13 @@ _:
"element"
"gpg-suite"
"macdown-3000"
"mailmate"
"mailmate@beta"
"orcaslicer"
"remanager"
"qmk-toolbox"
"smartsheet"
"spamsieve"
# "sqlitestudio" # Doesn't work without Rosetta
"tigervnc"
# "virtualbox" # build error?
"copilot-cli"
@@ -1,10 +1,9 @@
{ config, pkgs, ... }:
let
emacsOverlaySha256 = "0pqnl05j86pyvrlqh5kk4sximi749xqgiffq47grw7v98nqd2yin";
emacsOverlaySha256 = "0h15850dpx3p2jr5g4nv0gir0w9dgml1mqzc5yq8686y246r33br";
in
{
home-manager.backupFileExtension = "nix-backup";
nixpkgs = {
config = {
@@ -18,7 +17,6 @@ in
};
overlays =
# Apply each overlay found in the /overlays directory
let path = ../../overlays; in with builtins;
map (n: import (path + ("/" + n)))
(filter (n: match ".*\\.nix" n != null ||
@@ -31,4 +29,4 @@ in
}))
];
};
}
}
+2
View File
@@ -12,6 +12,8 @@ let
in
{
# Shared file definitions moved into the Darwin module set.
# Raycast script so that "Run Emacs" is available and uses Emacs daemon
"${xdg_dataHome}/bin/emacsclient" = {
executable = true;
+432 -22
View File
@@ -4,6 +4,7 @@
lib,
home-manager,
llm-agents,
system,
...
}:
@@ -14,7 +15,6 @@ let
#!/bin/sh
emacs &
'';
sharedFiles = import ../shared/files.nix { inherit config pkgs; };
additionalFiles = import ./files.nix { inherit user config pkgs; };
in
{
@@ -33,12 +33,15 @@ in
homebrew = {
enable = true;
global = {
brewfile = true;
};
casks = pkgs.callPackage ./casks.nix { };
onActivation = {
cleanup = "uninstall";
cleanup = "none";
autoUpdate = true;
upgrade = true;
};
# These app IDs are from using the mas CLI app
@@ -57,23 +60,24 @@ in
"Affinity Designer 2" = 1616831348;
"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)
"Fedistar" = 6445863996; # (1.13.1)
"Home Assistant" = 1099568401; # (2025.7.1)
"Ice Cubes for Mastodon" = 6444915884; # (1.11.3)
"LibreOffice" = 1630474372;
"Monal - XMPP Chatting " = 1637078500;
"MQTT Explorer" = 1455214828; # (0.3.5)
"Night Sky" = 475772902; # 475772902
"Native SQLite Manager" = 1416282836; # (1.31.0)
"Remarkable Desktop" = 1276493162; # (3.19.0)
"Slack for Desktop" = 803453959; # (4.45.60)
"WiFi Explorer: Scanner" = 494803304; # (3.5.6)
"Windows App Installer" = 1295203466; # (1.0.16)
"Wireguard" = 1451685025; # (1.0.16)
### "1Password: Password Manager" = 1511601750; # (8.11.0) Does not seem to insta
}
// lib.optionalAttrs (system != "x86_64-darwin") {
"Night Sky" = 475772902; # 475772902
};
};
@@ -92,36 +96,441 @@ 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; };
}
// lib.optionalAttrs (system != "x86_64-darwin") {
catppuccin = {
autoEnable = true;
enable = true;
flavor = "mocha";
};
}
// {
programs = {
alacritty = {
enable = true;
settings = {
cursor = {
style = "Block";
};
window = {
opacity = 1.0;
padding = {
x = 24;
y = 24;
};
};
font = {
normal = {
family = "MesloLGS NF";
style = "Regular";
};
size = lib.mkMerge [
(lib.mkIf pkgs.stdenv.hostPlatform.isLinux 10)
(lib.mkIf pkgs.stdenv.hostPlatform.isDarwin 14)
];
};
dynamic_padding = true;
decorations = "full";
title = "Terminal";
class = {
instance = "Alacritty";
general = "Alacritty";
};
colors = {
primary = {
background = "0x1f2528";
foreground = "0xc0c5ce";
};
normal = {
black = "0x1f2528";
red = "0xec5f67";
green = "0x99c794";
yellow = "0xfac863";
blue = "0x6699cc";
magenta = "0xc594c5";
cyan = "0x5fb3b3";
white = "0xc0c5ce";
};
bright = {
black = "0x65737e";
red = "0xec5f67";
green = "0x99c794";
yellow = "0xfac863";
blue = "0x6699cc";
magenta = "0xc594c5";
cyan = "0x5fb3b3";
white = "0xd8dee9";
};
};
};
};
ssh = {
enable = true;
enableDefaultConfig = false;
settings = {
"*" = {
forwardAgent = false;
addKeysToAgent = "no";
compression = false;
serverAliveInterval = 0;
serverAliveCountMax = 3;
hashKnownHosts = false;
userKnownHostsFile = "~/.ssh/known_hosts";
controlMaster = "no";
controlPath = "~/.ssh/master-%r@%n:%p";
controlPersist = "no";
};
"moonunit.kolkman.org" = {
hostname = "moonunit.kolkman.org";
user = "root";
port = 2222;
};
"proxy.kolkman.org".forwardAgent = true;
"NUC25".forwardAgent = true;
"NUC".forwardAgent = true;
"vps3.evangineer.net".forwardAgent = true;
"vps2.evangineer.net".forwardAgent = true;
};
includes = [
(lib.mkIf pkgs.stdenv.hostPlatform.isLinux "/home/${user}/.ssh/config_external")
(lib.mkIf pkgs.stdenv.hostPlatform.isDarwin "/Users/${user}/.ssh/config_external")
];
};
gpg = {
enable = true;
settings = {
default-key = "01B157D574FEDBB2";
no-emit-version = true;
auto-key-retrieve = true;
personal-digest-preferences = "SHA512 SHA384 SHA256 SHA224";
};
};
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
if [[ "$TERM" == "alacritty" ]]; then
export TERMINFO_DIRS="$HOME/.nix-profile/share/terminfo:/run/current-system/sw/share/terminfo:/nix/var/nix/profiles/default/share/terminfo:/usr/share/terminfo"
if ! infocmp alacritty >/dev/null 2>&1; then
export TERM="xterm-256color"
fi
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
"" Easier to yank entire line
nnoremap Y y$
"" Move buffers
nnoremap <tab> :bnext<cr>
nnoremap <S-tab> :bprev<cr>
"" Like a boss, sudo AFTER opening the file to write
cmap w!! w !sudo tee % >/dev/null
let g:startify_lists = [
\ { 'type': 'dir', 'header': [' Current Directory '. getcwd()] },
\ { 'type': 'sessions', 'header': [' Sessions'] },
\ { 'type': 'bookmarks', 'header': [' Bookmarks'] }
\ ]
let g:startify_bookmarks = [
\ '~/.local/share/src',
\ ]
let g:airline_theme='bubblegum'
let g:airline_powerline_fonts = 1
'';
};
tmux = {
enable = true;
plugins = with pkgs.tmuxPlugins; [
vim-tmux-navigator
sensible
yank
prefix-highlight
{
plugin = power-theme;
extraConfig = ''
set -g @tmux_power_theme 'gold'
'';
}
{
plugin = resurrect; # Used by tmux-continuum
# Use XDG data directory
# https://github.com/tmux-plugins/tmux-resurrect/issues/348
extraConfig = ''
set -g @resurrect-dir '$HOME/.cache/tmux/resurrect'
set -g @resurrect-capture-pane-contents 'on'
set -g @resurrect-pane-contents-area 'visible'
'';
}
{
plugin = continuum;
extraConfig = ''
set -g @continuum-restore 'on'
set -g @continuum-save-interval '5' # minutes
'';
}
];
terminal = "screen-256color";
prefix = "C-x";
escapeTime = 10;
historyLimit = 50000;
extraConfig = ''
# Remove Vim mode delays
set -g focus-events on
# Enable full mouse support
set -g mouse on
# -----------------------------------------------------------------------------
# Key bindings
# -----------------------------------------------------------------------------
# Unbind default keys
unbind C-b
unbind '"'
unbind %
# Split panes, vertical or horizontal
bind-key x split-window -v
bind-key v split-window -h
# Move around panes with vim-like bindings (h,j,k,l)
bind-key -n M-k select-pane -U
bind-key -n M-h select-pane -L
bind-key -n M-j select-pane -D
bind-key -n M-l select-pane -R
# Smart pane switching with awareness of Vim splits.
# This is copy paste from https://github.com/christoomey/vim-tmux-navigator
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(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'
tmux_version='$(tmux -V | sed -En "s/^tmux ([0-9]+(.[0-9]+)?).*/\1/p")'
if-shell -b '[ "$(echo "$tmux_version < 3.0" | bc)" = 1 ]' \
"bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\' 'select-pane -l'"
if-shell -b '[ "$(echo "$tmux_version >= 3.0" | bc)" = 1 ]' \
"bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\\\' 'select-pane -l'"
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-key -T copy-mode-vi 'C-\' select-pane -l
'';
};
};
services = {
gpg-agent = {
enable = true;
enableSshSupport = true;
extraConfig = ''
default-cache-ttl 600
max-cache-ttl 7200
pinentry-program /Users/olaf/.nix-profile/bin/pinentry-mac
default-cache-ttl 600
max-cache-ttl 7200
pinentry-program /Users/olaf/.nix-profile/bin/pinentry-mac
'';
};
};
# Marked broken Oct 20, 2022 check later to remove this
# https://github.com/nix-community/home-manager/issues/3344
manual.manpages.enable = false;
@@ -176,6 +585,7 @@ in
{ path = "/Applications/Microsoft Word.app/"; }
{ path = "/Applications/Microsoft PowerPoint.app/"; }
{ path = "/Applications/Microsoft Teams.app/"; }
{ path = "/Applications/Affinity.app/"; }
{ path = "/Applications/Monal.app/"; }
{ path = "/System/Applications/Utilities/Screen Sharing.app/"; }
{ path = "/run/current-system/Applications/Emacs.app/"; }
+201 -6
View File
@@ -1,12 +1,207 @@
{ pkgs, llm-agents }:
with pkgs;
let
shared-packages = import ../shared/packages.nix { inherit pkgs llm-agents; };
in
shared-packages
++ [
dockutil
[
# Nix
nixd
mas
# X11
libx11
libxt
libxext
libxrender
libxrandr
xterm
# security and some such
# bitwarden-desktop #Does not compile properly
# bitwarden-cli # Fails on i386
yubikey-manager # provides ykman
pinentry_mac
# General packages for development and system management
alacritty
ansible
aspell
aspellDicts.en
bash-completion
bat
btop
coreutils
difftastic
freerdp
htop
killall
minicom
mtr
ncdu
nodejs
fastfetch
nixfmt
openssh
postgresql
sqlite
unrar
wget
zip
# Development
act
autoconf
autoconf-archive
automake
ccache
clang-tools
cmake
dfu-util
go
jd-diff-patch # json diff patch
jq # json tool
llvm
nasm
ninja
pkg-config
# Encryption and security tools
age
gnupg
just
libfido2
sops
# Cloud-related tools and SDKs
docker
docker-compose
# Media-related packages
darktable
fd
ffmpeg
imagemagick
scour
# Text and terminal utilities
hunspell
iftop
inetutils # includes Telnet
ripgrep
tmux
tree
unzip
# Python packages
virtualenv
uv
(python3.withPackages (
python-pkgs: with python-pkgs; [
bidict
blinker
certifi
charset-normalizer
click
flask
flask-socketio
h11
idna
importlib-metadata
itsdangerous
jinja2
markupsafe
mercantile
numpy
pandas
pillow
python-engineio
python-socketio
requests
shapely
simple-websocket
tkinter
tqdm
urllib3
werkzeug
wsproto
zipp
]
++ lib.optionals pkgs.stdenv.hostPlatform.isAarch64 [
mlx-lm
]
))
# LLM
ollama # Launchd definition in hosts/darwin/default.nix
# Social
pidgin
# Rust Related
rustc
cargo
platformio-core
# XML, Tex and LaTex
mdbook
pandoc
rubyPackages_3_4.kramdown-rfc2629
tex-fmt
xml2rfc
zotero
(texlive.combine {
inherit (texlive)
apa6
apa7
apacite
biber
biblatex
biblatex-apa6
bibunits
catchfile
cjk
comment
courier
csquotes
draftwatermark
endfloat
enumitem
fancyhdr
fontawesome5
footmisc
footnotehyper
geometry
ifmtarg
latexmk
lipsum
lualatex-math
makecell
microtype
multirow
nowidow
parskip
ragged2e
scalerel
scheme-small
selnolig
sourcesanspro
svg
tcolorbox
texcount
threeparttable
tikzfill
titlesec
titling
tocloft
transparent
upquote
url
xecjk
xifthen
xurl
;
})
dockutil
]
-16
View File
@@ -1,16 +0,0 @@
## Shared
Much of the code running on macOS is actually found here.
This configuration gets imported by both modules. Some configuration examples include `git`, `zsh`, `vim`, and `tmux`.
## Layout
```
.
├── config # Config files not written in Nix
├── cachix # Defines cachix, a global cache for builds
├── default.nix # Defines how we import overlays
├── files.nix # Non-Nix, static configuration files (now immutable!)
├── home-manager.nix # The goods; most all shared config lives here
├── packages.nix # List of packages to share
```
-12
View File
@@ -1,12 +0,0 @@
{ pkgs, config, ... }:
# let
# githubPublicKey = "ssh-ed25519 AAAA...";
# in
{
# ".ssh/id_github.pub" = {
# text = githubPublicKey;
# };
}
-427
View File
@@ -1,427 +0,0 @@
{
config,
pkgs,
lib,
...
}:
let
name = "olaf";
user = "olaf";
email = "olaf@xolx.nl";
in
{
gpg = {
enable = true;
settings = {
default-key = "01B157D574FEDBB2" ;
no-emit-version = true;
auto-key-retrieve = true;
personal-digest-preferences= "SHA512 SHA384 SHA256 SHA224";
};
};
# Shared shell configuration
zsh = {
enable = true;
autocd = false;
cdpath = [ "~/.local/share/src" ];
oh-my-zsh = {
enable = true;
plugins = [ ];
# theme = "fishy";
# theme = "ys";
theme = "mrtazz";
};
# plugins = [ ];
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
# Use difftastic, syntax-aware diffing
# alias diff=difft
'';
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 = name;
email = email;
};
};
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
"" Easier to yank entire line
nnoremap Y y$
"" Move buffers
nnoremap <tab> :bnext<cr>
nnoremap <S-tab> :bprev<cr>
"" Like a boss, sudo AFTER opening the file to write
cmap w!! w !sudo tee % >/dev/null
let g:startify_lists = [
\ { 'type': 'dir', 'header': [' Current Directory '. getcwd()] },
\ { 'type': 'sessions', 'header': [' Sessions'] },
\ { 'type': 'bookmarks', 'header': [' Bookmarks'] }
\ ]
let g:startify_bookmarks = [
\ '~/.local/share/src',
\ ]
let g:airline_theme='bubblegum'
let g:airline_powerline_fonts = 1
'';
};
alacritty = {
enable = true;
settings = {
cursor = {
style = "Block";
};
window = {
opacity = 1.0;
padding = {
x = 24;
y = 24;
};
};
font = {
normal = {
family = "MesloLGS NF";
style = "Regular";
};
size = lib.mkMerge [
(lib.mkIf pkgs.stdenv.hostPlatform.isLinux 10)
(lib.mkIf pkgs.stdenv.hostPlatform.isDarwin 14)
];
};
dynamic_padding = true;
decorations = "full";
title = "Terminal";
class = {
instance = "Alacritty";
general = "Alacritty";
};
colors = {
primary = {
background = "0x1f2528";
foreground = "0xc0c5ce";
};
normal = {
black = "0x1f2528";
red = "0xec5f67";
green = "0x99c794";
yellow = "0xfac863";
blue = "0x6699cc";
magenta = "0xc594c5";
cyan = "0x5fb3b3";
white = "0xc0c5ce";
};
bright = {
black = "0x65737e";
red = "0xec5f67";
green = "0x99c794";
yellow = "0xfac863";
blue = "0x6699cc";
magenta = "0xc594c5";
cyan = "0x5fb3b3";
white = "0xd8dee9";
};
};
};
};
ssh = {
enable = true;
enableDefaultConfig = false;
settings= {
"*" = {
forwardAgent = false;
addKeysToAgent = "no";
compression = false;
serverAliveInterval = 0;
serverAliveCountMax = 3;
hashKnownHosts = false;
userKnownHostsFile = "~/.ssh/known_hosts";
controlMaster = "no";
controlPath = "~/.ssh/master-%r@%n:%p";
controlPersist = "no";
};
"moonunit.kolkman.org" = {
hostname = "moonunit.kolkman.org";
user = "root";
port = 2222;
};
};
includes = [
(lib.mkIf pkgs.stdenv.hostPlatform.isLinux "/home/${user}/.ssh/config_external")
(lib.mkIf pkgs.stdenv.hostPlatform.isDarwin "/Users/${user}/.ssh/config_external")
];
};
tmux = {
enable = true;
plugins = with pkgs.tmuxPlugins; [
vim-tmux-navigator
sensible
yank
prefix-highlight
{
plugin = power-theme;
extraConfig = ''
set -g @tmux_power_theme 'gold'
'';
}
{
plugin = resurrect; # Used by tmux-continuum
# Use XDG data directory
# https://github.com/tmux-plugins/tmux-resurrect/issues/348
extraConfig = ''
set -g @resurrect-dir '$HOME/.cache/tmux/resurrect'
set -g @resurrect-capture-pane-contents 'on'
set -g @resurrect-pane-contents-area 'visible'
'';
}
{
plugin = continuum;
extraConfig = ''
set -g @continuum-restore 'on'
set -g @continuum-save-interval '5' # minutes
'';
}
];
terminal = "screen-256color";
prefix = "C-x";
escapeTime = 10;
historyLimit = 50000;
extraConfig = ''
# Remove Vim mode delays
set -g focus-events on
# Enable full mouse support
set -g mouse on
# -----------------------------------------------------------------------------
# Key bindings
# -----------------------------------------------------------------------------
# Unbind default keys
unbind C-b
unbind '"'
unbind %
# Split panes, vertical or horizontal
bind-key x split-window -v
bind-key v split-window -h
# Move around panes with vim-like bindings (h,j,k,l)
bind-key -n M-k select-pane -U
bind-key -n M-h select-pane -L
bind-key -n M-j select-pane -D
bind-key -n M-l select-pane -R
# Smart pane switching with awareness of Vim splits.
# This is copy paste from https://github.com/christoomey/vim-tmux-navigator
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(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'
tmux_version='$(tmux -V | sed -En "s/^tmux ([0-9]+(.[0-9]+)?).*/\1/p")'
if-shell -b '[ "$(echo "$tmux_version < 3.0" | bc)" = 1 ]' \
"bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\' 'select-pane -l'"
if-shell -b '[ "$(echo "$tmux_version >= 3.0" | bc)" = 1 ]' \
"bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\\\' 'select-pane -l'"
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-key -T copy-mode-vi 'C-\' select-pane -l
'';
};
}
-39
View File
@@ -1,39 +0,0 @@
(vscode-with-extensions.override {
vscodeExtensions =
with vscode-extensions;
[
#bbenoist.nix
jnoortheen.nix-ide
ms-python.python
ms-azuretools.vscode-docker
# ms-vscode-remote.remote-ssh
# ms-vscode.cpptools
eamodio.gitlens
]
++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
# {
# name = "remote-ssh-edit";
# publisher = "ms-vscode-remote";
# version = "0.47.2";
# sha256 = "1hp6gjh4xp2m1xlm1jsdzxw9d8frkiidhph6nvl24d0h8z34w49g";
# }
{
name = "cpptools";
publisher = "ms-vscode";
version = "1.26.1";
sha256 = "sha256-uVE7sEO8XN3ArFpElUw25/BKyCOzF1EmZ5nHBkdoL/0=";
}
# {
# name = "minifyall";
# publisher = "josee9988";
# version = "2.10";
# }
{
name = "platformio-ide";
publisher = "platformio";
version = "3.3.4";
sha256 = "sha256-qfNz4IYjCmCMFLtAkbGTW5xnsVT8iDnFWjrgkmr2Slk=";
}
];
})
-231
View File
@@ -1,231 +0,0 @@
{ pkgs, llm-agents }:
with pkgs;
[
# Nix
nixd
mas
# X11
libx11
libxt
libxext
libxrender
libxrandr
xterm
# The Web Browsers
# maintained by in homebrew
# security and some such
# bitwarden-desktop #Does not compile properly
# bitwarden-cli # Fails on i386
yubikey-manager # provides ykman
pinentry_mac
# General packages for development and system management
alacritty
ansible
aspell
aspellDicts.en
bash-completion
bat
btop
coreutils
difftastic
htop
killall
minicom
mtr
ncdu
nodejs
fastfetch
nixfmt
openssh
postgresql
sqlite
unrar
wget
zip
# Development
act
autoconf
autoconf-archive
automake
ccache
clang-tools
cmake
dfu-util
go
jd-diff-patch # json diff patch
jq # json tool
llvm
nasm
ninja
pkg-config
# Encryption and security tools
age
gnupg
just
libfido2
sops
# Cloud-related tools and SDKs
docker
docker-compose
# Media-related packages
fd
ffmpeg
imagemagick
# Node.js development tools
#nodePackages.npm # globally install npm
#nodePackages.prettier
# Text and terminal utilities
htop
hunspell
iftop
inetutils # includes Telnet
jq
ripgrep
tmux
tree
unrar
unzip
# zsh-powerlevel10k
# Python packages
# python3
virtualenv
uv
(python3.withPackages (
python-pkgs: with python-pkgs; [
bidict
blinker
certifi
charset-normalizer
click
flask
flask-socketio
h11
idna
importlib-metadata
itsdangerous
jinja2
markupsafe
mercantile
mlx-lm
numpy
pandas
pillow
pillow
python-engineio
python-socketio
requests
requests
shapely
simple-websocket
tkinter
tqdm
urllib3
werkzeug
wsproto
zipp
]
))
# LLM
ollama # Launchd definition in hosts/darwin/default.nix
# Social
pidgin
# Rust Related
rustc
cargo
platformio-core
# XML, Tex and LaTex
mdbook
pandoc
rubyPackages_3_4.kramdown-rfc2629
tex-fmt
xml2rfc
zotero
(texlive.combine {
inherit (texlive)
apa6
apa7
apacite
biber
biblatex
biblatex-apa6
bibunits
catchfile
cjk
comment
courier
csquotes
draftwatermark
endfloat
enumitem
fancyhdr
fontawesome5
footmisc
footnotehyper
geometry
ifmtarg
latexmk
lipsum
lualatex-math
makecell
microtype
multirow
nowidow
parskip
ragged2e
scalerel
scheme-small
selnolig
sourcesanspro
svg
tcolorbox
texcount
threeparttable
tikzfill
titlesec
titling
tocloft
transparent
upquote
url
xecjk
xifthen
xurl
;
})
]
### Agents from https://github.com/numtide/llm-agents.nix
++ (with llm-agents.packages.${pkgs.stdenv.hostPlatform.system}; [
hermes-desktop
hermes-hud
])