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
];
}

View file

@ -1,7 +1,13 @@
{
xdg.mime.enable = true;
xdg.mimeApps = {
enable = true;
defaultApplications = {
"application/pdf" = "org.kde.okular.desktop";
"text/plain" = "nvim-qt.desktop";
"text/x-csrc" = "nvim-qt.desktop";
"text/x-chdr" = "nvim-qt.desktop";
"inode/directory" = "org.kde.dolphin.desktop";
};
};
}

View file

@ -1,6 +1,8 @@
{pkgs, ...}: {
home.packages = with pkgs.kdePackages; [
yakuake
home.packages = with pkgs; [
kdePackages.yakuake
krunner-vscodeprojects
jetbrains-runner
];
programs.plasma = {
enable = true;
@ -28,6 +30,11 @@
];
};
};
shortcuts = {
yakuake = {
"toggle-window-state" = "Meta+`";
};
};
input.touchpads = [
{
disableWhileTyping = true;
@ -101,7 +108,7 @@
"org.kde.plasma.marginsseparator"
];
opacity = "translucent";
hiding = "dodgewindows";
hiding = "none";
}
];
};

View file

@ -4,13 +4,26 @@
nix-flatpak,
plasma-manager,
...
}:
{
}: let
my-catppuccin-kde = pkgs.catppuccin-kde.override {
flavour = [
"mocha"
"latte"
];
accents = ["pink"];
winDecStyles = ["classic"];
};
my-catppuccin-gtk = pkgs.catppuccin-gtk.override {
accents = ["pink"];
variant = "mocha";
};
in {
imports = [
./default.nix
./packages/cli.nix
./packages/gui.nix
./packages/flatpak.nix
./packages/fonts.nix
./programs/chromium.nix
./programs/gnome.nix
./programs/plasma.nix
@ -37,5 +50,12 @@
# ./flatpak.nix
];
home.packages = with pkgs; [
catppuccin
my-catppuccin-gtk
my-catppuccin-kde
catppuccin-fcitx5
];
home.stateVersion = "25.05";
}