refactor: desktop default applications

This commit is contained in:
2026-04-27 17:28:34 +02:00
parent 93624900ad
commit 088080590c
10 changed files with 106 additions and 76 deletions
+28 -34
View File
@@ -81,35 +81,21 @@ let
}
);
desktopApplicationType = lib.types.submodule (
{ ... }:
{
options = {
command = lib.mkOption {
type = lib.types.str;
};
packageAttr = lib.mkOption {
type = lib.types.str;
};
desktopApplicationType = lib.types.submodule {
options = {
package = lib.mkOption {
type = lib.types.package;
};
}
);
desktopType = lib.types.submodule (
{ ... }:
{
options = {
browser = lib.mkOption {
type = desktopApplicationType;
};
fileManager = lib.mkOption {
type = desktopApplicationType;
};
command = lib.mkOption {
type = lib.types.str;
};
}
);
desktopId = lib.mkOption {
type = lib.types.str;
};
};
};
displayType = lib.types.submodule (
{ ... }:
@@ -194,7 +180,7 @@ let
}
);
terminalPrimaryType = lib.types.submodule {
terminalType = lib.types.submodule {
options = {
package = lib.mkOption {
type = lib.types.package;
@@ -226,10 +212,6 @@ in
default = { };
};
desktop = lib.mkOption {
type = desktopType;
};
services = lib.mkOption {
type = lib.types.raw;
default = { };
@@ -249,11 +231,23 @@ in
};
};
config.flake.modules.homeManager.repo-schema =
config.flake.modules.homeManager.meta =
{ ... }:
{
options.repo.terminal.primary = lib.mkOption {
type = terminalPrimaryType;
options.meta.terminal = lib.mkOption {
type = terminalType;
};
options.meta.desktop.browser = lib.mkOption {
type = desktopApplicationType;
};
options.meta.desktop.fileManager = lib.mkOption {
type = desktopApplicationType;
};
options.meta.pinentry.package = lib.mkOption {
type = lib.types.package;
};
};