nix-flatpak
nix-flatpak copied to clipboard
Bug | Home Manager Module | Desktop Environment Icons
Description
When flatpaks are installed via the Home Manager module, Desktop Environment icons don't appear. The applications are installed under ~/.local/share/flatpak/app, and can be launched from the terminal.
Launch Output
Output when flatpaks are launched via the terminal:
Note that the directories
'/var/lib/flatpak/exports/share'
'/home/reedclanton/.local/share/flatpak/exports/share'
are not in the search path set by the XDG_DATA_DIRS environment variable, so
applications installed by Flatpak may not appear on your desktop until the
session is restarted.
Temporary Fix
Add the bellow to your Home Manager configuration:
xdg.systemDirs.data = [
"/var/lib/flatpak/exports/share"
"/home/<userName>/.local/share/flatpak/exports/share"
];
Reproduce
- Fresh NixOS install w/ Gnome done with the provided NixOS GUI installer.
- Only install the Home Manger
nix-flatpakmodule.
My nix-flatpak Nix File
{ nix-flatpak, pkgs, user, ... }: {
home.packages = with pkgs; [ flatpak ];
services.flatpak = {
enable = true;
packages = [ { appId = "com.github.tchx84.Flatseal"; origin = "flathub"; } ];
# TODO: Troubleshoot why adding a remote prevents flatpak install and add issue to nix-flatpak github.
# remotes = [{
# name = "flathub-beta";
# location = "https://flathub.org/beta-repo/flathub-beta.flatpakrepo";
# }];
update = {
auto.enable = true;
onActivation = true;
};
};
# xdg.systemDirs.data = [
# "/var/lib/flatpak/exports/share"
# "${user.home}/.local/share/flatpak/exports/share"
# ];
}