{ pkgs, lib, config, ... }: with builtins; { options.host = { name = lib.mkOption { type = lib.types.str; default = head (match "([a-z0-9]*)\n?" (readFile "/etc/hostname")); description = "hostname"; }; hardware = lib.mkOption { type = with lib.types; listOf str; default = filter (x: isString x && x != "") (split "[ \n]+" (readFile "/sys/devices/virtual/dmi/id/product_name")); description = "hardware"; }; desktop = lib.mkEnableOption "desktop profile"; server = lib.mkEnableOption "server profile"; }; }