feat: add defaultApplication and startupApplications options

This commit is contained in:
Dmitriy Kholkin 2025-06-07 18:10:05 +03:00
parent fc2638152d
commit 7c0d62d2b1
Signed by: AtaraxiaDev
GPG Key ID: FD266B810DF48DF2

View File

@ -6,7 +6,14 @@ let
mapAttrs
readDir
;
inherit (lib) hasSuffix remove;
inherit (lib) hasSuffix mkOption remove;
inherit (lib.types)
attrsOf
listOf
path
str
submodule
;
filterRoot = remove (./. + "/default.nix");
@ -35,4 +42,27 @@ let
in
{
imports = filterRoot (findModules ./.);
options = {
defaultApplications = mkOption {
default = { };
type = attrsOf (
submodule (
{ ... }:
{
options = {
cmd = mkOption { type = path; };
desktop = mkOption { type = str; };
};
}
)
);
description = "Preferred applications";
};
startupApplications = mkOption {
type = listOf str;
description = "Applications to run on startup";
};
};
}