Expand xdg config

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2024-06-23 16:39:46 +03:00
parent e7d328cab5
commit 3d503fd1c2
11 changed files with 97 additions and 52 deletions

View File

@@ -247,7 +247,6 @@ in
fi
${cfg.extraConfig}
$
'';
};
in

View File

@@ -0,0 +1,48 @@
{ config, lib, ... }:
let
cfg = config.xdg;
in
{
options.xdg = with lib; with types; {
relativeCacheHome = mkOption {
type = str;
default = ".cache";
description = "Relative path to directory holding application caches.";
};
cacheHome = mkOption {
default = "${config.home.homeDirectory}/${cfg.relativeCacheHome}";
};
relativeConfigHome = mkOption {
type = str;
default = ".config";
description = "Relative path to directory holding application configurations.";
};
configHome = mkOption {
default = "${config.home.homeDirectory}/${cfg.relativeConfigHome}";
};
relativeDataHome = mkOption {
type = str;
default = ".local/share";
description = "Relative path to directory holding application data.";
};
dataHome = mkOption {
default = "${config.home.homeDirectory}/${cfg.relativeDataHome}";
};
relativeStateHome = mkOption {
type = str;
default = ".local/state";
description = "Relative path to directory holding application states.";
};
stateHome = mkOption {
default = "${config.home.homeDirectory}/${cfg.relativeStateHome}";
};
};
}