liminix/modules/base.nix

30 lines
712 B
Nix
Raw Normal View History

2022-09-25 12:22:15 +02:00
{ lib, ...}:
2022-09-26 12:46:09 +02:00
let
inherit (lib) mkEnableOption mkOption types isDerivation hasAttr ;
type_service = types.package // {
name = "service";
description = "s6-rc service";
check = x: isDerivation x && hasAttr "serviceType" x;
};
2022-09-25 12:22:15 +02:00
in {
options = {
systemPackages = mkOption {
type = types.listOf types.package;
};
services = mkOption {
2022-09-26 12:46:09 +02:00
type = types.attrsOf type_service;
2022-09-25 12:22:15 +02:00
};
2022-09-26 13:11:26 +02:00
kernel = {
config = mkOption {
# mostly the values are y n or m, but sometimes
# other strings are also used
type = types.attrsOf types.nonEmptyStr;
};
checkedConfig = mkOption {
type = types.attrsOf types.nonEmptyStr;
};
2022-09-25 12:22:15 +02:00
};
};
}