27 lines
556 B
Nix
27 lines
556 B
Nix
|
{ config, lib, pkgs, ... }:
|
||
|
|
||
|
let
|
||
|
inherit (config.desktop) hiddenApps;
|
||
|
|
||
|
hiddenAppsPackage = pkgs.runCommandLocal "hidden-apps" {} ''
|
||
|
mkdir -p $out/share/applications
|
||
|
for app in ${lib.escapeShellArgs hiddenApps}; do
|
||
|
ln -sf /dev/null "$out/share/applications/$app"
|
||
|
done
|
||
|
'';
|
||
|
in
|
||
|
|
||
|
{
|
||
|
options.desktop = {
|
||
|
hiddenApps = lib.mkOption {
|
||
|
type = with lib.types; listOf str;
|
||
|
default = [];
|
||
|
};
|
||
|
};
|
||
|
config = lib.mkIf (hiddenApps != []) {
|
||
|
environment.systemPackages = [
|
||
|
(lib.hiPrio hiddenAppsPackage)
|
||
|
];
|
||
|
};
|
||
|
}
|