feat: fonts on flatpak apps

This commit is contained in:
Guz
2025-07-04 19:18:03 -03:00
parent 0a4607c37b
commit 63ab4a8c31
3 changed files with 31 additions and 25 deletions

View File

@@ -43,8 +43,9 @@
sockets = ["wayland" "!x11" "!fallback-x11"];
filesystems = [
# Access to user themes
"$HOME/.icons"
"$HOME/.themes"
"$HOME/.icons:ro"
"$HOME/.themes:ro"
"$HOME/.local/share/fonts:ro"
];
};
Environment = {

View File

@@ -1,4 +1,4 @@
{...}: {
{pkgs, ...}: {
imports = [
../worm/configuration.nix
];
@@ -7,6 +7,33 @@
services.flatpak.enable = true;
fonts.fontDir.enable = true;
fonts.fontconfig.enable = true;
fonts.packages = with pkgs; [
google-fonts
nerd-fonts.fira-code
(stdenv.mkDerivation rec {
name = "Cal Sans";
pname = "calsans";
version = "1.0.0";
src = pkgs.fetchzip {
url = "https://github.com/calcom/font/releases/download/v${version}/CalSans_Semibold_v${version}.zip";
stripRoot = false;
hash = "sha256-JqU64JUgWimJgrKX3XYcml8xsvy//K7O5clNKJRGaTM=";
};
installPhase = ''
runHook preInstall
install -m444 -Dt $out/share/fonts/truetype fonts/webfonts/*.ttf
runHook postInstall
'';
meta = with lib; {
homepage = "https://github.com/calcom/font";
license = licenses.ofl;
platforms = platforms.all;
};
})
];
# Xremap run-as-user
hardware.uinput.enable = true;
users.groups.uinput.members = ["guz"];

View File

@@ -39,26 +39,4 @@
name = "FiraCode Nerd Font";
};
};
home.packages = [
(pkgs.stdenv.mkDerivation rec {
name = "Cal Sans";
pname = "calsans";
version = "1.0.0";
src = pkgs.fetchzip {
url = "https://github.com/calcom/font/releases/download/v${version}/CalSans_Semibold_v${version}.zip";
stripRoot = false;
hash = "sha256-JqU64JUgWimJgrKX3XYcml8xsvy//K7O5clNKJRGaTM=";
};
installPhase = ''
runHook preInstall
install -m444 -Dt $out/share/fonts/truetype fonts/webfonts/*.ttf
runHook postInstall
'';
meta = with lib; {
homepage = "https://github.com/calcom/font";
license = licenses.ofl;
platforms = platforms.all;
};
})
];
}