refactor: reorganize features
This commit is contained in:
+60
-2
@@ -81,6 +81,36 @@ let
|
||||
}
|
||||
);
|
||||
|
||||
desktopApplicationType = lib.types.submodule (
|
||||
{ ... }:
|
||||
{
|
||||
options = {
|
||||
command = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
};
|
||||
|
||||
packageAttr = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
desktopType = lib.types.submodule (
|
||||
{ ... }:
|
||||
{
|
||||
options = {
|
||||
browser = lib.mkOption {
|
||||
type = desktopApplicationType;
|
||||
};
|
||||
|
||||
fileManager = lib.mkOption {
|
||||
type = desktopApplicationType;
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
displayType = lib.types.submodule (
|
||||
{ ... }:
|
||||
{
|
||||
@@ -163,6 +193,27 @@ let
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
terminalPrimaryType = lib.types.submodule {
|
||||
options = {
|
||||
package = lib.mkOption {
|
||||
type = lib.types.package;
|
||||
};
|
||||
|
||||
command = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
};
|
||||
|
||||
desktopId = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
};
|
||||
|
||||
execArgs = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = [ ];
|
||||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
options.repo = {
|
||||
@@ -176,8 +227,7 @@ in
|
||||
};
|
||||
|
||||
desktop = lib.mkOption {
|
||||
type = lib.types.raw;
|
||||
default = { };
|
||||
type = desktopType;
|
||||
};
|
||||
|
||||
services = lib.mkOption {
|
||||
@@ -199,4 +249,12 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
config.flake.modules.homeManager.repo-schema =
|
||||
{ ... }:
|
||||
{
|
||||
options.repo.terminal.primary = lib.mkOption {
|
||||
type = terminalPrimaryType;
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user