self: { config, lib, pkgs, ... }: let cfg = config.services.rhemawave; in { options.services.rhemawave = { enable = lib.mkEnableOption "RhemaWave kiosk application"; package = lib.mkOption { type = lib.types.package; # Points to the default package in your flake default = self.packages.${pkgs.system}.default; description = "The RhemaWave package to use."; }; user = lib.mkOption { type = lib.types.str; default = "kiosk"; description = "The user account name."; }; }; config = lib.mkIf cfg.enable { # Just put the package in the system path. # The machine (configuration.nix) handles the service and the files. environment.systemPackages = [ cfg.package ]; }; }