colim|docker-cli: switch to xdg by default in 26.05

This commit is contained in:
Utkarsh Gupta 2026-02-19 23:55:53 +00:00 committed by Austin Horstman
parent 221046764c
commit 920c07c691
2 changed files with 22 additions and 2 deletions

View file

@ -27,7 +27,17 @@ in
configDir = mkOption {
type = lib.types.str;
apply = p: lib.removePrefix "${config.home.homeDirectory}/" p;
default = ".docker";
default =
if config.xdg.enable && lib.versionAtLeast config.home.stateVersion "26.05" then
"${config.xdg.configHome}/docker"
else
".docker";
defaultText = lib.literalExpression ''
if config.xdg.enable && lib.versionAtLeast config.home.stateVersion "26.05" then
"$XDG_CONFIG_HOME/docker"
else
".docker"
'';
example = lib.literalExpression "\${config.xdg.configHome}/docker";
description = "Directory to store configuration and state. This also sets $DOCKER_CONFIG.";
};