diff --git a/lib/modules/os.nix b/lib/modules/os.nix new file mode 100644 index 00000000..15783edf --- /dev/null +++ b/lib/modules/os.nix @@ -0,0 +1,38 @@ +{ lib, ... }: + let + inherit (lib) + mkOption + types + ; + in { + options = { + valhalla = mkOption { + type = types.submodule ( + { extendModules, ... }: + let + osVariant = extendModules { }; + linuxVariant = osVariant.extendModules { }; + windowsVariant = osVariant.extendModules { }; + in { + options = { + linux = mkOption { + inherit (linuxVariant) type; + description = "The Linux specific configuration."; + default = {}; + visible = "shallow"; + }; + + windows = mkOption { + inherit (windowsVariant) type; + description = "The Windows specific configuration."; + default = {}; + visible = "shallow"; + }; + }; + }); + + description = "Configuration for PortValhalla."; + default = {}; + }; + }; + } \ No newline at end of file