blob: ba5b063601cebc6000f15aa45591297fce961d16 (
plain)
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
48
49
50
51
52
53
|
{ 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}/docs";
pictures = "${toString cfg.storagePath}/pics";
videos = "${toString cfg.storagePath}/vids";
desktop = null;
music = null;
publicShare = null;
templates = null;
extraConfig = {
PROJECTS = "${config.home.homeDirectory}/proj";
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";
};
};
home.sessionVariables = {
PROJECTS = "${config.home.homeDirectory}/proj";
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";
};
};
}
|