1
Fork 0
mirror of https://github.com/RGBCube/ncc synced 2025-07-29 11:07:44 +00:00

feat: huge darwin overhaul

This commit is contained in:
RGBCube 2025-04-13 17:58:16 +03:00
parent 7935aa65f5
commit c4888c276b
Signed by: RGBCube
SSH key fingerprint: SHA256:CzqbPcfwt+GxFYNnFVCqoN5Itn4YFrshg1TrnACpA5M
16 changed files with 367 additions and 230 deletions

13
lib/colors.nix Normal file
View file

@ -0,0 +1,13 @@
_: self: _: {
luminance = hex: let
r = self.substring 0 2 hex |> self.fromHexString;
g = self.substring 2 4 hex |> self.fromHexString;
b = self.substring 4 6 hex |> self.fromHexString;
in assert !self.hasPrefix "#" hex;
0.2126 * r +
0.7152 * g +
0.0722 * b ;
isDark = { base00, base07, ... }: self.luminance base00 < self.luminance base07;
isLight = theme: !self.isDark theme;
}

View file

@ -1,6 +1,7 @@
inputs: self: super: let
colors = import ./colors.nix inputs self super;
filesystem = import ./filesystem.nix inputs self super;
option = import ./option.nix inputs self super;
system = import ./system.nix inputs self super;
values = import ./values.nix inputs self super;
in filesystem // option // system // values
in colors // filesystem // option // system // values