mirror of
https://github.com/lhns/steam-frame-nix.git
synced 2026-10-06 07:00:27 +02:00
Applications menu for KDE apps in the Steam session
SteamOS only ships /etc/xdg/menus/plasma-applications.menu; the nested desktop sets XDG_MENU_PREFIX=plasma-, the Steam session doesn't, so KDE apps started there (Dolphin from the "+" menu) built an empty app database: "no installed application can open" every file. session.applicationsMenu (module applications-menu, on by default) links ~/.config/menus/applications.menu to Plasma's menu. Flake check: the link is generated by default and absent when disabled.
This commit is contained in:
1 parent
0d9a238e5a
commit
59513bcbb1
7 files changed
+103
-13
No files matched your search
@@ -0,0 +1,31 @@
|
||||
# Evaluates the applications-menu module against a stub of Home Manager's
|
||||
# options: on by default the link to Plasma's menu is generated, disabled it
|
||||
# is absent.
|
||||
{ pkgs }:
|
||||
let
|
||||
inherit (pkgs) lib;
|
||||
eval = cfg: (lib.evalModules {
|
||||
modules = [
|
||||
../applications-menu.nix
|
||||
{
|
||||
options.xdg.configFile = lib.mkOption {
|
||||
type = lib.types.attrsOf (lib.types.attrsOf lib.types.anything);
|
||||
default = { };
|
||||
};
|
||||
options.lib = lib.mkOption { type = lib.types.attrsOf lib.types.anything; };
|
||||
config = {
|
||||
_module.check = false; # Home Manager options the stub doesn't declare
|
||||
_module.args.pkgs = pkgs;
|
||||
lib.file.mkOutOfStoreSymlink = p: "out-of-store:${p}";
|
||||
};
|
||||
}
|
||||
cfg
|
||||
];
|
||||
}).config.xdg.configFile;
|
||||
on = eval { };
|
||||
off = eval { steamFrame.session.applicationsMenu.enable = false; };
|
||||
in
|
||||
assert on."menus/applications.menu".source
|
||||
== "out-of-store:/etc/xdg/menus/plasma-applications.menu";
|
||||
assert !(off ? "menus/applications.menu");
|
||||
pkgs.runCommand "applications-menu-check" { } "touch $out"
|
||||
Reference in new issue
Block a user