44 Commits
Author SHA1 Message Date
Gabriel Fontes 0627287979 feat(lib): pure-Nix material-you output assembly (brick 5)
generateColorscheme source customColors -> { colors = { dark; light; }; }
matching matugen -j hex: MD3 roles from scheme.nix + harmonized custom color
groups (Blend.harmonize hue toward source, tonal palette at chroma 48) +
source_color. Full output vs matugen 2.4.1 for #2B3975: MD3 roles bit-exact
both modes; a handful of custom-color channels land ±1 LSB off (Nix series
math vs Rust hardware transcendentals through the harmonize rotation).

Not yet wired into projects/themes (see next step).

Assisted-by: pi (opus-4.8)
2026-07-04 18:38:32 -03:00
Gabriel Fontes 125ff58f87 feat(lib): add DynamicScheme + MD3 role layer (brick 4)
Port material-colors 0.4.2's DynamicColor engine for the rainbow scheme at
standard contrast: contrast helpers (ratio_of_tones, lighter/darker,
foreground_tone), the full getTone resolution (contrast curves, toneDeltaPair
expansion, [50,60) avoidance, second-background), and all 49 MaterialDynamicColors
roles (mono/fidelity branches collapsed since rainbow is neither).

Validated bit-exact against matugen 4.0's colors output for #2B3975: 49/49
roles in dark AND light (98/98). Also matches the crate's own Rust test
vectors for #0000FF (the one delta was a master-vs-0.4.2 version diff).

Brick 4 of the pure-Nix matugen effort.

Assisted-by: pi (opus-4.8)
2026-07-04 17:44:18 -03:00
Gabriel Fontes c9b492a141 feat(lib): add TonalPalette + palette sets (brick 3)
Port material-colors 0.4.2 palettes: tonalPalette hue chroma -> tone(t) via the
HCT solver (with the yellow tone-99 average quirk), corePalette (matugen's
palettes field: primary max(48,chroma), sec 16, tert hue+60/24, neutral 4,
neutral-variant 8, error 25/84), and rainbowPalettes (scheme palettes for the
role layer: neutral/neutral-variant chroma 0).

Validated: corePalette reproduces matugen's palettes JSON for #2B3975
bit-exact across all 6 palettes x 18 tones (108/108).

Assisted-by: pi (opus-4.8)
2026-07-04 17:35:24 -03:00
Gabriel Fontes 91acfeba28 feat(lib): add pure-Nix HCT (CAM16 + HctSolver)
Port material-color-utilities' color pipeline to Nix: sRGB<->CAM16<->HCT with
the full HctSolver (findResultByJ Newton step + bisectToLimit over the 255
critical planes). hctFromHex/hexFromHct round-trip bit-exact across a 125-color
grid, including saturated colors that hit the bisect fallback. Constants ported
from the canonical TypeScript reference.

Brick 2 of the pure-Nix matugen effort. Standalone lib, not yet wired in.

Assisted-by: pi (opus-4.8)
2026-07-04 17:28:10 -03:00
Gabriel Fontes b48623af3a feat(lib): add pure-Nix float math library
Hand-rolled transcendentals (sqrt, cbrt, exp, ln, pow, sin, cos, atan, atan2)
via range reduction + series/Newton, since Nix has no math builtins. Verified
against known values to ~1e-6. Foundation for a pure-Nix material-color-utilities
port (goal: drop the matugen IFD).

Assisted-by: pi (opus-4.8)
2026-07-04 17:22:06 -03:00
Gabriel Fontes 188c1837c1 refactor(lib): drop nix-colors, add lib/colors.nix
The only nix-colors usage was hexToRGBString in the waybar style. Reimplement
it (plus hexToRGB) in a local lib/colors.nix, expose it via the flake lib
(outputs.lib.colors), and point waybar at it. Remove the nix-colors flake
input and relock (drops nix-colors + its base16-schemes/nixpkgs-lib inputs).

The colorscheme module was already self-contained (powered by the themes
generator), so nothing else depended on nix-colors. Verified atlas evaluates.

