about summary refs log tree commit diff
path: root/modules/darwin/common/xdg.nix
blob: 9e798ad82f413bec4fd7d9617a874d7aeffd6244 (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
{
  config,
  lib,
  ...
}:
with lib; let
  cfg = config.nixfiles.modules.common.xdg;
in {
  hm.home.sessionVariables = with cfg;
    {
      XDG_CACHE_HOME = cacheHome;
      XDG_CONFIG_HOME = configHome;
      XDG_DATA_HOME = dataHome;
      XDG_STATE_HOME = stateHome;
    }
    // (with userDirs; {
      XDG_DOCUMENTS_DIR = documents;
      XDG_DOWNLOAD_DIR = download;
      XDG_MUSIC_DIR = music;
      XDG_PICTURES_DIR = pictures;
      XDG_PUBLICSHARE_DIR = publicShare;
      XDG_TEMPLATES_DIR = templates;
      XDG_VIDEOS_DIR = videos;
    });
}

Consider giving Nix/NixOS a try! <3