Change:
<ins> { config, lib, pkgs, ... }: let cfg = config.services.asusd; json = pkgs.formats.json { }; toml = pkgs.formats.toml { }; in { options = { services.asusd = { enable = lib.mkEnableOption (lib.mdDoc "the asusd service for ASUS ROG laptops"); enableUserService = lib.mkOption { type = lib.types.bool; default = false; description = lib.mdDoc '' Activate the asusd-user service. ''; }; animeConfig = lib.mkOption { type = json.type; default = { }; description = lib.mdDoc '' The content of /etc/asusd/anime.conf. See https://asus-linux.org/asusctl/#anime-control. ''; }; asusdConfig = lib.mkOption { type = json.type; default = { }; description = lib.mdDoc '' The content of /etc/asusd/asusd.conf. See https://asus-linux.org/asusctl/. ''; }; auraConfig = lib.mkOption { type = json.type; default = { }; description = lib.mdDoc '' The content of /etc/asusd/aura.conf. See https://asus-linux.org/asusctl/#led-keyboard-control. ''; }; profileConfig = lib.mkOption { type = lib.types.nullOr lib.types.str; default = ""; description = lib.mdDoc '' The content of /etc/asusd/profile.conf. See https://asus-linux.org/asusctl/#profiles. ''; }; ledModesConfig = lib.mkOption { type = lib.types.nullOr toml.type; default = null; description = lib.mdDoc '' The content of /etc/asusd/asusd-ledmodes.toml. Leave `null` to use default settings. See https://asus-linux.org/asusctl/#led-keyboard-control. ''; }; userLedModesConfig = lib.mkOption { type = lib.types.nullOr toml.type; default = null; description = lib.mdDoc '' The content of /etc/asusd/asusd-user-ledmodes.toml. See https://asus-linux.org/asusctl/#led-keyboard-control. ''; }; }; }; config = lib.mkIf cfg.enable { environment.systemPackages = [ pkgs.asusctl ]; environment.etc = let maybeConfig = name: cfg: lib.mkIf (cfg != { }) { source = json.generate name cfg; mode = "0644"; }; in { "asusd/anime.conf" = maybeConfig "anime.conf" cfg.animeConfig; "asusd/asusd.conf" = maybeConfig "asusd.conf" cfg.asusdConfig; "asusd/aura.conf" = maybeConfig "aura.conf" cfg.auraConfig; "asusd/profile.conf" = lib.mkIf (cfg.profileConfig != null) { source = pkgs.writeText "profile.conf" cfg.profileConfig; mode = "0644"; }; "asusd/asusd-ledmodes.toml" = { source = if cfg.ledModesConfig == null then "${pkgs.asusctl}/share/asusd/data/asusd-ledmodes.toml" else toml.generate "asusd-ledmodes.toml" cfg.ledModesConfig; mode = "0644"; }; }; services.dbus.enable = true; systemd.packages = [ pkgs.asusctl ]; services.dbus.packages = [ pkgs.asusctl ]; services.udev.packages = [ pkgs.asusctl ]; services.supergfxd.enable = true; systemd.user.services.asusd-user.enable = cfg.enableUserService; }; meta.maintainers = pkgs.asusctl.meta.maintainers; } </ins>

Discussion:
Project description It is a command line utility which adds features for asus laptops. For example graphics card switching, anime matrix control (for g14). fan control, keyboard backlight control, cpu boost control, profiles, fan curves and other stuff. It basically unlocks a lot of functionality for laptops and can be used for non asus laptops as well contrary to the name. Metadata homepage URL:https://asus- source license: Mozilla Public License 2.0 platforms: Linux
I've made a PR to introduce the asusctl package as well as a NixOS module to run asusd. Can someone give this a try, I personally do not have Asus hardware to test it properly. You can find the PR here: