{
  pkgs,
  lib,
  inputs,
  mainUser,
  getPkgs,
  ...
}:
let
  inherit (lib) getExe getExe';
in
{
  # quickshell stuff
  environment.systemPackages =
    getPkgs {
      inherit (pkgs.kdePackages) qtbase qtdeclarative;
      inherit (pkgs) wl-clipboard;
    }
    ++ [
      (inputs.quickshell.packages.${pkgs.system}.default.override {
        withHyprland = false;
        withI3 = false;
      })
    ];

  systemd.user.services.quickshell = {
    path = [ inputs.niri.packages.${pkgs.system}.niri-unstable ];
    unitConfig = {
      Description = "Quickshell";
      Requires = [
        "graphical-session.target"
      ];
      After = [
        "graphical-session.target"
        "niri.target"
      ];
    };
    wantedBy = [ "graphical-session.target" ];
    serviceConfig.ExecStart = "${getExe' (inputs.quickshell.packages.${pkgs.system}.default.override {
      withHyprland = false;
      withI3 = false;
    }) "qs"}";
  };

  quick.services = {
    swaync = "${getExe pkgs.swaynotificationcenter}";
    swayidle =
      let
        niri = inputs.niri.packages.${pkgs.system}.niri-unstable;
        systemctl = getExe' pkgs.systemd "systemctl";
      in
      ''
        ${lib.getExe pkgs.swayidle} -w \
          timeout 1800 '${systemctl} suspend' \
          timeout 600 '${niri} msg action power-off-monitors'
      '';
  };

  environment.files."/home/${mainUser}/.config/quickshell" = {
    source = "/home/${mainUser}/.nix/graphical/desktop/quickshell";
    uid = 1000;
    gid = 100;
  };
}
