phase 2: move home-manager/ → home/{profiles,progs,util,wallpaper}

This commit is contained in:
primary
2026-04-18 00:48:08 -04:00
parent 30d8cf4c99
commit d13cec76ba
27 changed files with 0 additions and 0 deletions

29
home/profiles/desktop.nix Normal file
View File

@@ -0,0 +1,29 @@
{
config,
lib,
pkgs,
...
}:
{
imports = [
# niri wayland compositor
./progs/niri.nix
# lockscreen
./progs/swaylock.nix
# notification daemon
./progs/dunst.nix
# noctalia desktop shell
./progs/noctalia.nix
];
home.packages = with pkgs; [
wdisplays
blueman
# used by /etc/nixos logic to launch niri
config.programs.niri.package
];
}

230
home/profiles/gui.nix Normal file
View File

@@ -0,0 +1,230 @@
{
pkgs,
lib,
inputs,
config,
...
}:
{
imports = [
./no-gui.nix
# ./progs/ghostty.nix
./progs/alacritty.nix
./progs/emacs.nix
# ./progs/trezor.nix # - broken
./progs/flatpak.nix
./progs/zen
];
nixpkgs.config.allowUnfreePredicate =
pkg:
builtins.elem (lib.getName pkg) [
"apple_cursor"
"grayjay"
];
home.packages =
with pkgs;
lib.concatLists [
# libreoffice
[
libreoffice
hunspell # spellcheck
hunspellDicts.en_US # spellcheck dictionary
]
# browsers
[
tor-browser
grayjay
]
# music library management
[
picard
puddletag
lrcget
]
# image editing
[
darktable
rawtherapee
hugin
gimp3
pinta
]
[
#calculator
gnome-calculator
# audio editing
audacity
#fonts
noto-fonts
noto-fonts-color-emoji
liberation_ttf
#for ebook reading
foliate
#audio mixer (pavucontrol but for pipewire)
pwvucontrol
# minecraft launcher
prismlauncher
mpv
mumble
system76-keyboard-configurator
#jellyfin
finamp # music player
delfin # jellyfin client
signal-desktop
# accounting
# gnucash
# image tools
inkscape
nomacs
# partitioning utilities
gparted
gnome-disk-utility
# small nicities
wl-clipboard # wl-copy & wl-paste
libnotify # notifications library
xdg-utils # xdg utils
wireshark
nautilus
nufraw-thumbnailer
gdk-pixbuf
enblend-enfuse
# simple screen recording on wayland
wl-screenrec
# wayland-compatible color picker
hyprpicker
blender
ghidra-bin
# for mod organizer 2
zenity
p7zip
# password manager
keepassxc
freecad-wayland
localsend
# openstreetmap
josm
# in unstable ATM, gotta wait for it to hit stable
# video-trimmer
]
# all the fonts
(builtins.filter lib.isDerivation (builtins.attrValues nerd-fonts))
];
# programs.zed-editor = {
# enable = true;
# userSettings = {
# ui_font_size = 16;
# buffer_font_size = 16;
# theme = {
# mode = "system";
# light = "Gruvbox Dark Hard";
# dark = "One Dark";
# };
# };
# extensions = [
# "nix"
# "sql"
# "CSV"
# "assembly"
# ];
# };
# make chromium-based stuff use wayland
home.file.".config/chromium-flags.conf".text = "--ozone-platform-hint=auto";
# dark mode
dconf.settings = {
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
};
};
home.sessionVariables = {
LD_LIBRARY_PATH = "${pkgs.lib.makeLibraryPath [
pkgs.stdenv.cc.cc
]}";
};
# allow extra fonts to be detected by fontconfig
fonts.fontconfig.enable = true;
# gtk application theming
gtk = {
enable = true;
# make gtk3 applications look like libadwaita applications!
theme = {
package = pkgs.adw-gtk3;
name = "adw-gtk3-dark";
};
# gtk4 apps use libadwaita natively, no theme package needed
gtk4.theme = null;
iconTheme = {
package = pkgs.adwaita-icon-theme;
name = "Adwaita";
};
};
# qt application theming - BROKEN and on fire
# qt = {
# enable = true;
# platformTheme = {
# name = "adwaita";
# package = [
# pkgs.adwaita-qt
# pkgs.adwaita-qt6
# ];
# };
# style = {
# name = "adwaita-dark";
# package = pkgs.adwaita-qt;
# };
# };
# macOS cursor!
home.pointerCursor = {
gtk.enable = true;
package = pkgs.apple-cursor;
name = "macOS";
size = 24;
};
dconf.settings = {
"org/virt-manager/virt-manager/connections" = {
autoconnect = [ "qemu:///system" ];
uris = [ "qemu:///system" ];
};
};
}

262
home/profiles/no-gui.nix Normal file
View File

@@ -0,0 +1,262 @@
{
pkgs,
inputs,
lib,
homeDirectory,
config,
username,
stateVersion,
...
}:
let
rust_pkgs = with pkgs; [
(rust-bin.nightly.latest.default.override ({
extensions = [
"rust-src"
"rust-analyzer"
"clippy"
"rustfmt"
"rust-std"
"cargo"
];
# thumbv7m-none-eabi target for stm32
targets = [
"thumbv7m-none-eabi"
"wasm32-unknown-unknown"
];
}))
cargo-expand
cargo-edit # cargo upgrade and stuff
cargo-pgo
rust-script
bolt_19
libllvm # llvm-profdata
cargo-show-asm
cargo-flamegraph
];
lsps = with pkgs; [
# java
jdt-language-server
# HTML/CSS/JSON/ESLint language servers
vscode-langservers-extracted
nil # nix lsp
yaml-language-server # yaml lsp
marksman # markdown lsp
typescript-language-server # typescript lsp
cmake-language-server # cmake lsp
typescript
];
java_tools = with pkgs; [
# java development
google-java-format # formatter
jdk # java
# java assembler # BUG! broken
# jasmin
];
common_tools = with pkgs; [
# hex viewer
hexyl
# find typos in code
typos
# replacements for common posix tools
eza # ls replacement
bat # pretty `cat` clone
delta # viewer for `git` and `diff` output
dust # pretty `du` version
duf # better `df` clone
gping # `ping`... but with a graph!!
tldr # `man` but more straight-forward and simpler
ripgrep # grep, but written in rust, respects .gitignore, and very very fast, command is `rg`
fd # alternative to `find`
# status tools
htop
bottom
# other tools
unzip
wget
killall
file
b3sum
# "A hexadecimal, binary, and ASCII dump utility with color support"
tinyxxd
# networking tool
lsof
# view SMART status of drives
smartmontools
# adds `sensors` command
lm_sensors
# lspci
pciutils
# convert between various units
units
jq
# DNS things
dig
bun
];
in
{
imports = [
./progs/fish.nix
./progs/helix.nix
./progs/pi.nix
(
{ ... }:
{
nixpkgs.overlays = [
inputs.rust-overlay.overlays.default
];
}
)
];
home.stateVersion = stateVersion;
home.packages =
with pkgs;
lib.concatLists [
[
# python formatter
ruff
# for website generation
hugo
go
# for benchmaking stuff
hyperfine
pfetch-rs
waypipe
sshfs
# nix formatter
nixfmt-tree
# serial viewer
minicom
# "~~matt's~~ my trace route"
mtr
ffmpeg-full
# microcontroller tooling
probe-rs-tools
(python313.withPackages (
ps: with ps; [
mypy # type checking
types-requests # add types for requests methods
python-lsp-server # lsp
python-lsp-ruff # ruff integration
pyserial
numpy
matplotlib
notebook
pandas
]
))
binwalk
# clang-format and clang-tidy
clang-tools
clang
gdb
git-crypt
imagemagick
nixpkgs-review
nmap
# terminal image viewer
timg
tcpdump
borgbackup
# used to deploy nix system to server
# (and in the future, desktop)
deploy-rs
# power stuff
powerstat
yt-dlp
]
rust_pkgs
lsps
java_tools
common_tools
];
# https://github.com/flamegraph-rs/flamegraph
home.file.".cargo/config.toml".text = ''
[target.${lib.strings.removeSuffix "-linux" pkgs.stdenv.hostPlatform.system}-unknown-linux-gnu]
linker = "${lib.getExe pkgs.clang}"
rustflags = ["-Clink-arg=-Wl,--no-rosegment"]
'';
# git (self explanatory)
programs.git = {
enable = true;
package = pkgs.git;
lfs.enable = true;
ignores = [ ".sisyphus" ];
settings = {
init = {
# master -> main
defaultBranch = "main";
};
push.autoSetupRemote = true;
user = {
name = "Simon Gardling";
email = "titaniumtown@proton.me";
};
};
# gpg signing keys
signing = {
key = "9AB28AC10ECE533D";
signByDefault = true;
};
};
# better way to view diffs
programs.delta = {
enable = true;
enableGitIntegration = true;
};
}

131
home/progs/alacritty.nix Normal file
View File

@@ -0,0 +1,131 @@
{ pkgs, ... }:
{
home.sessionVariables = {
TERMINAL = "alacritty";
};
programs.alacritty = {
enable = true;
package = pkgs.alacritty;
settings = {
# some programs can't handle alacritty
env.TERM = "xterm-256color";
window = {
# using a window manager, no decorations needed
decorations = "none";
# semi-transparent
opacity = 0.90;
# padding between the content of the terminal and the edge
padding = {
x = 10;
y = 10;
};
dimensions = {
columns = 80;
lines = 40;
};
};
scrolling = {
history = 1000;
multiplier = 3;
};
font =
let
baseFont = {
family = "JetBrains Mono Nerd Font";
style = "Regular";
};
in
{
size = 12;
normal = baseFont;
bold = baseFont // {
style = "Bold";
};
italic = baseFont // {
style = "Italic";
};
offset.y = 0;
glyph_offset.y = 0;
};
# color scheme
colors =
let
normal = {
black = "0x1b1e28";
red = "0xd0679d";
green = "0x5de4c7";
yellow = "0xfffac2";
blue = "#435c89";
magenta = "0xfcc5e9";
cyan = "0xadd7ff";
white = "0xffffff";
};
bright = {
black = "0xa6accd";
red = normal.red;
green = normal.green;
yellow = normal.yellow;
blue = normal.cyan;
magenta = "0xfae4fc";
cyan = "0x89ddff";
white = normal.white;
};
in
{
inherit normal bright;
primary = {
background = "0x131621";
foreground = bright.black;
};
cursor = {
text = "CellBackground";
cursor = "CellForeground";
};
search =
let
foreground = normal.black;
background = normal.cyan;
in
{
matches = {
inherit foreground background;
};
focused_match = {
inherit foreground background;
};
};
selection = {
text = "CellForeground";
background = "0x303340";
};
vi_mode_cursor = {
text = "CellBackground";
cursor = "CellForeground";
};
};
cursor = {
style = "Underline";
vi_mode_style = "Underline";
};
};
};
}

38
home/progs/borg.nix Normal file
View File

@@ -0,0 +1,38 @@
{ pkgs, homeDirectory, ... }:
{
programs.borgmatic = {
enable = true;
package = pkgs.borgmatic;
backups = {
home = {
location = {
sourceDirectories = (
map (f: "${homeDirectory}/${f}") [
".local/share/fish"
".ssh"
"Documents"
"projects"
"Pictures"
"school"
]
);
excludeHomeManagerSymlinks = true;
repositories = [ "ssh://server-public/tank/bak/laptop" ];
extraConfig = {
compression = "zstd";
};
};
retention = {
keepHourly = 10;
keepDaily = 30;
keepWeekly = 8;
keepMonthly = 2;
keepYearly = 0;
};
};
};
};
}

View File

