{ config, lib, ... }: { options = { quick = { services = with lib; mkOption { type = with types; attrsOf str; default = { }; }; oneShots = with lib; mkOption { type = with types; attrsOf str; default = { }; }; }; }; config = { systemd.user.services = builtins.mapAttrs (name: cmd: { unitConfig = { Description = "${name}"; Requires = [ "graphical-session.target" ]; After = [ "graphical-session.target" "niri.target" ]; }; serviceConfig = { ExecStart = cmd; }; wantedBy = [ "graphical-session.target" ]; }) config.quick.services // builtins.mapAttrs (name: cmd: { unitConfig = { Description = "${name}"; Requires = [ "graphical-session.target" ]; After = [ "graphical-session.target" "niri.target" ]; }; serviceConfig = { ExecStart = cmd; Type = "oneshot"; }; wantedBy = [ "graphical-session.target" ]; }) config.quick.oneShots; }; }