link icons for flatpak + guitar desktop entry
This commit is contained in:
@ -52,20 +52,22 @@ rec {
|
|||||||
# NOTE: I don't think I need this anymore as all fonts are installed through the system config but let's keep this just in case
|
# NOTE: I don't think I need this anymore as all fonts are installed through the system config but let's keep this just in case
|
||||||
fonts.fontconfig.enable = true; # Also updates the font-cache
|
fonts.fontconfig.enable = true; # Also updates the font-cache
|
||||||
|
|
||||||
# Make fonts available to flatpak apps, we link the fontdir to $XDG_DATA_DIR/fonts and allow access
|
# We link like this to be able to address the absolute location, also the fonts won't get copied to store
|
||||||
# home.file.".local/share/fonts" = {
|
# NOTE: This path contains all the fonts because fonts.fontDir.enable is true
|
||||||
# recursive = true;
|
|
||||||
# source = /run/current-system/sw/share/X11/fonts; # We cannot use the absolute path
|
|
||||||
# };
|
|
||||||
# We link like this to be able to address the absolute location, also the fonts won't get copied to store, also icons
|
|
||||||
home.activation.linkFontDir = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
home.activation.linkFontDir = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||||
if [ ! -L "${home.homeDirectory}/.local/share/fonts" ]; then
|
if [ ! -L "${home.homeDirectory}/.local/share/fonts" ]; then
|
||||||
ln -sf /run/current-system/sw/share/X11/fonts ${home.homeDirectory}/.local/share/fonts
|
ln -sf /run/current-system/sw/share/X11/fonts ${home.homeDirectory}/.local/share/fonts
|
||||||
fi
|
fi
|
||||||
|
'';
|
||||||
|
# Also link icons
|
||||||
|
# NOTE: This path works because we have homeManager.useUserPackages = true (everything is stored in /etc/profiles/)
|
||||||
|
home.activation.linkIconDir = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||||
if [ ! -L "${home.homeDirectory}/.local/share/icons" ]; then
|
if [ ! -L "${home.homeDirectory}/.local/share/icons" ]; then
|
||||||
ln -sf /run/current-system/sw/share/icons ${home.homeDirectory}/.local/share/icons
|
ln -sf /etc/profiles/per-user/christoph/share/icons ${home.homeDirectory}/.local/share/icons
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# Allow access to linked fonts/icons
|
||||||
home.file.".local/share/flatpak/overrides/global".text = ''
|
home.file.".local/share/flatpak/overrides/global".text = ''
|
||||||
[Context]
|
[Context]
|
||||||
filesystems=/run/current-system/sw/share/X11/fonts:ro;/run/current-system/sw/share/icons:ro;/nix/store:ro
|
filesystems=/run/current-system/sw/share/X11/fonts:ro;/run/current-system/sw/share/icons:ro;/nix/store:ro
|
||||||
@ -90,19 +92,24 @@ rec {
|
|||||||
in
|
in
|
||||||
formatted;
|
formatted;
|
||||||
|
|
||||||
# TODO: Make to a derivation with makeDesktopIcon and add to music module
|
# TODO: Music module
|
||||||
# Doesn't work
|
# NOTE: This desktop entry is created in /etc/profiles/per-user/christoph/share/applications
|
||||||
# home.file.".local/share/applications/carla-guitar-amp.desktop".text = ''
|
# This location is part of XDG_DATA_DIRS
|
||||||
# [Desktop Entry]
|
# TODO: Although everything seems correct, gnome doesn't show it
|
||||||
# Type=Application
|
xdg.desktopEntries.guitar = {
|
||||||
# Exec=PIPEWIRE_LATENCY=256/48000 gamemoderun carla ${home.homeDirectory}/Documents/Carla/GuitarDefault.carxp
|
name = "Guitar Amp (Carla)";
|
||||||
# Terminal=false
|
genericName = "Guitar Amp Simulation";
|
||||||
# Name=Carla Guitar Amp
|
icon = "carla";
|
||||||
# Icon=carla
|
exec = "PIPEWIRE_LATENCY=256/48000 gamemoderun carla ${home.homeDirectory}/Documents/Carla/GuitarDefault.carxp";
|
||||||
# Comment=Play through NeuralDSP Gojira and Petrucci
|
terminal = false;
|
||||||
# GenericName=Guitar Amp Simulation
|
categories = [ "Music" "Audio" ];
|
||||||
# Categories=Music;Audio;
|
};
|
||||||
# '';
|
|
||||||
|
# TODO: Does this has to be set manually or is it set by flatpak.enable?
|
||||||
|
# xdg.systemDirs.data = [
|
||||||
|
# "/var/lib/flatpak/exports/share"
|
||||||
|
# "${home.homeDirectory}/.local/share/flatpak/exports/share"
|
||||||
|
# ];
|
||||||
|
|
||||||
# TODO: Module
|
# TODO: Module
|
||||||
gtk = {
|
gtk = {
|
||||||
@ -132,11 +139,9 @@ rec {
|
|||||||
VISUAL = "nvim";
|
VISUAL = "nvim";
|
||||||
LANG = "en_US.UTF-8";
|
LANG = "en_US.UTF-8";
|
||||||
|
|
||||||
XDG_DATA_DIRS =
|
|
||||||
"/var/lib/flatpak/exports/share:/home/christoph/.local/share/flatpak/exports/share:$XDG_DATA_DIRS";
|
|
||||||
DOCKER_BUILDKIT = 1;
|
DOCKER_BUILDKIT = 1;
|
||||||
|
|
||||||
# Enable wayland for other shitty apps
|
# Firefox vaapi test
|
||||||
MOZ_ENABLE_WAYLAND = 1;
|
MOZ_ENABLE_WAYLAND = 1;
|
||||||
MOZ_USE_XINPUT2 = 1;
|
MOZ_USE_XINPUT2 = 1;
|
||||||
QT_QPA_PLATFORM = "wayland";
|
QT_QPA_PLATFORM = "wayland";
|
||||||
@ -150,10 +155,6 @@ rec {
|
|||||||
# WINEPREFIX = "/home/christoph/.wine";
|
# WINEPREFIX = "/home/christoph/.wine";
|
||||||
|
|
||||||
# NOTE: GTK_IM_MODULE, QT_IM_MODULE, XMODIFIERS are set by HomeManager fcitx5 module
|
# NOTE: GTK_IM_MODULE, QT_IM_MODULE, XMODIFIERS are set by HomeManager fcitx5 module
|
||||||
|
|
||||||
# TODO: Investigate if this also slows down Gnome login
|
|
||||||
# GTK_USE_PORTAL = 1;
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# sessionPath = [];
|
# sessionPath = [];
|
||||||
|
Reference in New Issue
Block a user