From a6f5661a68402b6e971b260de07fc29a52d938bd Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Wed, 10 Mar 2021 18:52:13 +0000 Subject: [PATCH] home: xdg: make it enable-able --- home/xdg.nix | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/home/xdg.nix b/home/xdg.nix index e31a4d3..bdeb326 100644 --- a/home/xdg.nix +++ b/home/xdg.nix @@ -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";