Compare commits
No commits in common. "57100dcead4cf5f511e0cc31780ad156bfbccb1e" and "bdc95279e2cab30f85d649b41e7df229e6d758e0" have entirely different histories.
57100dcead
...
bdc95279e2
7 changed files with 63 additions and 87 deletions
13
flake.lock
13
flake.lock
|
@ -816,17 +816,18 @@
|
|||
},
|
||||
"nixpkgs_7": {
|
||||
"locked": {
|
||||
"lastModified": 1732014248,
|
||||
"narHash": "sha256-y/MEyuJ5oBWrWAic/14LaIr/u5E0wRVzyYsouYY3W6w=",
|
||||
"lastModified": 1731319897,
|
||||
"narHash": "sha256-PbABj4tnbWFMfBp6OcUK5iGy1QY+/Z96ZcLpooIbuEI=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "23e89b7da85c3640bbc2173fe04f4bd114342367",
|
||||
"rev": "dc460ec76cbff0e66e269457d7b728432263166c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"ref": "nixos-unstable",
|
||||
"type": "indirect"
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "dc460ec76cbff0e66e269457d7b728432263166c",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_8": {
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
};
|
||||
inputs = {
|
||||
# nix related
|
||||
nixpkgs.url = "nixpkgs/nixos-unstable";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/dc460ec76cbff0e66e269457d7b728432263166c"; # TODO: remove when 24.11 is out
|
||||
systems.url = "github:nix-systems/default-linux";
|
||||
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
||||
lanzaboote = {
|
||||
|
|
|
@ -1,68 +1,25 @@
|
|||
{
|
||||
osConfig,
|
||||
lib,
|
||||
lib',
|
||||
...
|
||||
}: let
|
||||
inherit (osConfig.theme.scheme) palette;
|
||||
inherit (lib) mkIf mkMerge;
|
||||
inherit (lib') rgba;
|
||||
in {
|
||||
{pkgs, ...}: {
|
||||
programs.zathura = {
|
||||
enable = true;
|
||||
options = mkMerge [
|
||||
{
|
||||
font = "Inter 12";
|
||||
selection-notification = true;
|
||||
options = {
|
||||
font = "Inter 12";
|
||||
selection-notification = true;
|
||||
|
||||
selection-clipboard = "clipboard";
|
||||
adjust-open = "best-fit";
|
||||
pages-per-row = "1";
|
||||
scroll-page-aware = "true";
|
||||
scroll-full-overlap = "0.01";
|
||||
scroll-step = "100";
|
||||
zoom-min = "10";
|
||||
}
|
||||
(mkIf osConfig.theme.enable {
|
||||
default-fg = palette.base05;
|
||||
default-bg = palette.base00;
|
||||
selection-clipboard = "clipboard";
|
||||
adjust-open = "best-fit";
|
||||
pages-per-row = "1";
|
||||
scroll-page-aware = "true";
|
||||
scroll-full-overlap = "0.01";
|
||||
scroll-step = "100";
|
||||
zoom-min = "10";
|
||||
};
|
||||
|
||||
completion-bg = palette.base02;
|
||||
completion-fg = palette.base05;
|
||||
completion-highlight-bg = palette.base03;
|
||||
completion-highlight-fg = palette.base05;
|
||||
completion-group-bg = palette.base02;
|
||||
completion-group-fg = palette.base0D;
|
||||
|
||||
statusbar-fg = palette.base05;
|
||||
statusbar-bg = palette.base02;
|
||||
|
||||
notification-bg = palette.base02;
|
||||
notification-fg = palette.base05;
|
||||
notification-error-bg = palette.base02;
|
||||
notification-error-fg = palette.base08;
|
||||
notification-warning-bg = palette.base02;
|
||||
notification-warning-fg = palette.base0A;
|
||||
|
||||
inputbar-fg = palette.base05;
|
||||
inputbar-bg = palette.base02;
|
||||
|
||||
recolor = true;
|
||||
recolor-lightcolor = palette.base00;
|
||||
recolor-darkcolor = palette.base05;
|
||||
|
||||
index-fg = palette.base05;
|
||||
index-bg = palette.base00;
|
||||
index-active-fg = palette.base05;
|
||||
index-active-bg = palette.base02;
|
||||
|
||||
render-loading-bg = palette.base00;
|
||||
render-loading-fg = palette.base05;
|
||||
|
||||
highlight-color = rgba lib palette.base03 ".5";
|
||||
highlight-fg = rgba lib palette.base0E ".5";
|
||||
highlight-active-color = rgba lib palette.base0E ".5";
|
||||
})
|
||||
];
|
||||
extraConfig = "include catppuccin-frappe";
|
||||
};
|
||||
xdg.configFile = {
|
||||
"zathura/catppuccin-frappe".source = pkgs.fetchurl {
|
||||
url = "https://raw.githubusercontent.com/catppuccin/zathura/main/src/catppuccin-frappe";
|
||||
hash = "sha256-xdWI/Ai3iE0zRF/9DCxILKmVaNWbfqHm7Xeh6eKM3MY=";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
let
|
||||
# convert rrggbb hex to rgba(r, g, b, a)
|
||||
rgba = lib: color: opacity: let
|
||||
r = toString (hexToDec lib (builtins.substring 0 2 color));
|
||||
g = toString (hexToDec lib (builtins.substring 2 2 color));
|
||||
b = toString (hexToDec lib (builtins.substring 4 2 color));
|
||||
in "rgba(${r}, ${g}, ${b}, ${opacity})";
|
||||
rgba = c: let
|
||||
r = toString (hexToDec (builtins.substring 0 2 c));
|
||||
g = toString (hexToDec (builtins.substring 2 2 c));
|
||||
b = toString (hexToDec (builtins.substring 4 2 c));
|
||||
in "rgba(${r}, ${g}, ${b}, .5)";
|
||||
|
||||
# Helper function to convert hex color to decimal RGB values
|
||||
hexToDec = lib: v: let
|
||||
# Map of hex characters to their decimal values
|
||||
hexToInt = {
|
||||
"0" = 0;
|
||||
"1" = 1;
|
||||
|
@ -32,16 +32,13 @@ let
|
|||
"E" = 14;
|
||||
"F" = 15;
|
||||
};
|
||||
# Remove any leading `#` from the input
|
||||
cleanHex =
|
||||
if lib.strings.substring 0 1 v == "#"
|
||||
then lib.strings.substring 1 (builtins.stringLength v - 1) v
|
||||
else v;
|
||||
# Convert the cleaned string into characters
|
||||
chars = lib.strings.stringToCharacters cleanHex;
|
||||
chars = lib.strings.stringToCharacters v;
|
||||
in
|
||||
# Fold over the characters to calculate the decimal value
|
||||
builtins.foldl' (acc: char: acc * 16 + hexToInt."${char}") 0 chars;
|
||||
lib.foldl' (a: v: a + v) 0
|
||||
(lib.imap (k: v: hexToInt."${v}" * (pow 16 (builtins.length chars - k - 1))) chars);
|
||||
|
||||
# Power function for exponentiation
|
||||
pow = lib: base: exponent: lib.foldl' (acc: _: acc * base) 1 (lib.range 1 exponent);
|
||||
|
||||
blurImage = pkgs: path:
|
||||
pkgs.runCommand "${builtins.baseNameOf path}-blurred" {
|
||||
|
|
16
pkgs/apple-emoji-color.nix
Normal file
16
pkgs/apple-emoji-color.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{pkgs, ...}: let
|
||||
version = "v17.4";
|
||||
in
|
||||
pkgs.stdenv.mkDerivation {
|
||||
inherit version;
|
||||
name = "apple-color-emoji";
|
||||
src = pkgs.fetchurl {
|
||||
url = "https://github.com/samuelngs/apple-emoji-linux/releases/download/${version}/AppleColorEmoji.ttf";
|
||||
sha256 = "sha256-SG3JQLybhY/fMX+XqmB/BKhQSBB0N1VRqa+H6laVUPE=";
|
||||
};
|
||||
phases = ["installPhase"];
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/fonts/truetype/apple-color-emoji
|
||||
cp $src $out/share/fonts/truetype/apple-color-emoji/AppleColorEmoji.ttf
|
||||
'';
|
||||
}
|
|
@ -12,4 +12,5 @@
|
|||
})
|
||||
.callPackage
|
||||
./bolt-launcher.nix {};
|
||||
apple-emoji-color = pkgs.callPackage ./apple-emoji-color.nix {};
|
||||
}
|
||||
|
|
|
@ -4,15 +4,19 @@
|
|||
...
|
||||
}: {
|
||||
fonts = {
|
||||
enableDefaultPackages = false;
|
||||
fontDir = {
|
||||
enable = true;
|
||||
decompressFonts = true;
|
||||
};
|
||||
packages = [
|
||||
pkgs.noto-fonts
|
||||
pkgs.noto-fonts-cjk-sans
|
||||
pkgs.noto-fonts-extra
|
||||
pkgs.intel-one-mono
|
||||
pkgs.noto-fonts-color-emoji
|
||||
inputs.self.packages.${pkgs.system}.apple-emoji-color
|
||||
(pkgs.nerdfonts.override {fonts = ["IntelOneMono" "NerdFontsSymbolsOnly"];})
|
||||
];
|
||||
enableDefaultPackages = false;
|
||||
|
||||
fontconfig = {
|
||||
enable = true;
|
||||
|
@ -20,7 +24,7 @@
|
|||
serif = ["Noto Serif"];
|
||||
sansSerif = ["Inter Medium"];
|
||||
monospace = ["IntoneMono NF"];
|
||||
emoji = ["Noto Color Emoji"];
|
||||
emoji = ["Apple Color Emoji"];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue