refactor: reorganize features

This commit is contained in:
2026-04-27 16:47:12 +02:00
parent 0b2ecd31b0
commit 93624900ad
18 changed files with 193 additions and 206 deletions
+60 -2
View File
@@ -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;
};
};
}