add: more system modules

This commit is contained in:
ooks-io 2024-01-17 22:18:39 +13:00
parent 47eb3e0691
commit 793cc3131c
17 changed files with 291 additions and 56 deletions

View file

@ -0,0 +1,40 @@
{ lib, config, ... }:
let
profileEnabler = let
reducer = l: r: {"${r}".enable = true;} // l;
in
builtins.foldl' reducer {} config.activeProfiles;
in
{
imports = [
./base
./nvidia
#./gaming
#./laptop
];
options = {
activeProfiles = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [];
};
systemProfiles = {
base = {
enable = lib.mkEnableOption "Enable the base profile";
};
gaming = {
enable = lib.mkEnableOption "Enable the gaming profile";
};
laptop = {
enable = lib.mkEnableOption "Enable the laptop profile";
};
nvidia = {
enable = lib.mkEnableOption "Enable the nvidia profile";
};
};
};
config.profiles = profileEnabler;
}