Assisted-by: pi (opus-4.8)
2026-07-04 17:08:16 -03:00
Gabriel Fontes cd8e0bf730 absurdly large refactor
- killed most of the lib
- simplified flake tremendously
- decouple configs a bit
- export packages instead of legacyPackages
- use packages instead of overlays
- general cleanup
2022-10-10 03:49:48 -03:00
Gabriel Fontes 40cffbb42f improve flake namespacing, add aggregate hydra job 2022-10-08 05:19:45 -03:00
Gabriel Fontes 955f3248b9 treewide: replace deploy-rs with my own script 2022-10-04 10:52:34 -03:00
Gabriel Fontes a1bff8dd12 flake: refactor lib a bit, hosts: put more hardware stuff in hardware 2022-08-08 15:50:54 -03:00
Gabriel Fontes d58d0dfe13 flake: fix devshell problem with flakeExposed 2022-07-23 20:51:22 -03:00
Gabriel Fontes d901939243 rework feature flags 2022-07-17 14:14:32 -03:00
Gabriel Fontes 4eaf6d43fd flake/lib: refactor; home/pfetch: replace neofetch 2022-07-16 01:30:30 -03:00
Gabriel Fontes 4b65d0ce0a flake: add home-manager to deploy-rs 2022-07-14 02:24:17 -03:00
Gabriel Fontes 2dc3b441d3 trim library, add virtd to atlas 2022-07-09 21:39:53 -03:00
Gabriel Fontes ee43e3d46d make gpg keychain declarative, cleanup a few unused stuff 2022-07-09 16:27:05 -03:00
Gabriel Fontes ff581b6818 add gpg agent forwarding 2022-07-06 00:43:10 -03:00
Gabriel Fontes 85f9665bea refactor waybar into two separate ones, add more hyprland bindings 2022-06-30 12:21:20 -03:00
Gabriel Fontes 9767a4e85e a lot of improvements on desktop stuff 2022-06-30 02:49:20 -03:00
Gabriel Fontes d2f6286f58 fix homeConfig and unfree issues 2022-06-29 15:01:35 -03:00
Gabriel Fontes 822a89a98b refactor feature settings and updated all the stuff 2022-06-28 18:01:06 -03:00
Gabriel Fontes a21b3c30a7 rename nixos back to hosts and home-manager back to home 2022-06-27 11:22:05 -03:00
Gabriel Fontes 869ecb8f84 improve deploy declaration a bit 2022-06-07 15:39:04 -03:00
Gabriel Fontes 0b0de14178 factor out host settings, add headscale 2022-06-06 01:51:27 -03:00
Gabriel Fontes 8df27a3f43 split config up a bit 2022-06-05 06:02:07 -03:00
Gabriel Fontes 37f4a4d81d remove gf's pc, she's having a bad time with nixos; add sops 2022-06-05 05:24:20 -03:00
Gabriel Fontes 96f1877e0e access home-manager config from user system-wide config 2022-06-03 11:06:22 -03:00
Gabriel Fontes 39d923a8a7 remove deploy-rs, add psqlf 2022-05-16 19:17:34 -03:00
Gabriel Fontes 3e85649295 factor more stuff into mkHome arguments 2022-05-06 03:42:22 -03:00
Gabriel Fontes 8a41f8e222 flake refactor and cleanup 2022-05-01 16:43:20 -03:00
Gabriel Fontes a1b9f1706b some nits here and there 2022-04-10 12:33:15 -03:00
Gabriel Fontes 85a68e1f67 remove unused variables and arguments using deadnix 2022-04-07 17:11:10 -03:00
Gabriel Fontes 1a8ff77318 expose modules on flake 2022-03-31 01:55:38 -03:00
Gabriel Fontes c7fbdb93ee incorporate nur stuff 2022-03-30 22:11:46 -03:00
Gabriel Fontes 169f231951 adapt gpg settings for my shiny new yubikey 2022-02-17 16:50:17 -03:00
Gabriel Fontes 5b94c0a654 opt out of persistence instead of opt in 2022-02-17 08:49:08 -03:00
Gabriel Fontes 4033079a21 allow turning off persistence, for a working system when /persist is empty 2022-02-17 07:50:58 -03:00
Gabriel Fontes 97a7cab587 delete btrfs volume on boot for all machines 2022-02-06 05:51:16 -03:00
Gabriel Fontes a428c476ab fix relative paths 2022-02-06 02:13:41 -03:00
Gabriel Fontes 0be4ee6302 refactor home-manager features 2022-02-06 00:11:19 -03:00
Gabriel Fontes c1e2cc0255 use home-manager standalone instead of as nixos module 2021-10-01 18:57:36 -03:00
Gabriel Fontes 55f96d222a add fix for rpi, and public key for openssh on my user 2021-09-27 22:52:12 -03:00
Gabriel Fontes 5ca1f8863d move a few common modules to be imported on flake (mkHost) instead of per host/user basis 2021-09-26 21:15:46 -03:00
Gabriel Fontes eb50d15409 add cachix, avahi, otd, move helper function to its own file, persist valheim dir 2021-09-25 14:43:38 -03:00