blob: eda221123efaf33e2efccad3d60c3a28709ecd94 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
{ config, lib, pkgs, ... }:
let cfg = config.my.home.xdg;
in
{
options.my.home.xdg = with lib; {
enable = mkEnableOption "XDG configuration";
};
config = lib.mkIf cfg.enable {
xdg = {
enable = true;
# File types
mime.enable = true;
# File associatons
mimeApps = { enable = true; };
# User directories
userDirs = {
enable = true;
createDirectories = true;
desktop = "${config.home.homeDirectory}/documents";
documents = "${config.home.homeDirectory}/documents";
download = "${config.home.homeDirectory}/downloads";
music = "${config.home.homeDirectory}/media/music";
pictures = "${config.home.homeDirectory}/media/pictures";
publicShare = "${config.home.homeDirectory}/documents/public";
templates = "${config.home.homeDirectory}/documents/templates";
videos = "${config.home.homeDirectory}/media/videos";
};
};
# xdg.portal = {
# enable = true;
# gtkUsePortal = true;
# extraPortals =
# [ pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-wlr ];
# };
home.packages = with pkgs; [ xdg-utils ];
# I want a tidier home
home.sessionVariables = with config.xdg; {
DOCKER_CONFIG = "${configHome}/docker";
LESSHISTFILE = "${dataHome}/less/history";
LESSKEY = "${configHome}/less/lesskey";
};
};
}
|