nix: dirty flatpak fonts

This commit is contained in:
js0ny 2025-10-16 01:04:06 +01:00
parent af7c7b49f2
commit 608cd05802
8 changed files with 67 additions and 23 deletions

View file

@ -1,5 +1,5 @@
# https://github.com/gmodena/nix-flatpak
{nix-flatpak, ...}: {
{home, ...}: {
services.flatpak.enable = true;
services.flatpak.remotes = [
{
@ -28,11 +28,14 @@
global = {
Context = {
# Force wayland by default
sockets = ["wayland" "!x11" "!fallback-x11"];
filesystems = [
"/run/current-system/sw/share/fonts:ro"
"xdg-config/fontconfig:ro"
# "xdg-data/fonts:ro"
# If user font is set, it is required to access /nix/store
# since flatpak apps cannot read ~/.config/fontconfig/conf.d/*
# TODO: This is a bad practice, trying to look for a better solution
"/nix/store:ro"
"xdg-data/fonts:ro"
];
};
};
@ -44,5 +47,6 @@
QT_IM_MODULE = "fcitx";
};
};
"md.obsidian.Obsidian".Context.sockets = ["wayland"];
};
}

View file

@ -0,0 +1,13 @@
{pkgs, ...}: {
fonts.fontconfig.enable = true;
fonts.fontconfig = {
defaultFonts = {
monospace = [
"Maple Mono NF"
"JetBrainsMono Nerd Font"
];
serif = ["LXGW WenKai"];
sansSerif = ["LXGW Neo XiHei"];
};
};
}

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
home.packages = with pkgs; [
kitty
ghostty
@ -33,5 +32,6 @@
proton-pass
protonmail-bridge-gui
mpv
neovim-qt
];
}