Add XDG_REPOS_HOME variable

This commit is contained in:
Oliver Davies 2025-03-17 20:05:16 +00:00
parent b0c2021d92
commit 2343a739da
7 changed files with 11 additions and 9 deletions

View file

@ -3,7 +3,7 @@
set -o errexit set -o errexit
set -o nounset set -o nounset
cd "${REPOS}/traefik-development" cd "${XDG_REPOS_DIR}/traefik-development"
docker compose up --detach docker compose up --detach
docker container ps docker container ps

View file

@ -6,7 +6,7 @@
set -o errexit set -o errexit
set -o nounset set -o nounset
dirs=$(find "$REPOS" -mindepth 1 -maxdepth 2 -type d -name .git -not -path '*/*.old/*') dirs=$(find "$XDG_REPOS_DIR" -mindepth 1 -maxdepth 2 -type d -name .git -not -path '*/*.old/*')
for dir in $dirs; do for dir in $dirs; do
repo_path="${dir%/.git}" repo_path="${dir%/.git}"

View file

@ -70,8 +70,8 @@ in
"./node_modules/.bin" "./node_modules/.bin"
]; ];
PULUMI_SKIP_UPDATE_CHECK = "true"; PULUMI_SKIP_UPDATE_CHECK = "true";
REPOS = "$HOME/Code";
XDG_CONFIG_HOME = "${config.xdg.configHome}"; XDG_CONFIG_HOME = "${config.xdg.configHome}";
XDG_DATA_HOME = "${config.xdg.dataHome}"; XDG_DATA_HOME = "${config.xdg.dataHome}";
XDG_REPOS_DIR = "$HOME/Code";
}; };
} }

View file

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

View file

@ -25,7 +25,7 @@ with lib;
set +o errexit set +o errexit
set +o nounset set +o nounset
if [[ "$PWD" == "$REPOS/os" || "$PWD" == "$REPOS/personal" ]]; then if [[ "$PWD" == "$XDG_REPOS_DIR/os" || "$PWD" == "$XDG_REPOS_DIR/personal" ]]; then
clear clear
return return

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: { config, pkgs, ... }:
{ {
programs.zsh = { programs.zsh = {
@ -12,8 +12,8 @@
abbreviations = import ./zsh/abbreviations.nix; abbreviations = import ./zsh/abbreviations.nix;
}; };
cdpath = [ "~/Code" ]; cdpath = [ "$HOME/Code" ];
dotDir = ".config/zsh"; dotDir = "${config.xdg.configHome}/zsh";
shellAliases = (import ./zsh/aliases.nix); shellAliases = (import ./zsh/aliases.nix);

View file

@ -1,3 +1,5 @@
{ config, ... }:
{ {
"$" = ""; "$" = "";
"-" = "cd -"; "-" = "cd -";
@ -8,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 $REPOS/dotfiles/nvim/spell/en.utf-8.add --output $REPOS/dotfiles/nvim/spell/en.utf-8.add"; 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";
wt = "git worktree"; wt = "git worktree";
} }