@@ -0,0 +1,97 @@
;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-
;; Place your private configuration here! Remember, you do not need to run 'doom
;; sync' after modifying this file!
;; Some functionality uses this to identify you, e.g. GPG configuration, email
;; clients, file templates and snippets. It is optional.
;; (setq user-full-name "John Doe"
;; user-mail-address "john@doe.com")
;; Doom exposes five (optional) variables for controlling fonts in Doom:
;;
;; - `doom-font' -- the primary font to use
;; - `doom-variable-pitch-font' -- a non-monospace font (where applicable)
;; - `doom-big-font' -- used for `doom-big-font-mode'; use this for
;; presentations or streaming.
;; - `doom-symbol-font' -- for symbols
;; - `doom-serif-font' -- for the `fixed-pitch-serif' face
;;
;; See 'C-h v doom-font' for documentation and more examples of what they
;; accept. For example:
;;
;;(setq doom-font (font-spec :family "Fira Code" :size 12 :weight 'semi-light)
;; doom-variable-pitch-font (font-spec :family "Fira Sans" :size 13))
;;
;; If you or Emacs can't find your font, use 'M-x describe-font' to look them
;; up, `M-x eval-region' to execute elisp code, and 'M-x doom/reload-font' to
;; refresh your font settings. If Emacs still can't find your font, it likely
;; wasn't installed correctly. Font issues are rarely Doom issues!
;; There are two ways to load a theme. Both assume the theme is installed and
;; available. You can either set `doom-theme' or manually load a theme with the
;; `load-theme' function. This is the default:
(setq doom-theme 'doom-one)
;; This determines the style of line numbers in effect. If set to `nil', line
;; numbers are disabled. For relative line numbers, set this to `relative'.
(setq display-line-numbers-type t)
;; If you use `org' and don't want your org files in the default location below,
;; change `org-directory'. It must be set before org loads!
(setq org-directory "~/org/")
;; Whenever you reconfigure a package, make sure to wrap your config in an
;; `after!' block, otherwise Doom's defaults may override your settings. E.g.
;;
;; (after! PACKAGE
;; (setq x y))
;;
;; The exceptions to this rule:
;;
;; - Setting file/directory variables (like `org-directory')
;; - Setting variables which explicitly tell you to set them before their
;; package is loaded (see 'C-h v VARIABLE' to look up their documentation).
;; - Setting doom variables (which start with 'doom-' or '+').
;;
;; Here are some additional functions/macros that will help you configure Doom.
;;
;; - `load!' for loading external *.el files relative to this one
;; - `use-package!' for configuring packages
;; - `after!' for running code after a package has loaded
;; - `add-load-path!' for adding directories to the `load-path', relative to
;; this file. Emacs searches the `load-path' when you load packages with
;; `require' or `use-package'.
;; - `map!' for binding new keys
;;
;; To get information about any of these functions/macros, move the cursor over
;; the highlighted symbol at press 'K' (non-evil users must press 'C-c c k').
;; This will open documentation for it, including demos of how they are used.
;; Alternatively, use `C-h o' to look up a symbol (functions, variables, faces,
;; etc).
;;
;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how
;; they are implemented.
;; Ctrl + Shift + / = redo
;; Ctrl + / = undo
(after! undo-fu
(map! :map undo-fu-mode-map "C-?" #'undo-fu-only-redo))
;; Fix SPC p p slowness
(after! projectile
(setq projectile-indexing-method 'alien
projectile-enable-caching nil
projectile-project-search-path '("~/projects/"))
(projectile-discover-projects-in-search-path))
;; Packages are already natively compiled by Nix; JIT recompilation
;; just wastes cycles (and the eln-cache is invalidated on every rebuild anyway)
(setq native-comp-jit-compilation nil)
;; line wrapping
(visual-line-mode t)

195
home/progs/doom.d/init.el Normal file
View File

@@ -0,0 +1,195 @@
;;; init.el -*- lexical-binding: t; -*-
;; This file controls what Doom modules are enabled and what order they load
;; in. Remember to run 'doom sync' after modifying it!
;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's
;; documentation. There you'll find a link to Doom's Module Index where all
;; of our modules are listed, including what flags they support.
;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or
;; 'C-c c k' for non-vim users) to view its documentation. This works on
;; flags as well (those symbols that start with a plus).
;;
;; Alternatively, press 'gd' (or 'C-c c d') on a module to browse its
;; directory (for easy access to its source code).
(doom! :input
;;bidi ; (tfel ot) thgir etirw uoy gnipleh
;;chinese
;;japanese
;;layout ; auie,ctsrnm is the superior home row
:completion
;;company ; the ultimate code completion backend
(corfu +orderless) ; complete with cap(f), cape and a flying feather!
;;helm ; the *other* search engine for love and life
;;ido ; the other *other* search engine...
;;ivy ; a search engine for love and life
vertico ; the search engine of the future
:ui
;;deft ; notational velocity for Emacs
doom ; what makes DOOM look the way it does
doom-dashboard ; a nifty splash screen for Emacs
;;doom-quit ; DOOM quit-message prompts when you quit Emacs
;;(emoji +unicode) ; 🙂
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
indent-guides ; highlighted indent columns
ligatures ; ligatures and symbols to make your code pretty again
;;minimap ; show a map of the code on the side
modeline ; snazzy, Atom-inspired modeline, plus API
;;nav-flash ; blink cursor line after big motions
;;neotree ; a project drawer, like NERDTree for vim
ophints ; highlight the region an operation acts on
(popup +defaults) ; tame sudden yet inevitable temporary windows
smooth-scroll ; So smooth you won't believe it's not butter
;;tabs ; a tab bar for Emacs
;;treemacs ; a project drawer, like neotree but cooler
unicode ; extended unicode support for various languages
(vc-gutter +pretty) ; vcs diff in the fringe
vi-tilde-fringe ; fringe tildes to mark beyond EOB
;;window-select ; visually switch windows
workspaces ; tab emulation, persistence & separate workspaces
;;zen ; distraction-free coding or writing
:editor
(evil +everywhere); come to the dark side, we have cookies
file-templates ; auto-snippets for empty files
fold ; (nigh) universal code folding
(format +onsave) ; automated prettiness
;;god ; run Emacs commands without modifier keys
;;lispy ; vim for lisp, for people who don't like vim
;;multiple-cursors ; editing in many places at once
;;objed ; text object editing for the innocent
;;parinfer ; turn lisp into python, sort of
;;rotate-text ; cycle region at point between text candidates
snippets ; my elves. They type so I don't have to
word-wrap ; soft wrapping with language-aware indent
:emacs
dired ; making dired pretty [functional]
electric ; smarter, keyword-based electric-indent
;;eww ; the internet is gross
;;ibuffer ; interactive buffer management
undo ; persistent, smarter undo for your inevitable mistakes
vc ; version-control and Emacs, sitting in a tree
:term
;;eshell ; the elisp shell that works everywhere
;;shell ; simple shell REPL for Emacs
;;term ; basic terminal emulator for Emacs
;;vterm ; the best terminal emulation in Emacs
:checkers
syntax ; tasing you for every semicolon you forget
(spell +flyspell) ; tasing you for misspelling mispelling
grammar ; tasing grammar mistake every you make
:tools
;;ansible
;;biblio ; Writes a PhD for you (citation needed)
;;collab ; buffers with friends
;;debugger ; FIXME stepping through code, to help you add bugs
;;direnv
;;docker
;;editorconfig ; let someone else argue about tabs vs spaces
;;ein ; tame Jupyter notebooks with emacs
(eval +overlay) ; run code, run (also, repls)
lookup ; navigate your code and its documentation
;;llm ; when I said you needed friends, I didn't mean...
lsp ; M-x vscode
magit ; a git porcelain for Emacs
;;make ; run make tasks from Emacs
;;pass ; password manager for nerds
pdf ; pdf enhancements
;;terraform ; infrastructure as code
;;tmux ; an API for interacting with tmux
tree-sitter ; syntax and parsing, sitting in a tree...
;;upload ; map local to remote projects via ssh/ftp
:os
(:if (featurep :system 'macos) macos) ; improve compatibility with macOS
;;tty ; improve the terminal Emacs experience
:lang
;;agda ; types of types of types of types...
;;beancount ; mind the GAAP
(cc +lsp) ; C > C++ == 1
;;clojure ; java with a lisp
;;common-lisp ; if you've seen one lisp, you've seen them all
;;coq ; proofs-as-programs
;;crystal ; ruby at the speed of c
;;csharp ; unity, .NET, and mono shenanigans
;;data ; config/data formats
;;(dart +flutter) ; paint ui and not much else
;;dhall
;;elixir ; erlang done right
;;elm ; care for a cup of TEA?
emacs-lisp ; drown in parentheses
;;erlang ; an elegant language for a more civilized age
;;ess ; emacs speaks statistics
;;factor
;;faust ; dsp, but you get to keep your soul
;;fortran ; in FORTRAN, GOD is REAL (unless declared INTEGER)
;;fsharp ; ML stands for Microsoft's Language
;;fstar ; (dependent) types and (monadic) effects and Z3
;;gdscript ; the language you waited for
;;(go +lsp) ; the hipster dialect
;;(graphql +lsp) ; Give queries a REST
;;(haskell +lsp) ; a language that's lazier than I am
;;hy ; readability of scheme w/ speed of python
;;idris ; a language you can depend on
json ; At least it ain't XML
;;janet ; Fun fact: Janet is me!
(java +lsp) ; the poster child for carpal tunnel syndrome
(javascript +lsp +tree-sitter) ; all(hope(abandon(ye(who(enter(here))))))
;;julia ; a better, faster MATLAB
;;kotlin ; a better, slicker Java(Script)
;;latex ; writing papers in Emacs has never been so fun
;;lean ; for folks with too much to prove
;;ledger ; be audit you can be
;;lua ; one-based indices? one-based indices
markdown ; writing docs for people to ignore
;;nim ; python + lisp at the speed of c
nix ; I hereby declare "nix geht mehr!"
;;ocaml ; an objective camel
org ; organize your plain life in plain text
;;php ; perl's insecure younger brother
;;plantuml ; diagrams for confusing people more
;;graphviz ; diagrams for confusing yourself even more
;;purescript ; javascript, but functional
python ; beautiful is better than ugly
;;qt ; the 'cutest' gui framework ever
;;racket ; a DSL for DSLs
;;raku ; the artist formerly known as perl6
;;rest ; Emacs as a REST client
rst ; ReST in peace
;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
(rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
;;scala ; java, but good
;;(scheme +guile) ; a fully conniving family of lisps
sh ; she sells {ba,z,fi}sh shells on the C xor
;;sml
;;solidity ; do you need a blockchain? No.
;;swift ; who asked for emoji variables?
;;terra ; Earth and Moon in alignment for performance.
;;web ; the tubes
yaml ; JSON, but readable
;;zig ; C, but simpler
:email
;;(mu4e +org +gmail)
;;notmuch
;;(wanderlust +gmail)
:app
;;calendar
;;emms
;;everywhere ; *leave* Emacs!? You must be joking
;;irc ; how neckbeards socialize
;;(rss +org) ; emacs as an RSS reader
:config
;;literate
(default +bindings +smartparens))

View File

@@ -0,0 +1,52 @@
;; -*- no-byte-compile: t; -*-
;;; $DOOMDIR/packages.el
;; To install a package with Doom you must declare them here and run 'doom sync'
;; on the command line, then restart Emacs for the changes to take effect -- or
;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror:
;; (package! some-package)
;; To install a package directly from a remote git repo, you must specify a
;; `:recipe'. You'll find documentation on what `:recipe' accepts here:
;; https://github.com/radian-software/straight.el#the-recipe-format
;; (package! another-package
;; :recipe (:host github :repo "username/repo"))
;; If the package you are trying to install does not contain a PACKAGENAME.el
;; file, or is located in a subdirectory of the repo, you'll need to specify
;; `:files' in the `:recipe':
;; (package! this-package
;; :recipe (:host github :repo "username/repo"
;; :files ("some-file.el" "src/lisp/*.el")))
;; If you'd like to disable a package included with Doom, you can do so here
;; with the `:disable' property:
;; (package! builtin-package :disable t)
;; You can override the recipe of a built in package without having to specify
;; all the properties for `:recipe'. These will inherit the rest of its recipe
;; from Doom or MELPA/ELPA/Emacsmirror:
;; (package! builtin-package :recipe (:nonrecursive t))
;; (package! builtin-package-2 :recipe (:repo "myfork/package"))
;; Specify a `:branch' to install a package from a particular branch or tag.
;; This is required for some packages whose default branch isn't 'master' (which
;; our package manager can't deal with; see radian-software/straight.el#279)
;; (package! builtin-package :recipe (:branch "develop"))
;; Use `:pin' to specify a particular commit to install.
;; (package! builtin-package :pin "1a2b3c4d5e")
;; Doom's packages are pinned to a specific commit and updated from release to
;; release. The `unpin!' macro allows you to unpin single packages...
;; (unpin! pinned-package)
;; ...or multiple packages
;; (unpin! pinned-package another-pinned-package)
;; ...Or *all* packages (NOT RECOMMENDED; will likely break things)
;; (unpin! t)
(package! yuck-mode)

35
home/progs/dunst.nix Normal file
View File

@@ -0,0 +1,35 @@
{ pkgs, config, ... }:
{
services.dunst = {
enable = true;
package = pkgs.dunst;
# docs: https://dunst-project.org/documentation/
settings = {
global = {
width = 300;
height = 300;
offset = "30x50";
origin = "top-right";
# 0 is the most opaque, 100 is completely transparent
transparency = 60;
# have consistancy between niri frame color and dunst
frame_color = config.programs.niri.settings.layout.focus-ring.active.color;
background = "#404040";
font = "JetBrains Mono Nerd Font 9";
corner_radius = 10;
};
urgency_normal = {
# background = "#37474f";
# foreground = "#eceff1";
timeout = 10;
};
};
};
}

43
home/progs/emacs.nix Normal file
View File

@@ -0,0 +1,43 @@
{
pkgs,
config,
inputs,
...
}:
{
imports = [
inputs.nix-doom-emacs-unstraightened.homeModule
(
{ ... }:
{
nixpkgs.overlays = [
inputs.nix-doom-emacs-unstraightened.overlays.default
inputs.emacs-overlay.overlays.default
];
}
)
];
programs.doom-emacs = {
enable = true;
doomDir = ./doom.d;
emacs = pkgs.emacs-unstable-pgtk;
extraPackages =
epkgs:
with epkgs;
[
dracula-theme
treesit-grammars.with-all-grammars
]
++ (with pkgs; [
shellcheck
shfmt
# for file search
fd
pandoc
]);
};
}

67
home/progs/fish.nix Normal file
View File

@@ -0,0 +1,67 @@
{ pkgs, lib, ... }:
let
eza = "${lib.getExe pkgs.eza} --color=always --group-directories-first";
cargo = "${lib.getExe pkgs.cargo}";
coreutils = "${pkgs.coreutils}/bin";
in
{
programs.fish = {
enable = true;
interactiveShellInit = ''
#disable greeting
set fish_greeting
#fixes gnupg password entry
export GPG_TTY=(${coreutils}/tty)
#pfetch on shell start (disable pkgs because of execution time)
PF_INFO="ascii title os host kernel uptime memory editor wm" ${lib.getExe pkgs.pfetch-rs}
'';
shellAliases = {
c = cargo;
cr = "${cargo} run";
cb = "${cargo} build";
# from DistroTube's dot files: Changing "ls" to "eza"
ls = "${eza} -al";
la = "${eza} -a";
ll = "${eza} -l";
lt = "${eza} -aT";
# gets the largest files in a git repo's history
"git-size" = ''
${lib.getExe pkgs.git} rev-list --objects --all |
${lib.getExe pkgs.git} cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)' |
${lib.getExe pkgs.gnused} -n 's/^blob //p' |
${coreutils}/sort --numeric-sort --key=2 |
${coreutils}/cut -c 1-12,41- |
${coreutils}/numfmt --field=2 --to=iec-i --suffix=B --padding=7 --round=nearest'';
# aliases for (I think) macos commands
pbcopy = "${pkgs.wl-clipboard}/bin/wl-copy";
pbpaste = "${pkgs.wl-clipboard}/bin/wl-paste";
gcc-native = "${lib.getExe pkgs.gcc} -Q --help=target -mtune=native -march=native | ${lib.getExe pkgs.gnugrep} -E '^\\s+\-(mtune|march)=' | ${coreutils}/tr -d '[:blank:]'";
};
shellInit = ''
fish_add_path ~/.local/bin
fish_add_path ~/.cargo/bin
fish_add_path ~/.config/emacs/bin
set hydro_color_pwd 62A
set hydro_color_error red
set hydro_color_duration yellow
set hydro_color_prompt green
set hydro_color_git blue
'';
plugins = [
{
name = "hydro";
src = pkgs.fishPlugins.hydro.src;
}
];
};
}

23
home/progs/flatpak.nix Normal file
View File

@@ -0,0 +1,23 @@
{
config,
lib,
pkgs,
inputs,
...
}:
{
imports = [
inputs.nix-flatpak.homeManagerModules.nix-flatpak
];
home.packages = with pkgs; [
flatpak
];
services.flatpak = {
enable = true;
packages = [
"com.tdameritrade.ThinkOrSwim"
];
};
}

View File

@@ -0,0 +1,125 @@
{
pkgs,
config,
lib,
...
}:
{
# https://community.frame.work/t/speakers-sound-quality/1078/83
# Filter: ON HPQ Fc 100.0 Hz Gain 0.0 dB Q 1.0
# Filter: ON PK Fc 150.0 Hz Gain 4.02 dB Q 3.0
# Filter: ON PK Fc 600.0 Hz Gain -5.07 dB Q 4.000000000000008
# Filter: ON PK Fc 1200.0 Hz Gain -3.49 dB Q 4.17
# Filter: ON PK Fc 2000.0 Hz Gain 1.43 dB Q 4.0
# Filter: ON PK Fc 5300.0 Hz Gain 3.84 dB Q 2.64
# Filter: ON HSC Fc 6000.0 Hz Gain 4.02 dB Q 4.36
# Filter: ON PK Fc 7500.0 Hz Gain -2.09 dB Q 3.0
# Filter: ON PK Fc 8000.0 Hz Gain 2.01 dB Q 4.36
# Filter: ON PK Fc 900.0 Hz Gain -4.12 dB Q 5.909999999999967
home.file.".config/easyeffects/output/${config.services.easyeffects.preset}.json".text =
let
baseBand = {
mode = "RLC (BT)";
mute = false;
solo = false;
slope = "1x";
type = "Bell";
};
bandList = [
{
frequency = 100.0;
gain = 0.0;
q = 1.0;
slope = "x4";
type = "Hi-pass";
}
{
frequency = 150.0;
gain = 4.02;
q = 3.0;
}
{
frequency = 600.0;
gain = -5.07;
q = 4.000000000000008;
}
{
frequency = 1200.0;
gain = -3.49;
q = 4.17;
}
{
frequency = 2000.0;
gain = 1.43;
q = 4.0;
}
{
frequency = 5300.0;
gain = 3.84;
q = 2.64;
}
{
frequency = 6000.0;
gain = 4.02;
q = 4.36;
type = "Hi-shelf";
}
{
frequency = 7500.0;
gain = -2.09;
q = 3.0;
}
{
frequency = 8000.0;
gain = 2.01;
q = 4.36;
}
{
frequency = 900.0;
gain = -4.12;
q = 5.909999999999967;
}
];
bands = builtins.listToAttrs (
map (f: {
name = "band${toString f.snd}";
value = baseBand // f.fst;
}) (lib.lists.zipLists bandList (lib.range 0 (lib.length (bandList))))
);
in
builtins.toJSON {
output = {
blocklist = [ ];
equalizer = {
balance = 0.0;
bypass = false;
input-gain = 0.0;
left = bands;
right = bands;
mode = "IIR";
num-bands = 10;
output-gain = -1.5;
pitch-left = 0.0;
pitch-right = 0.0;
split-channels = false;
};
plugins_order = [
"equalizer"
];
};
};
services.easyeffects = {
enable = true;
package = pkgs.easyeffects;
preset = "framework";
};
# easyeffects has issues stopping quickly, causing hands on logout/poweroff
# It's safe to just kill easyeffects instantly
systemd.user.services.easyeffects.Service.TimeoutStopSec = 0;
}

16
home/progs/ghostty.nix Normal file
View File

@@ -0,0 +1,16 @@
{ pkgs, ... }:
{
# https://mynixos.com/home-manager/option/programs.ghostty
programs.ghostty = {
enable = true;
enableFishIntegration = true;
settings = {
theme = "Adventure";
background-opacity = 0.7;
};
};
home.sessionVariables = {
TERMINAL = "ghostty";
};
}

331
home/progs/helix.nix Normal file
View File

@@ -0,0 +1,331 @@
{ pkgs, ... }:
{
# set helix as default editor
home.sessionVariables.EDITOR = "hx";
programs.helix = {
enable = true;
package = pkgs.helix;
settings = {
theme = "my_theme";
editor = {
cursor-shape = {
insert = "bar";
normal = "block";
select = "underline";
};
file-picker = {
hidden = false;
};
# wrapping!!
soft-wrap.enable = true;
end-of-line-diagnostics = "hint";
inline-diagnostics = {
cursor-line = "warning";
};
};
};
languages = {
language = [
{
name = "rust";
auto-format = true;
}
];
};
themes = {
# modified fleet_dark theme
my_theme =
let
pastel-pink = "#c67C7E";
darkish-green = "#6B8D46";
white = "#ffffff";
gray-120 = "#d1d1d1";
gray-110 = "#c2c2c2";
gray-100 = "#a0a0a0";
gray-90 = "#898989";
gray-80 = "#767676";
gray-70 = "#5d5d5d";
gray-60 = "#484848";
gray-50 = "#383838";
gray-40 = "#333333";
gray-30 = "#2d2d2d";
gray-20 = "#292929";
gray-15 = "#1F1F1F";
gray-10 = "#181818";
black = "#000000";
blue-110 = "#6daaf7";
blue-100 = "#4d9bf8";
blue-90 = "#3691f9";
blue-80 = "#1a85f6";
blue-70 = "#0273eb";
blue-60 = "#0c6ddd";
blue-50 = "#195eb5";
blue-40 = "#194176";
blue-30 = "#163764";
blue-20 = "#132c4f";
blue-10 = "#0b1b32";
red-80 = "#ec7388";
red-70 = "#ea4b67";
red-60 = "#d93953";
red-50 = "#ce364d";
red-40 = "#c03248";
red-30 = "#a72a3f";
red-20 = "#761b2d";
red-10 = "#390813";
green-50 = "#4ca988";
green-40 = "#3ea17f";
green-30 = "#028764";
green-20 = "#134939";
green-10 = "#081f19";
yellow-60 = "#f8ab17";
yellow-50 = "#e1971b";
yellow-40 = "#b5791f";
yellow-30 = "#7c511a";
yellow-20 = "#5a3a14";
yellow-10 = "#281806";
purple-20 = "#c07bf3";
purple-10 = "#b35def";
blue = "#87C3FF";
blue-light = "#ADD1DE";
coral = "#CC7C8A";
cyan = "#82D2CE";
cyan-dark = "#779E9E";
lime = "#A8CC7C";
orange = "#E09B70";
pink = "#E394DC";
violet = "#AF9CFF";
yellow = "#EBC88D";
in
{
"attribute" = lime;
"type" = blue;
"type.return" = blue-light;
"type.parameter" = blue-light;
"constructor" = yellow;
"constant" = violet;
"constant.builtin.boolean" = cyan;
"constant.character" = yellow;
"constant.character.escape" = cyan;
"constant.numeric" = yellow;
# string datatypes, also includes quoted attributes in nix
"string" = pastel-pink;
"string.regexp" = cyan;
"string.special" = {
fg = yellow;
modifiers = [ "underlined" ];
}; # .path / .url / .symbol
"comment" = gray-90; # .line
# "comment.block" = {} # .documentation
"variable" = gray-120; # .builtin
"variable.builtin" = {
fg = coral;
};
# "variable.other" = {} # .member
"variable.other.member" = violet;
"label" = yellow;
# `keyword` in language, such as function declaration
"keyword" = darkish-green;
# function name color when calling the function
"function" = yellow;
"function.declaration" = "#EFEFEF";
"function.macro" = lime;
"function.builtin" = lime;
"function.special" = lime;
#"function.declaration.method" = { fg = "lightest", modifiers = ["bold"] } #depends on #4892
"tag" = blue;
"special" = lime;
"namespace" = blue;
# used in theming
# "markup" = {} # .normal / .quote / .raw
# "markup.normal" = {} # .completion / .hover
"markup.bold" = {
modifiers = [ "bold" ];
};
"markup.italic" = {
modifiers = [ "italic" ];
};
"markup.strikethrough" = {
modifiers = [ "crossed_out" ];
};
"markup.heading" = {
fg = cyan;
modifiers = [ "bold" ];
}; # .marker / .1 / .2 / .3 / .4 / .5 / .6
"markup.list" = pink; # .unnumbered / .numbered
"markup.list.numbered" = cyan;
"markup.list.unnumbered" = cyan;
# "markup.link" = "green"
"markup.link.url" = {
fg = pink;
modifiers = [
"italic"
"underlined"
];
};
"markup.link.text" = cyan;
"markup.link.label" = purple-20;
"markup.quote" = pink;
"markup.raw" = pink;
"markup.raw.inline" = cyan; # .completion / .hover
"markup.raw.block" = "#EB83E2";
"diff.plus" = green-50;
"diff.minus" = red-50;
"diff.delta" = blue-80;
# ui specific
# "ui.background" = { bg = gray-10; }; # .separator
"ui.background" = { };
"ui.statusline" = {
fg = gray-120;
bg = gray-20;
};
# NOR
"ui.statusline.normal" = {
fg = gray-120;
bg = gray-20;
};
# inactive
"ui.statusline.inactive" = {
fg = gray-90;
};
# INS
"ui.statusline.insert" = {
fg = gray-20;
bg = blue-90;
};
# SEL
"ui.statusline.select" = {
fg = gray-20;
bg = yellow-60;
};
"ui.cursor" = {
modifiers = [ "reversed" ];
};
# .insert / .select / .match / .primary
"ui.cursor.match" = {
bg = blue-30;
};
# .insert / .select / .match / .primary
"ui.selection" = {
bg = gray-50;
};
# actual selection of text via visual mode or cursor (or search?)
"ui.selection.primary" = {
bg = blue-20;
};
"ui.cursorline" = {
bg = gray-15;
};
# line numbers
"ui.linenr" = yellow-30;
# line number of currently selected line
"ui.linenr.selected" = yellow-50;
# .info # .nor
"ui.popup" = {
fg = gray-120;
bg = gray-20;
};
"ui.window" = {
fg = gray-50;
};
"ui.help" = {
fg = gray-120;
bg = gray-20;
};
"ui.menu" = {
fg = gray-120;
bg = gray-20;
};
#.selected
"ui.menu.selected" = {
fg = white;
bg = blue-40;
};
# Calculated as #ffffff with 30% opacity
"ui.menu.scroll" = {
fg = "#dfdfdf";
};
"ui.text" = gray-120;
# .focus / .info
"ui.text.focus" = {
fg = white;
bg = blue-40;
};
"ui.virtual" = gray-90; # .whitespace
"ui.virtual.inlay-hint" = {
fg = gray-70;
};
"ui.virtual.ruler" = {
bg = gray-20;
};
"hint" = gray-80;
"info" = "#A366C4";
"warning" = "#FACb66";
"error" = "#FF5269";
"diagnostic.hint" = {
underline = {
color = gray-80;
style = "line";
};
};
"diagnostic.info" = {
underline = {
color = "#A366C4";
style = "line";
};
};
"diagnostic.warning" = {
underline = {
color = "#FACB66";
style = "line";
};
};
"diagnostic.error" = {
underline = {
color = "#FF5269";
style = "line";
};
};
"diagnostic.unnecessary" = {
modifiers = [ "dim" ];
};
"diagnostic.deprecated" = {
modifiers = [ "crossed_out" ];
};
};
};
};
}

229
home/progs/niri.nix Normal file
View File

@@ -0,0 +1,229 @@
{
config,
pkgs,
lib,
inputs,
niri-package,
...
}:
let
invert_image_avg = pkgs.callPackage ../util/inverse_color.nix;
in
{
imports = [
inputs.niri.homeModules.config
(
{ ... }:
{
nixpkgs.overlays = [
inputs.niri.overlays.niri
];
}
)
];
programs.niri = {
package = niri-package;
settings = {
prefer-no-csd = true;
input = {
touchpad = {
scroll-factor = 0.4;
};
};
clipboard = {
disable-primary = true;
};
# skip the hotkey menu thingy
hotkey-overlay.skip-at-startup = true;
layout = {
gaps = 16;
struts = {
# left = 16;
# right = 16;
top = -8;
# bottom = 16;
};
focus-ring = {
enable = true;
active = {
color = builtins.readFile (invert_image_avg {
src = ../wallpaper.png;
});
};
};
};
xwayland-satellite.path = lib.getExe pkgs.xwayland-satellite;
window-rules = [
{ draw-border-with-background = false; }
{
geometry-corner-radius =
let
radius = 10.0;
in
{
top-left = radius;
top-right = radius;
bottom-right = radius;
bottom-left = radius;
};
}
{ clip-to-geometry = true; }
{
matches = [
{
app-id = "^zen";
title = "^Picture-in-Picture$";
}
{
app-id = "Mullvad VPN";
}
];
open-floating = true;
default-column-width = {
fixed = 480;
};
default-window-height = {
fixed = 270;
};
}
];
# XF86AudioMedia allow-when-locked=true { spawn "playerctl" "play-pause"; }
# XF86AudioPlay allow-when-locked=true { spawn "playerctl" "play-pause"; }
# XF86AudioPrev allow-when-locked=true { spawn "playerctl" "previous"; }
# XF86AudioNext allow-when-locked=true { spawn "playerctl" "next"; }
# https://github.com/sodiboo/niri-flake/issues/591
switch-events = with config.lib.niri.actions; {
"lid-close".action = spawn (lib.getExe pkgs.swaylock);
};
binds = with config.lib.niri.actions; {
# Application launcher
"Mod+Space".action = spawn (lib.getExe pkgs.fuzzel);
# TODO! make this work
"Mod+E".action = spawn "${config.programs.doom-emacs.finalDoomPackage}/bin/doom-emacs";
"Mod+O".action = toggle-overview;
# open a terminal
"Mod+T".action = spawn config.home.sessionVariables.TERMINAL;
# lock the screen
"Mod+X".action = spawn (lib.getExe pkgs.swaylock);
# screenshotting
"Print".action.screenshot = [ ];
# https://github.com/sodiboo/niri-flake/commit/a7949bd0f5551fdfffd04cb9735ad3cd3167d624#r153571513
# "Ctrl+Print".action = screenshot-screen;
"Alt+Print".action.screenshot-window = [ ];
# Volume control
"XF86AudioRaiseVolume".action = spawn [
"${pkgs.avizo}/bin/volumectl"
"-u"
"up"
];
"XF86AudioLowerVolume".action = spawn [
"${pkgs.avizo}/bin/volumectl"
"-u"
"down"
];
"XF86AudioMute".action = spawn [
"${pkgs.avizo}/bin/volumectl"
"toggle-mute"
];
# Display Brightness control
"XF86MonBrightnessUp".action = spawn [
"${pkgs.avizo}/bin/lightctl"
"up"
];
"XF86MonBrightnessDown".action = spawn [
"${pkgs.avizo}/bin/lightctl"
"down"
];
# color picker and copies to clipboard
"Mod+Ctrl+Alt+C".action = spawn [
(lib.getExe pkgs.hyprpicker)
"-za"
];
# "Framework" key (F12)
# "XF86AudioMedia".action = spawn [];
# Force close a window
"Mod+Q".action = close-window;
"Mod+Shift+Q".action = quit;
# bindings for window management
"Mod+H".action = focus-column-left;
"Mod+J".action = focus-window-down;
"Mod+K".action = focus-window-up;
"Mod+L".action = focus-column-right;
"Mod+Ctrl+H".action = move-column-left;
"Mod+Ctrl+J".action = move-window-down;
"Mod+Ctrl+K".action = move-window-up;
"Mod+Ctrl+L".action = move-column-right;
#fine adjustments to height and width of window
"Mod+Minus".action = set-column-width "-10%";
"Mod+Equal".action = set-column-width "+10%";
"Mod+Shift+Minus".action = set-window-height "-10%";
"Mod+Shift+Equal".action = set-window-height "+10%";
"Mod+Home".action = focus-column-first;
"Mod+End".action = focus-column-last;
"Mod+Ctrl+Home".action = move-column-to-first;
"Mod+Ctrl+End".action = move-column-to-last;
"Mod+Shift+H".action = focus-monitor-left;
"Mod+Shift+J".action = focus-monitor-down;
"Mod+Shift+K".action = focus-monitor-up;
"Mod+Shift+L".action = focus-monitor-right;
"Mod+Shift+Ctrl+H".action = move-column-to-monitor-left;
"Mod+Shift+Ctrl+J".action = move-column-to-monitor-down;
"Mod+Shift+Ctrl+K".action = move-column-to-monitor-up;
"Mod+Shift+Ctrl+L".action = move-column-to-monitor-right;
"Mod+Page_Down".action = focus-workspace-down;
"Mod+Page_Up".action = focus-workspace-up;
"Mod+U".action = focus-workspace-down;
"Mod+I".action = focus-workspace-up;
# move a window up and down workspaces
"Mod+Ctrl+Page_Down".action = move-column-to-workspace-down;
"Mod+Ctrl+Page_Up".action = move-column-to-workspace-up;
"Mod+Ctrl+U".action = move-column-to-workspace-down;
"Mod+Ctrl+I".action = move-column-to-workspace-up;
# does little squeeze thing into the left or right position with another window
"Mod+BracketLeft".action = consume-or-expel-window-left;
"Mod+BracketRight".action = consume-or-expel-window-right;
"Mod+R".action = switch-preset-column-width;
"Mod+F".action = maximize-column;
"Mod+Shift+F".action = fullscreen-window;
"Mod+C".action = center-column;
};
};
};
}

93
home/progs/noctalia.nix Normal file
View File

@@ -0,0 +1,93 @@
{
pkgs,
inputs,
config,
lib,
...
}:
{
imports = [
inputs.noctalia.homeModules.default
];
programs.noctalia-shell = {
enable = true;
package = pkgs.noctalia-shell;
settings = {
bar = {
position = "top";
floating = true;
backgroundOpacity = 0.93;
};
general = {
animationSpeed = 1.5;
radiusRatio = 1.2;
};
colorSchemes = {
darkMode = true;
useWallpaperColors = true;
};
location = {
weatherEnabled = false;
};
wallpaper = {
enabled = true;
};
};
};
home.file.".cache/noctalia/wallpapers.json" = {
text = builtins.toJSON {
defaultWallpaper = "${../wallpaper.png}";
wallpapers = { };
};
};
programs.niri.settings = {
spawn-at-startup = [
{
command = [
"noctalia-shell"
];
}
]; # place noctalia overview wallpaper on the backdrop layer
layer-rules = [
{
matches = [
{ namespace = "^noctalia-overview*"; }
];
place-within-backdrop = true;
}
];
# allow notification actions and window activation from noctalia
debug = {
honor-xdg-activation-with-invalid-serial = [ ];
};
binds =
with config.lib.niri.actions;
let
noctalia =
cmd:
[
"noctalia-shell"
"ipc"
"call"
]
++ (lib.splitString " " cmd);
in
{
# noctalia shell keybinds
"Mod+D".action = spawn (noctalia "launcher toggle");
"Mod+A".action = spawn (noctalia "controlCenter toggle");
"Mod+Escape".action = spawn (noctalia "sessionMenu toggle");
"Mod+Shift+X".action = spawn (noctalia "lockScreen lock");
"Mod+N".action = spawn (noctalia "notifications toggleHistory");
};
};
}

179
home/progs/pi.nix Normal file
View File

@@ -0,0 +1,179 @@
{
config,
lib,
pkgs,
inputs,
...
}:
let
# sisyphus/oracle/prometheus → default/slow/plan = opus
# librarian/explore/quick → smol/commit = haiku
ompSettings = {
modelRoles = {
default = "anthropic/claude-opus-4-7:high";
smol = "anthropic/claude-haiku-4-5:low";
slow = "anthropic/claude-opus-4-7:xhigh";
plan = "anthropic/claude-opus-4-7:high";
commit = "anthropic/claude-haiku-4-5:low";
};
};
# provider config — secrets read at eval time via builtins.readFile
# (omp treats apiKey as env-var-name-or-literal, not a shell command)
ompModels = {
providers = {
openrouter = {
apiKey = lib.strings.trim (builtins.readFile ../secrets/openrouter_api_key);
};
"llama.cpp" = {
baseUrl = "https://llm.sigkill.computer";
apiKey = lib.strings.trim (builtins.readFile ../secrets/llama_cpp_api_key);
api = "openai-responses";
authHeader = true;
discovery.type = "llama.cpp";
};
};
};
in
{
home.packages = [
(inputs.llm-agents.packages.${pkgs.stdenv.hostPlatform.system}.omp.overrideAttrs (old: {
patches = (old.patches or [ ]) ++ [ ];
}))
];
# main settings: ~/.omp/agent/config.yml (JSON is valid YAML)
home.file.".omp/agent/config.yml".text = builtins.toJSON ompSettings;
# model/provider config: ~/.omp/agent/models.yml
home.file.".omp/agent/models.yml".text = builtins.toJSON ompModels;
# global instructions loaded at startup
home.file.".omp/agent/AGENTS.md".text = ''
You are an intelligent and observant agent.
If instructed to commit, disable gpg signing.
You are on nixOS, if you don't have access to a tool, you can access it via the `nix-shell` command.
## Think deeply about everything.
When given a problem, break it down, abstract it out, understand the fundamentals, then solve it in the real world.
## Misc
For long-running commands, make sure you set the timeout of the Bash tool provided to a larger value.
Do NOT read secret files. Do not directly read files that are api keys or are contextually sensitive.
## Behavior
Do not be sycophantic in your responses.
Do not use emojis unless explicitly asked to. This includes in code.
Use Test Driven Development methodology.
## Nix
For using `nix build` append `-L` to get better visibility into the logs.
If you get an error that a file can't be found, always try to `git add` the file before trying other troubleshooting steps.
'';
home.file.".omp/agent/skills/android-ui/SKILL.md".text = ''
---
name: android-ui
description: Android UI automation via ADB. Use for any Android device interaction, UI testing, screenshot analysis, element coordinate lookup, and gesture automation.
---
# Android UI
## 1. Taking Screenshots
```
adb exec-out screencap -p > /tmp/screen.png
```
Captures the current screen state as a PNG image.
## 2. Analyzing Screenshots
Read the screenshot file to understand the current screen state and identify UI elements.
## 3. Getting Precise Element Coordinates
UI Automator dump - extracts the full UI hierarchy as XML:
```
adb shell uiautomator dump /sdcard/ui.xml && adb pull /sdcard/ui.xml /tmp/ui.xml
```
Then grep for specific elements:
```sh
# Find by text
grep -oP 'text="Login".*?bounds="[^"]*"' /tmp/ui.xml
# Find by class
grep -oP 'class="android.widget.EditText".*?bounds="[^"]*"' /tmp/ui.xml
```
Bounds format: `[left,top][right,bottom]` tap center: `((left+right)/2, (top+bottom)/2)`
## 4. Tapping Elements
```
adb shell input tap X Y
```
Where X, Y are pixel coordinates from the bounds.
## 5. Text Input
```
adb shell input text "some_text"
```
Note: Special characters need escaping (`\!`, `\;`, etc.)
## 6. Other Gestures
```sh
# Swipe/scroll
adb shell input swipe startX startY endX endY duration_ms
# Key events
adb shell input keyevent KEYCODE_BACK
adb shell input keyevent KEYCODE_ENTER
```
## 7. WebView Limitation
- UI Automator can see WebView content if accessibility is enabled
- Touch events on iframe content (like Cloudflare Turnstile) often fail due to cross-origin isolation
- Form fields in WebViews work if you get exact bounds from the UI dump
## Typical Flow
1. Take screenshot analyze it (get rough layout)
2. Dump UI hierarchy grep for exact element bounds
- NEVER ASSUME COORDINATES. You must ALWAYS check first.
- Do this before ANY tap action as elements on the screen may have changed.
3. Calculate center coordinates from bounds
4. Tap/interact
5. Wait screenshot verify result
'';
# omp has a built-in browser tool with NixOS auto-detection,
# but this skill provides playwright MCP as a supplementary option
home.file.".omp/agent/skills/playwright/SKILL.md".text =
let
browsers = pkgs.playwright-driver.browsers;
chromiumDir = builtins.head (
builtins.filter (n: builtins.match "chromium-[0-9]+" n != null) (
builtins.attrNames browsers.passthru.entries
)
);
chromiumPath = "${browsers}/${chromiumDir}/chrome-linux64/chrome";
in
''
---
name: playwright
description: Browser automation via Playwright MCP. Use as an alternative to the built-in browser tool for Playwright-specific workflows, testing, and web scraping. Chromium is provided by NixOS.
---
# Playwright
## Browser Setup
Chromium is provided by NixOS. Do NOT attempt to download browsers.
- Chromium path: `${chromiumPath}`
- Browsers path: `${browsers}`
## Usage
Launch the Playwright MCP server for browser automation:
```bash
npx @playwright/mcp@latest --executable-path "${chromiumPath}" --user-data-dir "${config.home.homeDirectory}/.cache/playwright-mcp"
```
Set these environment variables if not already set:
```bash
export PLAYWRIGHT_BROWSERS_PATH="${browsers}"
export PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
```
'';
}

50
home/progs/swaylock.nix Normal file
View File

@@ -0,0 +1,50 @@
{ pkgs, ... }:
let
blur = pkgs.callPackage ../util/blur.nix;
in
{
programs.swaylock = {
enable = true;
settings = {
color = "24273a";
ring-color = "b7bdf8";
bs-hl-color = "f4dbd6";
caps-lock-bs-hl-color = "f4dbd6";
text-clear-color = "f4dbd6";
ring-clear-color = "f4dbd6";
text-caps-lock-color = "f5a97f";
ring-caps-lock-color = "f5a97f";
ring-ver-color = "8aadf4";
text-ver-color = "8aadf4";
ring-wrong-color = "ee99a0";
text-wrong-color = "ee99a0";
layout-text-color = "cad3f5";
text-color = "cad3f5";
caps-lock-key-hl-color = "a6da95";
key-hl-color = "a6da95";
inside-color = 0;
inside-clear-color = 0;
inside-caps-lock-color = 0;
inside-ver-color = 0;
inside-wrong-color = 0;
layout-bg-color = 0;
layout-border-color = 0;
line-color = 0;
line-clear-color = 0;
line-caps-lock-color = 0;
line-ver-color = 0;
line-wrong-color = 0;
separator-color = 0;
image = builtins.toString (blur {
src = ../wallpaper.png;
});
};
};
}

12
home/progs/trezor.nix Normal file
View File

@@ -0,0 +1,12 @@
{ pkgs, lib, ... }:
{
nixpkgs.config.allowUnfree = true;
home.packages = with pkgs; [
trezor-udev-rules
trezord
trezor-suite
monero-gui
monero-cli
trezorctl
];
}

View File

@@ -0,0 +1,164 @@
# Dark Reader extension settings
# Addon ID: addon@darkreader.org
{ lib }:
let
defaultTheme = {
mode = 1;
brightness = 100;
contrast = 100;
grayscale = 0;
sepia = 0;
useFont = false;
fontFamily = "Open Sans";
textStroke = 0;
engine = "dynamicTheme";
stylesheet = "";
darkSchemeBackgroundColor = "#181a1b";
darkSchemeTextColor = "#e8e6e3";
lightSchemeBackgroundColor = "#dcdad7";
lightSchemeTextColor = "#181a1b";
scrollbarColor = "";
selectionColor = "auto";
styleSystemControls = false;
lightColorScheme = "Default";
darkColorScheme = "Default";
immediateModify = false;
};
mkCustomTheme =
{
url,
engine ? defaultTheme.engine,
builtIn ? false,
}:
{
inherit url;
theme = defaultTheme // {
inherit engine;
};
}
// lib.optionalAttrs builtIn { inherit builtIn; };
in
{
force = true;
settings = {
enabled = true;
fetchNews = true;
syncSettings = false;
syncSitesFixes = false;
changeBrowserTheme = false;
enabledByDefault = false;
enableForPDF = true;
enableForProtectedPages = false;
enableContextMenus = false;
detectDarkTheme = true;
previewNewDesign = false;
previewNewestDesign = false;
theme = defaultTheme;
enabledFor = [
"search.nixos.org"
"quizlet.com"
"claude.ai"
];
disabledFor = [
"cinny.envs.net"
"element.envs.net"
"mail.proton.me"
"mail.google.com"
"www.gardling.com"
"projects.fivethirtyeight.com"
"secure.bankofamerica.com"
"billpay-ui.bankofamerica.com"
"plus.pearson.com"
"immich.gardling.com"
"huggingface.co"
"session.masteringphysics.com"
"brainly.com"
"www.270towin.com"
"phet.colorado.edu"
"8042-1.portal.athenahealth.com"
"torrent.gardling.com"
"nssb-p.adm.fit.edu"
"mail.openbenchmarking.org"
"moneroocean.stream"
"app.diagrams.net"
"books.gw-project.org"
"chat.deepseek.com"
"n21.ultipro.com"
"www.egaroucid.nyanyan.dev"
"bitmagnet.gardling.com"
"frame.work"
"www.altcancer.net"
"jenkins.jpenilla.xyz"
"soulseek.gardling.com"
"discord.com"
"www.lufthansa.com"
"surveys.hyundaicx.com"
"www.apple.com"
"docs.google.com"
"marcuspork.com"
"en.akinator.com"
"www.reddit.com"
"terra.layoutit.com"
"www.ebay.com"
"www.nytimes.com"
"app.electricitymaps.com"
"www.revoy.com"
"kagi.com"
"www.bhphotovideo.com"
"survey.stackoverflow.co"
"www.google.com"
"en.wikipedia.org"
"workforcenow.adp.com"
"app.element.io"
"www.desmos.com"
"en.wiktionary.org"
"dariandean0.github.io"
];
customThemes = [
(mkCustomTheme {
url = [ "*.officeapps.live.com" ];
engine = "cssFilter";
builtIn = true;
})
(mkCustomTheme {
url = [ "*.sharepoint.com" ];
engine = "cssFilter";
builtIn = true;
})
(mkCustomTheme {
url = [ "docs.google.com" ];
engine = "cssFilter";
builtIn = true;
})
(mkCustomTheme {
url = [ "onedrive.live.com" ];
engine = "cssFilter";
builtIn = true;
})
(mkCustomTheme {
url = [ "huggingface.co" ];
engine = "svgFilter";
})
(mkCustomTheme {
url = [ "www.last.fm" ];
engine = "svgFilter";
})
];
automation = {
enabled = false;
mode = "";
behavior = "OnOff";
};
time = {
activation = "18:00";
deactivation = "9:00";
};
};
}

134
home/progs/zen/default.nix Normal file
View File

@@ -0,0 +1,134 @@
{
pkgs,
lib,
inputs,
config,
...
}:
let
firefox-addons = inputs.firefox-addons.packages.${pkgs.stdenv.hostPlatform.system};
buildFirefoxXpiAddon =
inputs.firefox-addons.lib.${pkgs.stdenv.hostPlatform.system}.buildFirefoxXpiAddon;
hacker-smacker = buildFirefoxXpiAddon {
pname = "hacker-smacker";
version = "2.2";
addonId = "jid1-eo0mcXLTqCkaWA@jetpack";
url = "https://addons.mozilla.org/firefox/downloads/file/4715262/hacker_smacker-2.2.xpi";
sha256 = "d28f0597d5c4bae5db712b4875f4104120f7e55e5ea769c44d70996be31cc0d1";
meta = with lib; {
homepage = "https://www.hackersmacker.org";
description = "Highlight (friend) and filter (foe) individual authors on Hacker News";
license = licenses.mit;
platforms = platforms.all;
};
};
consumer-rights-wiki = buildFirefoxXpiAddon {
pname = "consumer-rights-wiki";
version = "1.0.34";
addonId = "@crw-extension-firefox";
url = "https://addons.mozilla.org/firefox/downloads/file/4730448/consumer_rights_wiki-1.0.34.xpi";
sha256 = "732969ed4d5c7965b6254a1190a82ce4ab0ff44bda2295264eb8a22c452899ea";
meta = with lib; {
homepage = "https://github.com/FULU-Foundation/CRW-Extension";
description = "Shows a popup when the site you're viewing has an article on the Consumer Rights Wiki";
license = licenses.mit;
platforms = platforms.all;
};
};
ublockSettings = import ./ublock.nix { inherit lib; };
darkReaderSettings = import ./dark-reader.nix { inherit lib; };
redirectorSettings = import ./redirector.nix { inherit lib; };
in
{
programs.zen-browser = {
enable = true;
profiles.default = {
isDefault = true;
extensions = {
force = true;
packages =
(with firefox-addons; [
bitwarden
buster-captcha-solver
consent-o-matic
darkreader
fastforwardteam
localcdn
redirector
refined-github
return-youtube-dislikes
search-by-image # reverse image search
ruffle_rs
snowflake
steam-database
ublock-origin
])
++ [
hacker-smacker
consumer-rights-wiki
];
settings = {
"uBlock0@raymondhill.net" = ublockSettings;
"addon@darkreader.org" = darkReaderSettings;
"redirector@einaregilsson.com" = redirectorSettings;
};
};
search = {
force = true;
default = "kagi";
privateDefault = "ddg";
order = [
"kagi"
"ddg"
"google"
];
engines = {
kagi = {
name = "Kagi";
urls = [ { template = "https://kagi.com/search?q={searchTerms}"; } ];
iconMapObj."16" = "https://kagi.com/favicon.ico";
definedAliases = [ "@k" ];
};
google.metaData.alias = "@g";
};
};
settings = {
"identity.sync.tokenserver.uri" = "https://firefox-sync.sigkill.computer/1.0/sync/1.5";
# auto-enable extensions on install
"extensions.autoDisableScopes" = 0;
# don't sync prefs/addons — we manage them declaratively via nix
# syncing fights with the declarative config and can cause data loss
# https://github.com/nix-community/home-manager/issues/6083
"services.sync.engine.prefs" = false;
"services.sync.engine.addons" = false;
# use a separate default search engine in private windows
"browser.search.separatePrivateDefault.ui.enabled" = true;
"browser.search.separatePrivateDefault" = true;
# disable built-in password manager — using bitwarden
"signon.rememberSignons" = false;
"signon.autofillForms" = false;
"signon.management.page.breach-alerts.enabled" = false;
"signon.formlessCapture.enabled" = false;
"signon.privateBrowsingCapture.enabled" = false;
# disable the autocomplete popup on login fields
"signon.firefoxRelay.feature" = "";
"signon.generation.enabled" = false;
# disable passkey/webauthn prompts from the built-in manager
"security.webauthn.enable_conditional_mediation" = false;
};
};
};
# Zen ignores XDG and hardcodes ~/.zen — symlink to module-managed path
home.file.".zen".source = config.lib.file.mkOutOfStoreSymlink "${config.xdg.configHome}/zen";
home.sessionVariables.BROWSER = "zen";
}

View File

@@ -0,0 +1,75 @@
# Redirector extension settings
# Addon ID: redirector@einaregilsson.com
#
# To add a new redirect, just add another mkRedirect call to the list:
# (mkRedirect { from = "youtube.com"; to = "invidious.example.com"; description = "YouTube to Invidious"; })
{ lib }:
let
# helper to create a redirect rule from a simple domain mapping.
# handles www. subdomains automatically. for other subdomains
# (like old.reddit.com), create a separate rule with the full domain.
mkRedirect =
{
from,
to,
description,
}:
let
escapedFrom = builtins.replaceStrings [ "." ] [ "\\." ] from;
in
{
inherit description;
exampleUrl = "https://${from}/example";
exampleResult = "https://${to}/example";
error = null;
includePattern = "^https?://(www\\.)?${escapedFrom}(.*)$";
excludePattern = "";
patternDesc = "";
redirectUrl = "https://${to}$2";
patternType = "R";
processMatches = "noProcessing";
disabled = false;
grouped = false;
appliesTo = [ "main_frame" ];
};
in
{
force = true;
settings = {
redirects = [
(mkRedirect {
from = "x.com";
to = "xcancel.com";
description = "X to xcancel";
})
(mkRedirect {
from = "twitter.com";
to = "xcancel.com";
description = "Twitter to xcancel";
})
(mkRedirect {
from = "reddit.com";
to = "safereddit.com";
description = "Reddit to Redlib";
})
(mkRedirect {
from = "old.reddit.com";
to = "safereddit.com";
description = "Old Reddit to Redlib";
})
(mkRedirect {
from = "new.reddit.com";
to = "safereddit.com";
description = "New Reddit to Redlib";
})
(mkRedirect {
from = "np.reddit.com";
to = "safereddit.com";
description = "NP Reddit to Redlib";
})
];
disabled = false;
logging = false;
enableNotifications = false;
};
}

143
home/progs/zen/ublock.nix Normal file
View File

@@ -0,0 +1,143 @@
# uBlock Origin extension settings
# Addon ID: uBlock0@raymondhill.net
{ lib }:
{
force = true;
settings = {
userSettings = {
cloudStorageEnabled = true;
externalLists = builtins.concatStringsSep "\n" [
"https://abp.oisd.nl/"
"https://filters.adtidy.org/extension/ublock/filters/3.txt"
"https://gitflic.ru/project/magnolia1234/bypass-paywalls-clean-filters/blob/raw?file=bpc-paywall-filter.txt"
"https://raw.githubusercontent.com/DetachHead/ublock-filters/refs/heads/master/list.txt"
"https://raw.githubusercontent.com/laylavish/uBlockOrigin-HUGE-AI-Blocklist/main/list.txt"
];
importedLists = [
"https://abp.oisd.nl/"
"https://filters.adtidy.org/extension/ublock/filters/3.txt"
"https://gitflic.ru/project/magnolia1234/bypass-paywalls-clean-filters/blob/raw?file=bpc-paywall-filter.txt"
"https://raw.githubusercontent.com/DetachHead/ublock-filters/refs/heads/master/list.txt"
"https://raw.githubusercontent.com/laylavish/uBlockOrigin-HUGE-AI-Blocklist/main/list.txt"
];
popupPanelSections = 15;
prefetchingDisabled = false;
};
selectedFilterLists = [
"user-filters"
"ublock-filters"
"ublock-badware"
"ublock-privacy"
"ublock-quick-fixes"
"ublock-unbreak"
"easylist"
"adguard-generic"
"adguard-mobile"
"easyprivacy"
"adguard-spyware-url"
"block-lan"
"urlhaus-1"
"curben-phishing"
"plowe-0"
"dpollock-0"
"fanboy-cookiemonster"
"ublock-cookies-easylist"
"adguard-cookies"
"ublock-cookies-adguard"
"fanboy-social"
"adguard-social"
"fanboy-thirdparty_social"
"easylist-chat"
"easylist-newsletters"
"easylist-notifications"
"easylist-annoyances"
"adguard-mobile-app-banners"
"adguard-other-annoyances"
"adguard-popup-overlays"
"adguard-widgets"
"ublock-annoyances"
"SWE-1"
"https://filters.adtidy.org/extension/ublock/filters/3.txt"
"https://gitflic.ru/project/magnolia1234/bypass-paywalls-clean-filters/blob/raw?file=bpc-paywall-filter.txt"
"https://raw.githubusercontent.com/DetachHead/ublock-filters/refs/heads/master/list.txt"
"https://raw.githubusercontent.com/laylavish/uBlockOrigin-HUGE-AI-Blocklist/main/list.txt"
"https://abp.oisd.nl/"
];
whitelist = [
"chrome-extension-scheme"
"moz-extension-scheme"
];
dynamicFilteringString = builtins.concatStringsSep "\n" [
"behind-the-scene * * noop"
"behind-the-scene * inline-script noop"
"behind-the-scene * 1p-script noop"
"behind-the-scene * 3p-script noop"
"behind-the-scene * 3p-frame noop"
"behind-the-scene * image noop"
"behind-the-scene * 3p noop"
];
hostnameSwitchesString = builtins.concatStringsSep "\n" [
"no-large-media: behind-the-scene false"
"no-csp-reports: * true"
"no-scripting: arstechnica.com true"
"no-scripting: www.phoronix.com true"
"no-scripting: www.theatlantic.com true"
"no-scripting: wccftech.com true"
"no-remote-fonts: www.theverge.com true"
"no-scripting: www.theverge.com true"
"no-scripting: gamersnexus.net true"
];
"user-filters" = builtins.concatStringsSep "\n" [
# Annoying fonts warning because of localCDN
"docs.google.com##.jfk-butterBar-shown.jfk-butterBar-info.jfk-butterBar"
# remove phoronix premium ad
"www.phoronix.com##aside:nth-of-type(3)"
"www.phoronix.com##aside.widget:nth-of-type(4)"
# Remove instagram login screen
"www.instagram.com##.x1nhvcw1.x1oa3qoh.x1qjc9v5.xqjyukv.xdt5ytf.x2lah0s.x1c4vz4f.x1odjw0f.xw2csxc.x1n2onr6.xo71vjh.x5pf9jr.x13lgxp2.x168nmei.x78zum5.xjbqb8w.x9f619"
"www.instagram.com##.xl56j7k.x1iyjqo2.xdt5ytf.x78zum5.x9f619.x1qjc9v5"
"www.instagram.com##.x1jfb8zj.x1qrby5j.x1n2onr6.x7ja8zs.x1t2pt76.x1lytzrv.xedcshv.xarpa2k.x3igimt.x12ejxvf.xaigb6o.x1beo9mf.x1h91t0o.x4k7w5x.x1uvtmcs"
"www.instagram.com##.x1h0vfkc.x13vifvy.xixxii4.x17qophe.xds687c.x1ey2m1c"
"www.instagram.com##.x1n2onr6.xg6iff7.xippug5.xdt5ytf.x78zum5"
"www.instagram.com##.xzkaem6.x1n2onr6 > .xjx87ck.x1yqm8si.xfk6m8.xh8yej3.x13vifvy.x1rohswg.xixxii4.x1odjw0f.xw2csxc.x17qophe.x5yr21d.x1pq812k.x1ja2u2z.x9f619"
# remove github dashboard copilot stuff
"github.com##copilot-dashboard-entrypoint"
"github.com##.hide-md.hide-sm.AppHeader-CopilotChat > react-partial-anchor"
"github.com##react-partial-anchor > .AppHeader-buttonLeft.AppHeader-button.Button--medium.Button--secondary.Button--iconOnly.Button"
"github.com##.Button.Button--medium.Button--secondary.AppHeader-button--dropdown.AppHeader-buttonRight.AppHeader-button"
"github.com##.tooltipped-sw.tooltipped.AppHeader-buttonRight.color-fg-muted.AppHeader-button.Button--medium.Button--secondary.Button--iconOnly.Button"
# github sidebar stuff
''github.com##.rounded-2.p-3.color-border-default.border.\<color-bg-default.dashboard-changelog.mb-3''
"github.com##.mb-5.feed-right-sidebar"
"app.howthemarketworks.com##div.reveal-overlay:nth-of-type(8)"
# github copilot chat
"github.com##.CopilotChatInputPartial-module__inputSection--UWMD6"
"github.com##.CopilotChatInputPartial-module__inputContainer--EE6LJ"
# reddit
''www.reddit.com##.font-normal > .mt-0.list-none.relative > .s\:rounded-2.bg-transparent.-outline-offset-1.py-2xs.cursor-pointer.hover\:no-underline.hover\:bg-neutral-background-hover.hover\:text-secondary-hover.text-secondary.gap-\[0\.5rem\].px-md.relative.justify-between.flex''
"www.quora.com##.qu-bg--raised.qu-mb--small.qu-boxShadow--small.qu-borderColor--raised.qu-borderAll.dom_annotate_question_answer_item_0.q-box > div > div > div > div > div.q-box"
"discord.com##.contentCollapsedWrapper__5f897"
"www.statista.com###pdfpremiumArrowModal > .vueModal__overlay"
# The AI summary BS
''www.reddit.com##.px-md.pb-\[22px\].pt-md.mt-md.rounded-4.bg-neutral-background-weak.xs\:block.hidden''
"www.sciencedirect.com##.gXjxP.sc-fHSyaj"
];
};
}

25
home/util/blur.nix Normal file
View File

@@ -0,0 +1,25 @@
{
stdenv,
imagemagick,
src,
}:
stdenv.mkDerivation {
pname = "blur-image";
version = "1.0";
inherit src;
buildInputs = [ imagemagick ];
# input is a file, not a directory, skip unpackPhase
unpackPhase = "true";
# command taken from: https://old.reddit.com/r/swaywm/comments/oz3t7v/setting_a_blurred_background_with_swaylock_and/
buildPhase = ''
magick ${src} -filter Gaussian -resize 20% -blur 0x2.5 -resize 500% output.png
'';
installPhase = ''
mv output.png $out
'';
}

View File

@@ -0,0 +1,26 @@
{
stdenv,
imagemagick,
gawk,
src,
}:
stdenv.mkDerivation {
pname = "invert-image-avg";
version = "1.0";
inherit src;
buildInputs = [
imagemagick
gawk
];
# input is a file, not a directory, skip unpackPhase
unpackPhase = "true";
# command taken from: https://old.reddit.com/r/swaywm/comments/oz3t7v/setting_a_blurred_background_with_swaylock_and/
buildPhase = ''
rm -fr $out
magick ${src} -channel RGB -negate -resize 1x1 txt: | awk 'FNR == 2 {print $3}' > $out
'';
}

BIN
home/wallpaper.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB