1
0
Fork 0
mirror of https://git.sr.ht/~neverness/ultima synced 2025-01-09 20:03:56 +00:00
ultima/modules/home/misc/xdg/default.nix

35 lines
867 B
Nix
Raw Normal View History

2024-12-03 14:20:37 +00:00
{ pkgs, lib, config, flakeDir, True, ... }:
2024-11-21 09:24:15 +00:00
with lib;
let
cfg = config.module.misc.xdg;
hmdir = config.home.homeDirectory;
in {
options = { module.misc.xdg = { enable = mkEnableOption ""; }; };
imports = [ ./mimeApps.nix ];
config = mkIf cfg.enable {
xdg = {
mime = True;
portal = True // {
config.common.default = "gtk";
2024-12-03 14:20:37 +00:00
extraPortals = with pkgs; [ xdg-desktop-portal-gtk ];
2024-11-21 09:24:15 +00:00
};
userDirs = True // {
createDirectories = true;
desktop = "${hmdir}/Desktop";
documents = "${hmdir}/Documents";
download = "${hmdir}/Downloads";
music = "${hmdir}/Music";
pictures = "${hmdir}/Pictures";
publicShare = "${hmdir}/";
templates = "${hmdir}/";
videos = "${hmdir}/Videos";
2024-12-03 14:20:37 +00:00
extraConfig = { XDG_FLAKE_DIR = flakeDir; };
2024-11-21 09:24:15 +00:00
};
};
};
}