From d5279a25d265e23081ddbbb881f16ea3e225b434 Mon Sep 17 00:00:00 2001 From: Barrett Ruth Date: Sun, 8 Mar 2026 20:41:40 -0400 Subject: [PATCH] fix(aws): make directories writable --- home/modules/shell.nix | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/home/modules/shell.nix b/home/modules/shell.nix index cf6dd3e..0fb8124 100644 --- a/home/modules/shell.nix +++ b/home/modules/shell.nix @@ -128,14 +128,20 @@ in (lib.mkIf node [ "${config.xdg.dataHome}/pnpm" ]) ]; - xdg.configFile."aws/config" = lib.mkIf aws { - text = '' - [default] - [profile barrett] - region = us-east-2 - output = json - ''; - }; + home.activation.awsConfig = lib.mkIf aws ( + lib.hm.dag.entryAfter [ "writeBoundary" ] '' + dir="${config.xdg.configHome}/aws" + mkdir -p "$dir" + if [ ! -f "$dir/config" ]; then + cat > "$dir/config" << 'AWSEOF' +[default] +[profile barrett] +region = us-east-2 +output = json +AWSEOF + fi + '' + ); xdg.configFile."npm/npmrc" = lib.mkIf node { text = ''