{ config, lib, ... }: let cfg = config.playground; in { options.playground = { hostName = lib.mkOption { type = lib.types.str; default = "playground"; description = "The host name used by the example system configuration."; }; motd = lib.mkOption { type = lib.types.str; default = "hello"; description = "Text written to /etc/playground-motd."; }; }; config = { networking.hostName = cfg.hostName; environment.etc."playground-motd".text = cfg.motd; }; }