Allow OS specific settings
This commit is contained in:
parent
46bce1eb16
commit
ec1368950e
1 changed files with 38 additions and 0 deletions
38
lib/modules/os.nix
Normal file
38
lib/modules/os.nix
Normal file
|
@ -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 = {};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue