{ pkgs, config, ... }:
let homeDir = config.home.homeDirectory;
in {
  home.packages = with pkgs; [
    dwm
    dmenu
    xorg.xinit
    xorg.xmodmap
    xss-lock
    gnupg
    i3lock-color
  ];

  systemd.user.services.xdg-autostarts = {
    Unit = {
      Description = "Bring in XDG-Autostarts auto-generated by systemd";
      Wants = [ "xdg-desktop-autostart.target" ];
    };

    Service = {
      Type = "oneshot";
      ExecStart = "${pkgs.runtimeShell} -c 'exec sleep 1'";
    };

    Install = { WantedBy = [ "wm.target" ]; };
  };

  systemd.user.tmpfiles.rules = [
    "d ${homeDir}/.local/share/xorg"
    "f ${homeDir}/.local/share/xorg/xorg.tty.log"
    "d ${homeDir}/.local/share/dwm"
  ];
}
