home: xdg: make it enable-able

This commit is contained in:
Bruno BELANYI 2021-03-10 18:52:13 +00:00
parent e92c46fc6d
commit a6f5661a68

View file

@ -1,6 +1,13 @@
{ config, ... }:
{ config, lib, ... }:
let
cfg = config.my.home.xdg;
in
{
xdg = {
options.my.home.xdg = with lib.my; {
enable = mkDisableOption "XDG configuration";
};
config.xdg = lib.mkIf cfg.enable {
enable = true;
# File types
mime.enable = true;
@ -29,7 +36,7 @@
};
# I want a tidier home
home.sessionVariables = with config.xdg; {
config.home.sessionVariables = with config.xdg; lib.mkIf cfg.enable {
CARGO_HOME = "${dataHome}/cargo";
DOCKER_CONFIG = "${configHome}/docker";
HISTFILE = "${dataHome}/bash/history";