{ config, lib, ... }: let cfg = config.hm.conf.xdg-dirs; in { options.hm.conf.xdg-dirs = { enable = lib.mkEnableOption "enables xdg dirs"; storagePath = lib.mkOption { type = lib.types.path; default = config.home.homeDirectory; description = "base path for storage"; }; }; config = lib.mkIf cfg.enable { xdg.userDirs = { enable = true; createDirectories = true; download = "${config.home.homeDirectory}/dl"; documents = "${config.home.homeDirectory}/dc"; pictures = "${toString cfg.storagePath}/pics"; videos = "${toString cfg.storagePath}/vids"; desktop = null; music = null; publicShare = null; templates = null; extraConfig = { DEV = "${config.home.homeDirectory}/dv"; GAMES = "${config.home.homeDirectory}/games"; storage = "${toString cfg.storagePath}"; SS = "${toString cfg.storagePath}/pics/ss"; CLIPS = "${toString cfg.storagePath}/vids/clips"; MOVIES = "${toString cfg.storagePath}/movies"; ANIME = "${toString cfg.storagePath}/anime"; ARCHIVE = "${toString cfg.storagePath}/archive"; }; }; }; }