Refactor XDG user directories

This commit is contained in:
Oliver Davies 2025-03-25 23:36:52 +00:00
parent 4ae602d0fa
commit 40c8776e4b
3 changed files with 14 additions and 11 deletions

View file

@ -80,16 +80,19 @@ in
PULUMI_SKIP_UPDATE_CHECK = "true"; PULUMI_SKIP_UPDATE_CHECK = "true";
W3M_DIR = "${stateHome}/w3m"; W3M_DIR = "${stateHome}/w3m";
WGETRC = "${configHome}/wgetrc"; WGETRC = "${configHome}/wgetrc";
XDG_CONFIG_HOME = configHome;
XDG_DATA_HOME = dataHome;
XDG_DOCUMENTS_DIR = "$HOME/Documents";
XDG_REPOS_DIR = "$HOME/Code";
XDG_STATE_HOME = config.xdg.stateHome;
}; };
xdg.configFile = { xdg = {
"${config.home.sessionVariables.WGETRC}".text = '' configFile = {
hsts-file = "${cacheHome}/wget-hsts" "${config.home.sessionVariables.WGETRC}".text = ''
''; hsts-file = "${cacheHome}/wget-hsts"
'';
};
userDirs = {
extraConfig = {
XDG_REPOS_DIR = "${config.home.homeDirectory}/Code";
};
};
}; };
} }

View file

@ -29,7 +29,7 @@
includes = [ includes = [
{ {
condition = "gitdir:${config.home.sessionVariables.XDG_REPOS_DIR}/tfw"; condition = "gitdir:${config.xdg.userDirs.extraConfig.XDG_REPOS_DIR}/tfw";
contents.user.email = "oliver.davies@tfw.wales"; contents.user.email = "oliver.davies@tfw.wales";
} }
]; ];

View file

@ -10,6 +10,6 @@
s = "secrets"; s = "secrets";
secrets = ''doppler --project "$(whoami)" run''; secrets = ''doppler --project "$(whoami)" run'';
tag = "tag-release"; tag = "tag-release";
vss = "LC_ALL=C sort --unique ${config.home.sessionVariables.XDG_REPOS_DIR}/dotfiles/nvim/spell/en.utf-8.add --output ${config.home.sessionVariables.XDG_REPOS_DIR}/dotfiles/nvim/spell/en.utf-8.add"; vss = "LC_ALL=C sort --unique ${config.xdg.userDirs.extraConfig.XDG_REPOS_DIR}/dotfiles/nvim/spell/en.utf-8.add --output ${config.xdg.userDirs.extraConfig.XDG_REPOS_DIR}/dotfiles/nvim/spell/en.utf-8.add";
wt = "git worktree"; wt = "git worktree";
} }