{
  pkgs,
  lib,
  config,
  ...
}: let
  program = "xdg";
  cfg = config.dots.${program};
  #sec = sops.secrets;
in {
  options.dots.${program} = {
    enable = lib.mkEnableOption "enables ${program}";
  };

  config = lib.mkIf cfg.enable {
    home.packages = with pkgs; [xdg-ninja];

    xdg =
      if pkgs.system == "x86_64-darwin"
      then {}
      else {
        enable = true;
        configHome = "/home/blake/.config";
        cacheHome = "/home/blake/.cache";
        dataHome = "/home/blake/.local/share";
        stateHome = "/home/blake/.local/state";

        userDirs = {
          enable = true;
          # writes ~/.config/user-dirs.dirs
          desktop = "/home/blake/desktop";
          download = "/home/blake/downloads";
          documents = "/home/blake/documents";
          pictures = "/home/blake/pictures";
          videos = "/home/blake/videos";
          music = "/home/blake/music";
          publicShare = "/home/blake/public";
          templates = "/home/blake/templates";
        };
      };

    # misc env variables to get things out of ~ (<3 xdg-ninja)
    home.sessionVariables =
      if pkgs.system == "x86_64-darwin"
      then {}
      else {
        GOPATH = "$XDG_DATA_HOME/go";
        _JAVA_OPTIONS = ''-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME"/java'';
      };
  };
}
